| | |
| | | measuresAddressRisksOpportunities, |
| | | processReport, |
| | | processComplain, |
| | | inconsistentDistribution, |
| | | } |
| | | } |
| | | |
| | |
| | | getProcessComplain:'/processComplain/getProcessComplain',//æè¯å¤ç详æ
|
| | | doProcessComplain:'/processComplain/doProcessComplain',//æè¯å¤çä¿®æ¹ |
| | | exportProcessComplain :'/processComplain/exportProcessComplain ',//æè¯å¤çå¯¼åº |
| | | } |
| | | } |
| | | |
| | | // 7.10ä¸ç¬¦å项åå¸ |
| | | const inconsistentDistribution = { |
| | | pageInconsistentDistribution:'/inconsistentDistribution/pageInconsistentDistribution', // ä¸ç¬¦å项çåå¸å页æ¥è¯¢ |
| | | getInconsistentDistributionOne:'/inconsistentDistribution/getInconsistentDistributionOne', // ä¸ç¬¦å项çåå¸è¯¦æ
|
| | | addInconsistentDistribution:'/inconsistentDistribution/addInconsistentDistribution', // ä¸ç¬¦å项çå叿°å¢ |
| | | updateInconsistentDistribution:'/inconsistentDistribution/updateInconsistentDistribution', // ä¸ç¬¦å项çåå¸ä¿®æ¹ |
| | | delInconsistentDistribution:'/inconsistentDistribution/delInconsistentDistribution', // ä¸ç¬¦å项çåå¸å é¤ |
| | | exportInconsistentDistribution:'/inconsistentDistribution/exportInconsistentDistribution', // 导åºä¸ç¬¦å项çåå¸ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="ä¸ç¬¦å项çåå¸" |
| | | width="90%" @close="closeDia"> |
| | | <table border="1" cellspacing="10" class="table"> |
| | | <tr> |
| | | <td>ç« èå·</td> |
| | | <th class="div-with-line"> |
| | | <span style="float: left;">è¦ç´ </span> |
| | | <span style="float: right;">é¨é¨</span> |
| | | </th> |
| | | <th>主任</th> |
| | | <th>ææ¯è´è´£äºº</th> |
| | | <th>è´¨éè´è´£äºº</th> |
| | | <th>综å室</th> |
| | | <th>è¯éªå®¤</th> |
| | | <th>å计</th> |
| | | <th>å %</th> |
| | | </tr> |
| | | <tr v-for="(item, index) in distributionDetailList" :key="item.value"> |
| | | <td>{{item.chapterNumber}}</td> |
| | | <th>{{item.essentials}}</th> |
| | | <th> |
| | | <el-input-number v-model="item.director" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.technology" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.quality" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.comprehensive" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | <el-input-number v-model="item.testing" :precision="0" clearable size="small"></el-input-number> |
| | | </th> |
| | | <th> |
| | | {{item.total}} |
| | | </th> |
| | | <th> |
| | | {{(item.proportion?item.proportion:0) + '%'}} |
| | | </th> |
| | | </tr> |
| | | <tr> |
| | | <td> </td> |
| | | <th> |
| | | å æ¯ |
| | | </th> |
| | | <th> |
| | | {{(distributionProportion.director?distributionProportion.director:0) + '%'}} |
| | | </th> |
| | | <th> |
| | | {{(distributionProportion.technology?distributionProportion.technology:0) + '%'}} |
| | | </th> |
| | | <th> |
| | | {{(distributionProportion.quality?distributionProportion.quality:0) + '%'}} |
| | | </th> |
| | | <th> |
| | | {{(distributionProportion.comprehensive?distributionProportion.comprehensive:0) + '%'}} |
| | | </th> |
| | | <th> |
| | | {{(distributionProportion.testing?distributionProportion.testing:0) + '%'}} |
| | | </th> |
| | | <th> |
| | | {{distributionProportion.total?distributionProportion.total:0}} |
| | | </th> |
| | | <th> </th> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'formDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | distributionDetailList: [], |
| | | form: { |
| | | |
| | | }, |
| | | distributionProportion: {} |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } else { |
| | | this.selectEnumByCategory() |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo (row) { |
| | | this.diaLoading = true |
| | | this.$axios(this.$api.inconsistentDistribution.getInconsistentDistributionOne + '?distributionId=' + row.distributionId).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.distributionDetailList = this.form.distributionDetailList |
| | | this.distributionProportion = this.form.distributionProportion |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | const date = new Date(); |
| | | const year = date.getFullYear(); |
| | | this.loading = true |
| | | const internalPlan = this.HaveJson(this.form) |
| | | internalPlan.distributionYear = year |
| | | internalPlan.distributionDetailList = this.HaveJson(this.distributionDetailList) |
| | | if (this.operationType === 'add') { |
| | | this.$axios.post(this.$api.inconsistentDistribution.addInconsistentDistribution, internalPlan, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | this.$axios.post(this.$api.inconsistentDistribution.updateInconsistentDistribution, internalPlan, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | closeDia () { |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.distributionDetailList = [] |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "è¦ç´ " |
| | | }).then(res => { |
| | | res.data.map((item) => { |
| | | const obj = Object.assign({ |
| | | essentials: item.label, |
| | | chapterNumber: item.value, |
| | | }) |
| | | this.distributionDetailList.push(obj) |
| | | }) |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | >>> .el-dialog__body { |
| | | max-height: 68vh; |
| | | overflow-y: auto; |
| | | } |
| | | >>> .is-required { |
| | | margin-bottom: 6px; |
| | | } |
| | | .table { |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | } |
| | | .table td { |
| | | width: 30px; |
| | | text-align: center; |
| | | } |
| | | .table th { |
| | | width: 70px; |
| | | height: 70px; |
| | | text-align: center; |
| | | } |
| | | .div-with-line { |
| | | width: 70px; |
| | | height: 70px; |
| | | position: relative; |
| | | /*overflow: hidden; /* éèæº¢åºå
容 */ |
| | | } |
| | | .div-with-line::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | | height: 1px; |
| | | background-color: #000000; |
| | | left: 50%; |
| | | transform: translateX(-50%) rotate(45deg); |
| | | transform-origin: center 50%; |
| | | top: 50%; |
| | | width: 100px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <div class="view-title"> |
| | | <span>ä¸ç¬¦å项çåå¸</span> |
| | | <span> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 120px">年份ï¼</span> |
| | | <el-input v-model="searchForm.distributionYear" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <div> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 23em)'" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="padding: 0 15px;margin-bottom: 16px"> |
| | | </ZTTable> |
| | | </template> |
| | | </TableCard> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <form-dia v-if="formDia" ref="formDia" @closeDia="closeDia"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../caorui/ZTTable/index.vue'; |
| | | import TableCard from '../caorui/TableCard/index.vue'; |
| | | import FormDia from '../do/a7-distribution-of-nonconforming/formDia.vue'; |
| | | |
| | | export default { |
| | | name: 'a7-distribution-of-nonconforming', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { FormDia, TableCard, ZTTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | distributionYear: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: '年份', |
| | | prop: 'distributionYear', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'createUserName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹äºº', |
| | | prop: 'updateUserName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹æ¶é´', |
| | | prop: 'updateTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total: 0, |
| | | formDia: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | this.$axios.post(this.$api.inconsistentDistribution.pageInconsistentDistribution, {entity, page}, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.inconsistentDistribution.delInconsistentDistribution + '?distributionId=' + row.distributionId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia (type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | this.$axios.get(this.$api.inconsistentDistribution.exportInconsistentDistribution + '?distributionId=' + row.distributionId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä¸ç¬¦å项çåå¸' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.formDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.distributionYear = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页 |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.searchList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .search-background { |
| | | width: 100%; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 20px; |
| | | background-color: #ffffff; |
| | | padding-top: 20px; |
| | | } |
| | | </style> |