zss
2024-12-25 786c543590b010ecdcbd38062d2fd79523f6227e
src/components/view/a8-external-document-confirmation-records.vue
@@ -4,17 +4,17 @@
    <el-row class="title">
      <el-col :span="20" style="padding-left: 20px;text-align: left;">外来文件确认记录</el-col>
    </el-row>
    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="tabClick">
      <el-tab-pane label="填写" name="填写" style="height: 100%;">
        <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
          <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower">新增</el-button>
          <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower&&!currentInfo.ratifyUserName">新增</el-button>
          <el-upload :action="action" :multiple="false"
              :show-file-list="false"
          accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
          :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
          :on-error="onError" ref='upload' v-if="upPower&&!currentInfo.ratifyUserName" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
          <el-button size="small" type="primary" :loading="upLoading">导入</el-button></el-upload>
        </div>
        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='历史记录'">
        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='填写'">
          <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
      :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify" :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
        </div>
@@ -37,7 +37,7 @@
            <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
          </div>
        </div>
        <div class="table">
        <div class="table" v-if="activeName=='历史记录'">
          <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
            :componentData="componentData" :key="upIndex"/>
        </div>
@@ -69,7 +69,7 @@
  data(){
    return{
      title0:'查看',
      activeName:'填写',
      activeName:'历史记录',
      lookDialogVisible:false,
      noCheckLoading:false,
      checkLoading:false,
@@ -141,12 +141,18 @@
            id: 'update',
            font: '修改',
            type: 'text',
            method: 'doDiy'
            method: 'doDiy',
            disabFun:(row, index) => {
              return !this.addPower||!!this.currentInfo.ratifyUserName
            }
          },{
            id: 'delete',
            font: '删除',
            type: 'text',
            method: 'doDiy'
            method: 'doDiy',
            disabFun:(row, index) => {
              return !this.addPower||!!this.currentInfo.ratifyUserName
            }
          }],
          tagField: {},
          selectField: {},
@@ -174,6 +180,17 @@
    },
    action() {
      return this.javaApi +this.$api.manageRecordTotal.exportManageRecordVerify
    }
  },
  watch: {
    'activeName' (val1, val2) {
      if(val1=='填写'){
        this.componentData0.do.forEach((item)=>{
          item.disabFun = (row, index) => {
            return !this.addPower||!!this.currentInfo.ratifyUserName
          }
        })
      }
    }
  },
  mounted() {
@@ -332,6 +349,11 @@
        this.lookDialogVisible = false
      }).catch(err=>{});
    },
    tabClick(e){
      if(e.index==0){
        this.currentInfo = this.$refs['ValueTable'].tableData[0]
      }
    }
  }
}
</script>