wente
2023-11-22 d6e03c8b28806fe3e0523f9827bcd593c61454fb
项目表
4个文件已修改
58 ■■■■■ 已修改文件
web/packages/components/zt-dict/src/zt-dict.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/project/Environ-AddOrUpdate.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/project/Environ.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/packages/components/zt-dict/src/zt-dict.vue
@@ -4,9 +4,9 @@
          <el-option :label="data.dictLabel" v-for="data in dicts" :key="data.dictValue" :value ="data.dictValue">{{data.dictLabel}}</el-option>
      </el-select>
      <div v-if="showType === 'radio'" :disabled="disabled">
        <el-radio-group :value="dictValue" @input="$emit('input', $event)" >
          <el-radio :label="data.dictValue" @change="changeDictValue(data.dictValue,data.dictLabel)" v-for="data in dicts" :key="data.dictValue">{{data.dictLabel}}</el-radio>
          <el-input class="radio-input" v-if="isName" v-model="inputName"></el-input>
        <el-radio-group :value="dictValue" @input="$emit('input', $event)">
          <el-radio :label="data.dictValue" v-for="data in dicts" :key="data.dictValue">{{data.dictLabel}}</el-radio>
          <el-input class="radio-input" v-if="isOtherOptionSelected" v-model="inputName"></el-input>
        </el-radio-group>
      </div>
      <zt-combo-tree v-model="dictValue" :datas="dictTrees" :disabled-filter="disabledFilter" @input="$emit('input', $event)" v-if="showType === 'tree'" :placeholder="placeholder"/>
@@ -19,6 +19,7 @@
    name: 'ZtDict',
    props: {
      inputName:{},
      origin:{}, // 字典字段
      value: [Number, String, Boolean],
      dict: { // 字典类型
        type: String,
@@ -48,7 +49,6 @@
      return {
        dictValue: typeof this.value === 'undefined' ? '' : (this.value + ''),
        isName:false,
        eventIndex:'',
      }
    },
    computed: {
@@ -64,6 +64,10 @@
        this.wrapTreeId(datas)
        return datas
      },
      isOtherOptionSelected() {
        const selectedOption = this.dicts.find(data => data.dictValue === this.dictValue);
        return selectedOption && selectedOption.dictLabel.includes('其他');
      },
      dicts: function () {
        let dicts = this.$store.getters.getDict(this.dict)
        if (this.excluded.length > 0) {
@@ -78,19 +82,12 @@
    watch: {
      value(val, oldval) {
        this.dictValue = typeof val === 'undefined' ? '' : (val + '')
      },
      inputName(){
        this.$emit('getChangeInputData',this.inputName,this.origin)
      }
    },
    methods: {
      changeDictValue(value,name){
        if(name.indexOf("其他")!=-1){
          console.log(this.inputName,'inputName')
          console.log(name,'字典名字q34567')
          this.eventIndex = value
          this.isName = true
        }else {
          this.isName = false
        }
      },
      wrapTreeId(dictTypes) {
        dictTypes.forEach(item => {
          if ((item.dictType || '').length > 0) { // 字典类型
web/src/views/modules/project/Environ-AddOrUpdate.vue
@@ -386,7 +386,9 @@
.table-container {
  position: relative;
}
.table-container:hover .icon-container {
  opacity: 1; /* 鼠标悬停时显示图标 */
}
.icon-container {
  z-index: 1;
  position: absolute;
@@ -396,10 +398,16 @@
  height: 30px;
  text-align: center;
  line-height: 30px;
  transform: translateX(-50%);
  transform: translate3d(-50%, 0, -20px);
  border: 1px solid #EBEEF5;
  background-color: #fafafa;
  box-shadow: 0 3px 6px 0 rgba(72, 119, 232, 0.14);
  border-radius: 2px;
  transition: transform 0.3s ease,box-shadow 0.3s ease,opacity 0.3s ease;
  opacity: 0;
}
.icon-container:hover{
  transform: translate3d(-50%, 0, 0);
  box-shadow: 0 10px 10px 0 rgba(72, 119, 232, 0.34)
}
</style>
web/src/views/modules/project/Environ.vue
@@ -5,7 +5,6 @@
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
          <el-form-item>
            <el-input v-model="dataForm.code" placeholder="请输入编号" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <zt-button type="query" @click="table.query()"/>
web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
@@ -130,7 +130,7 @@
                  <div class="el-border-left" style="width: 98%">
                    <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0">
                      <zt-dict v-model="dataForm.softwareTestOrder.testBasis" :radio="true" dict="test_basis"
                               clearable :inputName="dataForm.softwareTestOrder.otherBasis"></zt-dict>
                               clearable  :inputName="dataForm.softwareTestOrder.otherBasis" origin="otherBasis" @getChangeInputData="getChangeInputData"></zt-dict>
                    </el-form-item>
                  </div>
                </div>
@@ -156,6 +156,7 @@
                  <div class="el-border-left" style="width: 98%">
                    <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0">
                      <zt-dict  v-model="dataForm.softwareTestOrder.testStandard" :radio="true"
                                origin="otherStandard" @getChangeInputData="getChangeInputData"
                                dict="test_standard" :inputName="dataForm.softwareTestOrder.otherStandard">
                      </zt-dict>
                    </el-form-item>
@@ -214,7 +215,8 @@
                  <div class="el-border-left" style="width: 98%;">
                    <el-form-item label="是否盖CNAS章" label-width="130px" style="padding-left:5%;margin-bottom:0">
                      <zt-dict v-model="dataForm.softwareTestOrder.otherRequire" :radio="true"
                               dict="other_require"></zt-dict>
                               dict="is_or_not"></zt-dict>
                      <span>其他:<el-input class="requireOther" v-model="dataForm.softwareTestOrder.requireOther"></el-input></span>
                    </el-form-item>
                  </div>
                </div>
@@ -227,8 +229,8 @@
              <div class="" style="width: 100%;">
                <div class="el-flex " style="height: 40px">
                  <div style="width: 60%">
<!--                    <span>{{ dataForm.softwareTestOrder.entrustSign }}</span>-->
                    <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="委托方人员"/>
                    <span>{{ dataForm.softwareTestOrder.entrustSign }}</span>
<!--                    <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="委托方人员"/>-->
                  </div>
                  <div class="el-flex" style="margin-left: 10%">
                    <el-date-picker
@@ -296,6 +298,7 @@
                  <div class="el-border-left" style="width: 15%">
                    <el-form-item  style="width: 98%;padding-left:20px;margin:0;">
                      <zt-dict v-model="dataForm.softwareTestOrder.articleNature" :radio="true"
                               origin="otherNature" @getChangeInputData="getChangeInputData"
                               dict="article_nature" :inputName="dataForm.softwareTestOrder.otherNature"></zt-dict>
                    </el-form-item>
                  </div>
@@ -508,6 +511,12 @@
    //     this.inputName='q14eeff'
    //   }
    // },
    getChangeInputData(data,ogn){
      // console.log(ogn)
      this.$set(this.dataForm.softwareTestOrder, ogn, data);
      console.log(this.dataForm.softwareTestOrder[ogn]);
      // console.log(this.dataForm.softwareTestOrder[ogn])
    },
    handleCellClick(row, column) {
      this.editingCell = {row, column}
      this.$nextTick(() => {
@@ -709,4 +718,7 @@
.test-type-line-height>.el-form-item>.el-form-item__content{
  line-height: 30px;
}
.requireOther.el-input{
  position: absolute;
}
</style>