zhaojiale
2022-09-08 1be21989c76f0eb9a43b9ebcab322d7171dbccd6
src/views/goalManagement/TargetBook/index.vue
@@ -4,7 +4,7 @@
         <el-row>
            <el-col :span="4">
               <el-form-item size="default">
                  <el-input v-model="ruleForm.searchParams.jobId" placeholder="请选择岗位">
                  <el-input v-model="jobName" placeholder="请选择岗位">
                     <template #append> <el-button :icon="Search" @click="openSearch" /> </template
                  ></el-input>
               </el-form-item>
@@ -26,7 +26,8 @@
         <div class="btns">
            <div>
               <el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button>
               <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button>
               <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen"
                        @click="openD('修改', deletAll[0])">修改</el-button>
               <el-button size="default" :disabled="danger" type="danger" :icon="Delete" plain @click="onDeleteAll">删除</el-button>
            </div>
            <div>
@@ -38,7 +39,7 @@
            <el-table-column type="selection" align="center" width="55" />
            <el-table-column type="index" label="序号" align="center" width="70" />
            <el-table-column property="jobId" align="center" label="岗位" sortable />
            <el-table-column property="signDate" align="center" label="责任书签订日期" sortable />
            <el-table-column property="signDate" align="center" label="责任书签订日期" :formatter="timeDate" sortable />
            <el-table-column property="extraFile" align="center" label="附件" sortable />
            <el-table-column property="memo" label="备注信息" align="center" sortable show-overflow-tooltip />
            <el-table-column label="操作" align="center" style="width: 300px">
@@ -61,12 +62,13 @@
            />
         </div>
         <DailogAdd ref="openAdd" @navAddorUpdata="onAddorUpdata"></DailogAdd>
         <DailogSearch ref="openUser"></DailogSearch>
         <DailogSearch ref="openUser"  @backNum="IdNumber"></DailogSearch>
      </div>
   </div>
</template>
<script lang="ts">
import DailogAdd from './component/DailogAdd.vue';
import {timeDate} from '/@/assets/index.ts'
import DailogSearch from './component/DailogSearch.vue';
import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
@@ -87,6 +89,7 @@
      // 重置
      const resetForm = () => {
         ruleForm.searchParams.jobId = '';
         jobName.value=""
         listApi();
      };
      const listApi = () => {
@@ -115,6 +118,11 @@
      const onAddorUpdata = () => {
         listApi();
      };
      const jobName=ref()
      const IdNumber=(val:any)=>{
         ruleForm.jobId=val.id
       jobName.value=val.date
      }
      // 表格
      const tableData = ref();
      const currentPage4 = ref();
@@ -137,6 +145,8 @@
      };
      // 删除
      const onDelete = (id: number) => {
         let arr=[]
         arr.push(id)
         ElMessageBox.confirm('确定删除所选项吗?', 'Warning', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
@@ -144,7 +154,7 @@
         })
            .then(() => {
               goalManagementApi()
                  .gettargetDutyfileInfoDelete(id)
                  .gettargetDutyfileInfoDelete(arr)
                  .then((res) => {
                     if (res.data.code == 200) {
                        ElMessage({
@@ -174,7 +184,7 @@
         for (let i = 0; i < valId.length; i++) {
            arr.push(valId[i].id);
         }
         deletAll.value = arr.toString();
         deletAll.value = arr
         if (val.length == 1) {
            warning.value = false;
            danger.value = false;
@@ -219,6 +229,7 @@
         openUser.value.openDailog();
      };
      return {
         IdNumber,
         ruleForm,
         resetForm,
         listApi,
@@ -240,6 +251,7 @@
         onDeleteAll,
         openUser,
         openSearch,
         timeDate,
         Plus,
         Delete,
         Upload,