diff --git a/src/api/common.js b/src/api/common.js new file mode 100644 index 0000000..06f25fc --- /dev/null +++ b/src/api/common.js @@ -0,0 +1,35 @@ +import api from '@/utils/api' +import apibjd from '@/utils/apibjd' +export function getOwnList(query) { + return api({ + url: '/renwu/ownList', + method: 'get', + params: query + }) +} + +/** + * 任务列表 综合调用 + * @param query + * @param urlPath + */ +export function completeRenwuFn(params) { + return apibjd({ + url: 'renwu/completeRenwu', + method: 'post', + params: params, + paramsSerializer: function(data) { + return require('qs').stringify(data, { indices: false }) + } + }) +} +export function backToLeaderFn(params) { + return apibjd({ + url: 'renwu/backToLeader', + method: 'get', + params: params, + paramsSerializer: function(data) { + return require('qs').stringify(data, { indices: false }) + } + }) +} diff --git a/src/api/renwu.js b/src/api/renwu.js index a18801a..c6333b7 100644 --- a/src/api/renwu.js +++ b/src/api/renwu.js @@ -24,3 +24,24 @@ export function getRenwuListByPath(query, urlPath) { params: query }) } +export function terminateRenwu(data) { + console.log(data) + return apibjd({ + url: 'renwu/terminateRenwu', + method: 'put', + data: data, + paramsSerializer: function(data) { + return require('qs').stringify(data, { indices: false }) + } + }) +} +export function completeRenwuFn(params) { + return apibjd({ + url: 'renwu/completeRenwu', + method: 'post', + params: params, + paramsSerializer: function(data) { + return require('qs').stringify(data, { indices: false }) + } + }) +} diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index aec86ff..9f840cf 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -177,23 +177,6 @@ /> - - - - - - - { diff --git a/src/views/allot/hasAllot.vue b/src/views/allot/hasAllot.vue index b1ed237..3ca67ee 100644 --- a/src/views/allot/hasAllot.vue +++ b/src/views/allot/hasAllot.vue @@ -100,19 +100,19 @@ diff --git a/src/views/assign/hasAssign.vue b/src/views/assign/hasAssign.vue index 7309075..6fb83e9 100644 --- a/src/views/assign/hasAssign.vue +++ b/src/views/assign/hasAssign.vue @@ -78,19 +78,19 @@ diff --git a/src/views/assign/missionList.vue b/src/views/assign/missionList.vue index ac095f8..c20545b 100644 --- a/src/views/assign/missionList.vue +++ b/src/views/assign/missionList.vue @@ -178,6 +178,7 @@ import Sticky from '@/components/Sticky' import Pagination from '@/components/Pagination' import Utils from '@/utils/contact' +import { backToLeaderFn } from '@/api/common' export default { name: 'MyTask', components: { Sticky, Pagination }, @@ -555,15 +556,11 @@ export default { }) return false } - this.apibjd({ - url: 'renwu/backToLeader', - method: 'get', - params: { - ids: this.$refs.list.selection.map(rw => { - return rw.id - }).join(',') - } - }).then(data => { + const arr = [] + this.$refs.list.selection.map(rw => { + arr.push(rw.id) + }) + backToLeaderFn({ renwuIds: arr }).then(data => { this.$message({ type: 'success', message: '任务退回成功' diff --git a/src/views/bjd/dj_create.vue b/src/views/bjd/dj_create.vue index 88165b9..c969307 100644 --- a/src/views/bjd/dj_create.vue +++ b/src/views/bjd/dj_create.vue @@ -1,9 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + + + + - +
+ +
+
+ 超期预警 +
+
+ 到期标注 +
+
+
diff --git a/src/views/bjd/dj_input.vue b/src/views/bjd/dj_input.vue index 4699297..e526b59 100644 --- a/src/views/bjd/dj_input.vue +++ b/src/views/bjd/dj_input.vue @@ -237,19 +237,13 @@ label="区划名称:" prop="quhuadaima" > - - - + />
@@ -1545,7 +1539,8 @@ export default { fixedFlag: true, fixedWidth: '', isShengju: true, - form: this.$route.params.form + form: this.$route.params.form, + areaList: [] } }, watch: { @@ -1585,6 +1580,16 @@ export default { this.getDepts() }, methods: { + getArea() { + this.api({ + url: '/area/getAll', + method: 'get', + params: {} + }).then(res => { + this.areaList = res[0].children + console.log(this.areaList) + }) + }, getParamList(renwus, init) { this.apibjd({ url: '/bjd/getParams', @@ -1802,25 +1807,13 @@ export default { this.jylbs = data }) }, - getArea() { - // 查询区划 - this.api({ - url: '/area/getShiArea', - method: 'get', - params: { - shidaima: '370100' - } - }).then((data) => { - this.areas = data - }) - }, getDepts() { // 查询科室 this.api({ - url: '/department/getDepartmentByCode', + url: '/department/all', method: 'get', params: { - code: this.bjd.shebeizhongleidaima + shebeizhongleidaima: this.bjd.shebeizhongleidaima } }).then((data) => { this.depts = data @@ -1848,10 +1841,8 @@ export default { } }, quhuaChange(val) { - const obj = this.areas.find((item) => { - return item.value === val - }) - this.bjd.quhuamingcheng = obj.label + const arr = this.$refs['editCascader'].getCheckedNodes()[0].pathLabels + this.bjd.quhuamingcheng = arr.toString() }, tableRowClassName({ row, rowIndex }) { row.index = rowIndex diff --git a/src/views/bjd/dj_list.vue b/src/views/bjd/dj_list.vue index 83a276a..5f56578 100644 --- a/src/views/bjd/dj_list.vue +++ b/src/views/bjd/dj_list.vue @@ -133,25 +133,25 @@ @@ -177,7 +177,7 @@ @@ -289,14 +289,14 @@ export default { cancelButtonText: '取消', inputPattern: /\S/, inputErrorMessage: '作废原因不能为空' - }).then(() => { + }).then(({ value }) => { for (let i = 0; i < this.multipleSelection.length; i++) { this.ids.push(this.multipleSelection[i].id) } this.apibjd({ url: '/bjd/updBjdToZf', method: 'get', - params: { bjdIds: this.ids.join(',') } + params: { reason: value, bjdIds: this.ids.join(',') } }).then(data => { this.$message({ message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'), @@ -324,13 +324,13 @@ export default { return false } else { for (let i = 0; i < this.multipleSelection.length; i++) { - if (this.multipleSelection[i].bjState === '2') { + if (this.multipleSelection[i].bjState === 2) { this.$message({ type: 'error', message: '选择的数据中有办结的项目,请重新选择!' }) return false - } else if (this.multipleSelection[i].bjState === '5' || this.multipleSelection[i].bjState === '6') { + } else if (this.multipleSelection[i].bjState === 5 || this.multipleSelection[i].bjState === 6) { this.$message({ type: 'error', message: '异常收回跟异常退回的数据,请通过作废按钮进行处理!' @@ -374,7 +374,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2') { + if (bjd.bjState === 2) { type = '/finish' } this.$router.push({ path: '/bjd/bjd-dj-input/' + bjd.id + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhonglei + type }) diff --git a/src/views/bjd/dt_list.vue b/src/views/bjd/dt_list.vue index e948588..88bd23f 100644 --- a/src/views/bjd/dt_list.vue +++ b/src/views/bjd/dt_list.vue @@ -114,25 +114,25 @@ @@ -142,7 +142,7 @@ @@ -292,13 +292,13 @@ export default { return false } else { for (let i = 0; i < this.multipleSelection.length; i++) { - if (this.multipleSelection[i].bjState === '2') { + if (this.multipleSelection[i].bjState === 2) { this.$message({ type: 'error', message: '选择的数据中有办结的项目,请重新选择!' }) return false - } else if (this.multipleSelection[i].bjState === '5' || this.multipleSelection[i].bjState === '6') { + } else if (this.multipleSelection[i].bjState === 5 || this.multipleSelection[i].bjState === 6) { this.$message({ type: 'error', message: '异常收回跟异常退回的数据,请通过作废按钮进行处理!' diff --git a/src/views/bjd/jj_list.vue b/src/views/bjd/jj_list.vue index 87643d9..4b2e303 100644 --- a/src/views/bjd/jj_list.vue +++ b/src/views/bjd/jj_list.vue @@ -127,25 +127,25 @@ @@ -171,8 +171,8 @@ @@ -349,13 +349,13 @@ export default { return false } else { for (let i = 0; i < this.multipleSelection.length; i++) { - if (this.multipleSelection[i].bjState === '2') { + if (this.multipleSelection[i].bjState === 2) { this.$message({ type: 'error', message: '选择的数据中有办结的项目,请重新选择!' }) return false - } else if (this.multipleSelection[i].bjState === '5' || this.multipleSelection[i].bjState === '6') { + } else if (this.multipleSelection[i].bjState === 5 || this.multipleSelection[i].bjState === 6) { this.$message({ type: 'error', message: '异常收回跟异常退回的数据,请通过作废按钮进行处理!' @@ -394,7 +394,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2' || bjd.bjState === '3') { + if (bjd.bjState === 2 || bjd.bjState === 3) { type = '/finish' } this.$router.push({ path: '/bjd/bjd-jj-input/' + bjd.id + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhonglei + type }) diff --git a/src/views/bjd/qy_list.vue b/src/views/bjd/qy_list.vue index b4daabf..ac94ffe 100644 --- a/src/views/bjd/qy_list.vue +++ b/src/views/bjd/qy_list.vue @@ -96,25 +96,25 @@ @@ -124,8 +124,8 @@ @@ -263,7 +263,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2' || bjd.bjState === '3') { + if (bjd.bjState === 2 || bjd.bjState === 3) { type = '/finish' } if (bjd.jianyanleibie === 'DJ') { diff --git a/src/views/bjd/wx_list.vue b/src/views/bjd/wx_list.vue index 82b723f..7f922c8 100644 --- a/src/views/bjd/wx_list.vue +++ b/src/views/bjd/wx_list.vue @@ -89,25 +89,25 @@ diff --git a/src/views/bjd/zf_list.vue b/src/views/bjd/zf_list.vue index d20785c..afd45e9 100644 --- a/src/views/bjd/zf_list.vue +++ b/src/views/bjd/zf_list.vue @@ -56,16 +56,16 @@ @@ -168,7 +168,7 @@ export default { return false } else { for (let i = 0; i < this.multipleSelection.length; i++) { - if (this.multipleSelection[i].bjState === '2') { + if (this.multipleSelection[i].bjState === 2) { this.$message({ type: 'error', message: '选择的数据中有办结的项目,请重新选择!' diff --git a/src/views/bjd/zj_list.vue b/src/views/bjd/zj_list.vue index 41341d9..7ff22f6 100644 --- a/src/views/bjd/zj_list.vue +++ b/src/views/bjd/zj_list.vue @@ -78,25 +78,25 @@ @@ -292,13 +292,13 @@ export default { return false } for (let i = 0; i < this.multipleSelection.length; i++) { - if (this.multipleSelection[i].bjState === '2') { + if (this.multipleSelection[i].bjState === 2) { this.$message({ type: 'error', message: '选择的数据中有办结的项目,请重新选择!' }) return false - } else if (this.multipleSelection[i].bjState === '5') { + } else if (this.multipleSelection[i].bjState === 5) { this.$message({ type: 'error', message: '异常收回的数据,请通过作废按钮进行处理!' @@ -352,7 +352,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2' || bjd.bjState === '3') { + if (bjd.bjState === 2 || bjd.bjState === 3) { type = '/finish' } this.$router.push({ path: '/bjd/bjd-zj-input/' + bjd.id + '/' + bjd.shebeizhongleidaima + type }) diff --git a/src/views/bjd/zlsc_list.vue b/src/views/bjd/zlsc_list.vue index 19e7afe..af2b7a9 100644 --- a/src/views/bjd/zlsc_list.vue +++ b/src/views/bjd/zlsc_list.vue @@ -91,25 +91,25 @@ @@ -136,8 +136,8 @@ @@ -274,7 +274,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2' || bjd.bjState === '3') { + if (bjd.bjState === 2 || bjd.bjState === 3) { type = '/finish' } if (bjd.jianyanleibie === 'DJ') { diff --git a/src/views/bjd/zlsc_list_all.vue b/src/views/bjd/zlsc_list_all.vue index 430dc8a..4ae7257 100644 --- a/src/views/bjd/zlsc_list_all.vue +++ b/src/views/bjd/zlsc_list_all.vue @@ -93,25 +93,25 @@ @@ -148,8 +148,8 @@ @@ -321,7 +321,7 @@ export default { editBjd($index) { const bjd = this.list[$index] let type = '/update' - if (bjd.bjState === '2' || bjd.bjState === '3') { + if (bjd.bjState === 2 || bjd.bjState === 3) { type = '/finish' } if (bjd.jianyanleibie === 'DJ') { diff --git a/src/views/flow/template.vue b/src/views/flow/template.vue index 5bff878..391c179 100644 --- a/src/views/flow/template.vue +++ b/src/views/flow/template.vue @@ -63,19 +63,6 @@ :value="item.value" /> - - - 查询 diff --git a/src/views/task/list.vue b/src/views/task/list.vue index 58bdc5f..c7de057 100644 --- a/src/views/task/list.vue +++ b/src/views/task/list.vue @@ -227,7 +227,7 @@ import Sticky from '@/components/Sticky' import SliceUpload from '@/components/SliceUpload' import Pagination from '@/components/Pagination' import Utils from '../../utils/contact.js' -import { getOwnList } from '@/api/renwu' +import { getOwnList, terminateRenwu, completeRenwuFn } from '@/api/renwu' import Enclosure from '@/views/common/Enclosure' export default { name: 'MyTask', @@ -675,15 +675,13 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.apibjd({ - url: 'renwu/completeRenwu', - method: 'post', - params: { - renwuIds: this.$refs.list.selection.map(rw => { - return rw.id - }).join(',') - } - }).then(data => { + console.log(111111111111) + const arr = [] + this.$refs.list.selection.map(rw => { + arr.push(rw.id) + }) + + completeRenwuFn({ renwuIds: arr }).then(res => { this.$message.success('任务已完成') this.getList() }) @@ -700,21 +698,21 @@ export default { this.$message.error('请选择要终止的任务') return false } + const renwuIds = [] + this.$refs.list.selection.map(rw => { + renwuIds.push(rw.id) + }) this.$prompt('请输入终止原因', '确认提前终止任务?', { confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: /\S/, inputErrorMessage: '终止原因不能为空' - }).then(() => { - this.apibjd({ - url: 'renwu/terminateRenwu', - method: 'put', - params: { - renwuIds: this.$refs.list.selection.map(rw => { - return rw.id - }).join(',') - } - }).then(data => { + }).then(({ value }) => { + const data = { + reason: value, + renwuIds + } + terminateRenwu(data).then(data => { this.$message.success('任务已终止') this.getList() })