Browse Source

责任单位显示

zk 2 years ago
parent
commit
30a37ea933
2 changed files with 49 additions and 6 deletions
  1. 21 2
      web/src/view/problemInfo/proInfo.vue
  2. 28 4
      web/src/view/problemInfo/problemInfo.vue

+ 21 - 2
web/src/view/problemInfo/proInfo.vue

@@ -14,8 +14,11 @@
             <el-tag v-show="formData.status == 'Untreated'" type="warning">未处理</el-tag>
             <el-tag v-show="formData.status == 'Untreated'" type="warning">未处理</el-tag>
             <el-tag v-show="formData.status == 'Processed'" type="success">已处理</el-tag>
             <el-tag v-show="formData.status == 'Processed'" type="success">已处理</el-tag>
           </el-descriptions-item>
           </el-descriptions-item>
-          <el-descriptions-item label="责任部门">{{ formData.department }}</el-descriptions-item>
-          <el-descriptions-item label="一类部门">{{ formData.unitName }}</el-descriptions-item>
+          <el-descriptions-item label="责任部门">
+            <span v-if="formData.department!=''">
+              <span v-for="(item,i) in formData.department.split('|')" :key="i">{{ unitMap[item]+"、" }}</span>
+            </span>
+          </el-descriptions-item>
           <el-descriptions-item label="扣评分">{{ formData.integral/10 }}</el-descriptions-item>
           <el-descriptions-item label="扣评分">{{ formData.integral/10 }}</el-descriptions-item>
           <el-descriptions-item span="2" label="问题备注">{{ formData.remark }}</el-descriptions-item>
           <el-descriptions-item span="2" label="问题备注">{{ formData.remark }}</el-descriptions-item>
         </el-descriptions>
         </el-descriptions>
@@ -72,12 +75,14 @@
 <script>
 <script>
 import { findProblemInfo } from '@/api/problemInfo'
 import { findProblemInfo } from '@/api/problemInfo'
 import Print from '@/utils/print'
 import Print from '@/utils/print'
+import { getUnitList } from '@/api/unit'
 export default {
 export default {
   name: 'ProInfo',
   name: 'ProInfo',
   dicts: ['site_type'],
   dicts: ['site_type'],
   data() {
   data() {
     return {
     return {
       matterList: [],
       matterList: [],
+      unitMap: {},
       formData: {
       formData: {
         oper: 0,
         oper: 0,
         handler: 0,
         handler: 0,
@@ -98,6 +103,7 @@ export default {
     }
     }
   },
   },
   async created() {
   async created() {
+    await this.getUnitList()
     const res = await findProblemInfo({ ID: this.$route.query.Id })
     const res = await findProblemInfo({ ID: this.$route.query.Id })
     if (res.code === 0) {
     if (res.code === 0) {
       this.formData = res.data.reproblemInfo
       this.formData = res.data.reproblemInfo
@@ -119,6 +125,19 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    getUnitList() {
+      const params = {
+        page: 1,
+        pageSize: 99999999,
+      }
+      getUnitList(params).then(res => {
+        if (res.code == 0) {
+          res.data.list.forEach((unit, index) => {
+            this.unitMap[unit.ID.toString()] = unit.unitName
+          })
+        }
+      })
+    },
     printBtn() {
     printBtn() {
       Print(this.$refs.print)
       Print(this.$refs.print)
       // window.print()
       // window.print()

+ 28 - 4
web/src/view/problemInfo/problemInfo.vue

@@ -53,7 +53,6 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column label="已登录查阅次数" prop="count" />
       <el-table-column label="已登录查阅次数" prop="count" />
-      <el-table-column label="一类部门" prop="unitName" />
       <el-table-column label="扣评分" prop="integral">
       <el-table-column label="扣评分" prop="integral">
         <template #default="scope">{{ scope.row.integral/10 }}</template>
         <template #default="scope">{{ scope.row.integral/10 }}</template>
       </el-table-column>
       </el-table-column>
@@ -65,7 +64,13 @@
           <el-tag v-show="scope.row.status == 'Error'" type="error" effect="dark">已审核未通过</el-tag>
           <el-tag v-show="scope.row.status == 'Error'" type="error" effect="dark">已审核未通过</el-tag>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="责任部门" prop="department" />
+      <el-table-column label="责任部门" prop="department">
+        <template #default="scope">
+          <span v-if="scope.row.department!=''">
+            <span v-for="(item,i) in scope.row.department.split('|')" :key="i">{{ unitMap[item]+"、" }}</span>
+          </span>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" width="300">
       <el-table-column label="操作" width="300">
         <template #default="scope">
         <template #default="scope">
           <el-button
           <el-button
@@ -148,11 +153,14 @@
               <el-tag v-show="formData.status == 'Success'" type="success" effect="dark">审核通过</el-tag>
               <el-tag v-show="formData.status == 'Success'" type="success" effect="dark">审核通过</el-tag>
               <el-tag v-show="formData.status == 'Error'" type="error" effect="dark">已审核未通过</el-tag>
               <el-tag v-show="formData.status == 'Error'" type="error" effect="dark">已审核未通过</el-tag>
             </el-descriptions-item>
             </el-descriptions-item>
-            <el-descriptions-item label="责任部门">{{ formData.department }}</el-descriptions-item>
+            <el-descriptions-item label="责任部门">
+              <template #default="scope">
+                <span v-for="(item,i) in formData.department.split('|')" :key="i">{{ unitMap[item] }}</span>
+              </template>
+            </el-descriptions-item>
             <el-descriptions-item label="处理时限" prop="HandAt">
             <el-descriptions-item label="处理时限" prop="HandAt">
               <template #default="scope">{{ formatDate(formData.HandAt) }}</template>
               <template #default="scope">{{ formatDate(formData.HandAt) }}</template>
             </el-descriptions-item>
             </el-descriptions-item>
-            <el-descriptions-item label="一类部门">{{ formData.unitName }}</el-descriptions-item>
             <el-descriptions-item label="扣评分">{{ formData.integral/10 }}</el-descriptions-item>
             <el-descriptions-item label="扣评分">{{ formData.integral/10 }}</el-descriptions-item>
             <el-descriptions-item span="2" label="问题备注">{{ formData.remark }}</el-descriptions-item>
             <el-descriptions-item span="2" label="问题备注">{{ formData.remark }}</el-descriptions-item>
           </el-descriptions>
           </el-descriptions>
@@ -261,6 +269,7 @@ import CustomPic from '@/components/customPic/index.vue'
 import infoList from '@/mixins/infoList'
 import infoList from '@/mixins/infoList'
 import { getDict } from '@/utils/dictionary'
 import { getDict } from '@/utils/dictionary'
 import { getUserPList } from '@/api/user'
 import { getUserPList } from '@/api/user'
+import { getUnitList } from '@/api/unit'
 
 
 export default {
 export default {
   name: 'ProblemInfo',
   name: 'ProblemInfo',
@@ -286,6 +295,7 @@ export default {
       multipleSelection: [],
       multipleSelection: [],
       matterList: [],
       matterList: [],
       replyList: [],
       replyList: [],
+      unitMap: {},
       formData: {
       formData: {
         oper: 0,
         oper: 0,
         handler: 0,
         handler: 0,
@@ -310,6 +320,7 @@ export default {
   async created() {
   async created() {
     this.siteType = await getDict('site_type')
     this.siteType = await getDict('site_type')
     await this.getTableData()
     await this.getTableData()
+    await this.getUnitList()
   },
   },
   methods: {
   methods: {
     handleExcelExport() {
     handleExcelExport() {
@@ -324,6 +335,19 @@ export default {
     handleSelectionChange(val) {
     handleSelectionChange(val) {
       this.multipleSelection = val
       this.multipleSelection = val
     },
     },
+    getUnitList() {
+      const params = {
+        page: 1,
+        pageSize: 99999999,
+      }
+      getUnitList(params).then(res => {
+        if (res.code == 0) {
+          res.data.list.forEach((unit, index) => {
+            this.unitMap[unit.ID.toString()] = unit.unitName
+          })
+        }
+      })
+    },
     deleteRow(row) {
     deleteRow(row) {
       this.$confirm('确定要删除吗?', '提示', {
       this.$confirm('确定要删除吗?', '提示', {
         confirmButtonText: '确定',
         confirmButtonText: '确定',