wente
2023-12-05 bb9bf60cbd34d0638f1df89c69358533b2cc220c
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
@@ -62,7 +62,7 @@
                  <el-input v-model="row.retrospectVersion" placeholder="上溯版"></el-input>
                </template>
              </el-table-column>
              <el-table-column prop="secretClass" label="密级" width="80"  align="center">
              <el-table-column prop="secretClass" label="密级" width="100"  align="center">
                <template v-slot="{ row }">
                  <zt-dict v-model="row.secretClass" placeholder="密级" dict="secret_class"
                           clearable></zt-dict>
@@ -75,10 +75,28 @@
                                  v-model="row.files"/>
                </template>
              </el-table-column>
              <el-table-column fixed="right" label="管理" width="80" align="center">
                <template v-slot="{ row }">
                  <zt-table-button @click="">管理</zt-table-button>
<!--                  <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"-->
<!--                                  v-model="row.files"/>-->
                </template>
              </el-table-column>
            </el-table>
              <div class="icon-container" @click="addConfigItemWarehouseRow()">
                <!-- 放置固定的图标 -->
              <div class="icon-container">
                <el-dropdown @command="handleCommand">
                  <span class="el-dropdown-link">
                <i class="el-icon-plus"></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item v-for="item in menuOptions" :key="item.command" :command="item.command">
                      {{ item.name }}
                    </el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
                <!-- 放置固定的图标 -->
<!--                <i class="el-icon-plus"></i>-->
              </div>
            </div>
          </div>
@@ -161,7 +179,7 @@
          </div>
          <div style="width: calc(100% - 120px)" class="el-border-left">
            <el-form-item class="el-wt-form-item-margin" label-width="20px" style="width: 85%">
              <zt-dict :disabled="stepMarker=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions" dict="is_pass" :radio="true"
              <zt-dict :disabled="stepMarker!=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions" dict="is_pass" :radio="true"
                       clearable></zt-dict>
            </el-form-item>
            <el-form-item label-width="80%" label="签字:" style="width: 65%">
@@ -179,6 +197,7 @@
          <div style="width: calc(100% - 120px)" class="el-border-left">
            <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
              <el-input v-if="stepMarker=='wplz_cmcz'" type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
              <span v-else>{{dataForm.configItemWarehouse.projectCmOperations}}</span>
            </el-form-item>
            <el-form-item label-width="80%" label="操作人:" style="width: 65%">
              <span>{{dataForm.configItemWarehouse.operator}}</span>
@@ -210,6 +229,13 @@
        disabled:true,
        stepMarker: '',
        title: '查看',
        menuOptions: [
          { command: 'a', name: '软件测试委托单' },
          { command: 'b', name: '软件需求规格说明' },
          { command: 'c', name: '软件设计说明' },
          { command: 'd', name: '软件研制任务书' },
          { command: 'e', name: '其他' }
        ],
        dataForm: {
          id: '',
          configItemWarehouse:{
@@ -275,8 +301,21 @@
        }
        console.log(this.dataForm.id,this.dataForm.projectId,'params params')
      },
      addConfigItemWarehouseRow(){
      // addConfigItemWarehouseRow(){
      //   this.dataForm.configItemList.push({})
      //   this.$nextTick(()=>{
      //     const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
      //     tableBody.scrollTop = tableBody.scrollHeight;
      //   })
      // },
      handleCommand(command){
        const selectedItem = this.menuOptions.find(item => item.command === command);
        if (selectedItem.command === 'e') {
        this.dataForm.configItemList.push({})
        }else if(selectedItem){
          this.dataForm.configItemList.push({itemName:selectedItem.name})
        }
        this.$nextTick(()=>{
          const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
          tableBody.scrollTop = tableBody.scrollHeight;