流程图逻辑处理
Showing
4 changed files
with
155 additions
and
137 deletions
| 1 | /* | 1 | /* |
| 2 | * @Description: 引入公共组件 | 2 | * @Description: 引入公共组件 |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-04-25 15:18:20 | 4 | * @LastEditTime: 2023-04-26 17:26:12 |
| 5 | */ | 5 | */ |
| 6 | import dialogBox from '@/components/DialogBox/dialogBox.vue' | 6 | import dialogBox from '@/components/dialogBox/dialogBox.vue' |
| 7 | import LbTable from '@/components/LbTable/lb-table.vue' | 7 | import LbTable from '@/components/LbTable/lb-table.vue' |
| 8 | import Theme from '@/components/Theme/theme.vue' | 8 | import Theme from '@/components/Theme/theme.vue' |
| 9 | import Popup from '@/components/Popup/index' | 9 | import Popup from '@/components/Popup/index' | ... | ... |
| 1 | <!-- | ||
| 2 | * @Author: xiaomiao 1158771342@qq.com | ||
| 3 | * @Date: 2023-03-09 14:54:49 | ||
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
| 5 | * @LastEditTime: 2023-04-27 10:39:11 | ||
| 6 | * @FilePath: \不动产登记系统\bdcdj-web\src\views\workflow\components\batchDel.vue | ||
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
| 8 | --> | ||
| 1 | <template> | 9 | <template> |
| 2 | <div class='batchDel'> | 10 | <div class='batchDel'> |
| 3 | <lb-table :column="columns" :data="formData.dataList" :maxHeight="460" :heightNumSetting="true" :pagination="false" | 11 | <lb-table :column="columns" :data="formData.dataList" :maxHeight="460" :heightNumSetting="true" :pagination="false" |
| ... | @@ -5,7 +13,7 @@ | ... | @@ -5,7 +13,7 @@ |
| 5 | </lb-table> | 13 | </lb-table> |
| 6 | <div class="text-center"> | 14 | <div class="text-center"> |
| 7 | <el-button @click="$popupCacel">取消</el-button> | 15 | <el-button @click="$popupCacel">取消</el-button> |
| 8 | <el-button type="primary" @click="childFn" plain>确定</el-button> | 16 | <el-button type="primary" @click="submitdelclick" plain>确定</el-button> |
| 9 | </div> | 17 | </div> |
| 10 | </div> | 18 | </div> |
| 11 | </template> | 19 | </template> |
| ... | @@ -46,7 +54,8 @@ | ... | @@ -46,7 +54,8 @@ |
| 46 | } | 54 | } |
| 47 | }, | 55 | }, |
| 48 | methods: { | 56 | methods: { |
| 49 | childFn () { | 57 | // 批量删除确定按钮 |
| 58 | submitdelclick () { | ||
| 50 | var formdata = new FormData(); | 59 | var formdata = new FormData(); |
| 51 | formdata.append("bsmSldyList", this.selectBdcdy); | 60 | formdata.append("bsmSldyList", this.selectBdcdy); |
| 52 | formdata.append("bsmSlsq", this.formData.bsmSlsq); | 61 | formdata.append("bsmSlsq", this.formData.bsmSlsq); |
| ... | @@ -60,6 +69,7 @@ | ... | @@ -60,6 +69,7 @@ |
| 60 | } | 69 | } |
| 61 | }) | 70 | }) |
| 62 | }, | 71 | }, |
| 72 | // 批量删除勾选事件 | ||
| 63 | handleSelectionChange (e) { | 73 | handleSelectionChange (e) { |
| 64 | this.selectBdcdy = []; | 74 | this.selectBdcdy = []; |
| 65 | e.forEach((item, index) => { | 75 | e.forEach((item, index) => { | ... | ... |
| ... | @@ -53,6 +53,12 @@ | ... | @@ -53,6 +53,12 @@ |
| 53 | </el-select> | 53 | </el-select> |
| 54 | <el-table :data="taskCommentList" size="mini" border header-cell-class-name="table-header-gray"> | 54 | <el-table :data="taskCommentList" size="mini" border header-cell-class-name="table-header-gray"> |
| 55 | <el-table-column label="序号" header-align="center" align="center" type="index" width="55px" /> | 55 | <el-table-column label="序号" header-align="center" align="center" type="index" width="55px" /> |
| 56 | <el-table-column label="流程状态" header-align="center" align="center"> | ||
| 57 | <template slot-scope="scope"> | ||
| 58 | <div v-if="scope.row.finishTime == null">正在办理</div> | ||
| 59 | <div v-else>已完结</div> | ||
| 60 | </template> | ||
| 61 | </el-table-column> | ||
| 56 | <el-table-column label="环节名称" prop="taskName" minWidth="150px" align="center" /> | 62 | <el-table-column label="环节名称" prop="taskName" minWidth="150px" align="center" /> |
| 57 | <el-table-column label="办理人" prop="assigneeName" minWidth="100px" align="center" /> | 63 | <el-table-column label="办理人" prop="assigneeName" minWidth="100px" align="center" /> |
| 58 | <el-table-column label="处理时间" prop="createTime" width="140px" align="center" /> | 64 | <el-table-column label="处理时间" prop="createTime" width="140px" align="center" /> |
| ... | @@ -150,13 +156,12 @@ | ... | @@ -150,13 +156,12 @@ |
| 150 | onSelectElement (element) { | 156 | onSelectElement (element) { |
| 151 | this.selectTaskId = undefined | 157 | this.selectTaskId = undefined |
| 152 | this.dlgTitle = undefined | 158 | this.dlgTitle = undefined |
| 153 | 159 | let allfinishedTaskSet = [...this.processNodeInfo.finishedTaskSet, ...this.processNodeInfo.unfinishedTaskSet] | |
| 154 | if (this.processNodeInfo == null || this.processNodeInfo.finishedTaskSet == null) return | 160 | if (this.processNodeInfo == null || allfinishedTaskSet == null) |
| 155 | 161 | return | |
| 156 | if (element == null || this.processNodeInfo.finishedTaskSet.indexOf(element.id) === -1) { | 162 | if (element == null || allfinishedTaskSet.indexOf(element.id) === -1) { |
| 157 | return | 163 | return |
| 158 | } | 164 | } |
| 159 | |||
| 160 | this.selectTaskId = element.id | 165 | this.selectTaskId = element.id |
| 161 | this.selectValue = element.id | 166 | this.selectValue = element.id |
| 162 | this.dlgTitle = element.businessObject ? element.businessObject.name : undefined | 167 | this.dlgTitle = element.businessObject ? element.businessObject.name : undefined |
| ... | @@ -182,6 +187,9 @@ | ... | @@ -182,6 +187,9 @@ |
| 182 | if (this.formData.finishedInfo.finishedTaskSet.includes(item.value)) { | 187 | if (this.formData.finishedInfo.finishedTaskSet.includes(item.value)) { |
| 183 | return item | 188 | return item |
| 184 | } | 189 | } |
| 190 | if (this.formData.finishedInfo.unfinishedTaskSet.includes(item.value)) { | ||
| 191 | return item | ||
| 192 | } | ||
| 185 | }).filter(Boolean); | 193 | }).filter(Boolean); |
| 186 | this.selectValue = xmlData.startEvent._id | 194 | this.selectValue = xmlData.startEvent._id |
| 187 | this.clearViewer('a') | 195 | this.clearViewer('a') | ... | ... |
| ... | @@ -95,143 +95,143 @@ | ... | @@ -95,143 +95,143 @@ |
| 95 | </div> | 95 | </div> |
| 96 | </template> | 96 | </template> |
| 97 | <script> | 97 | <script> |
| 98 | import { mapGetters } from "vuex"; | 98 | import { mapGetters } from "vuex"; |
| 99 | import searchBox from "../components/search.vue"; | 99 | import searchBox from "../components/search.vue"; |
| 100 | import table from "@/utils/mixin/table"; | 100 | import table from "@/utils/mixin/table"; |
| 101 | import searchMin from "../components/mixin/index"; | 101 | import searchMin from "../components/mixin/index"; |
| 102 | import { datas, sendThis } from "./dbxdata"; | 102 | import { datas, sendThis } from "./dbxdata"; |
| 103 | import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"; | 103 | import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"; |
| 104 | import { judgeUserTaskPermission } from "@/api/fqsq"; | 104 | import { judgeUserTaskPermission } from "@/api/fqsq"; |
| 105 | export default { | 105 | export default { |
| 106 | name: "dbx", | 106 | name: "dbx", |
| 107 | components: { searchBox }, | 107 | components: { searchBox }, |
| 108 | mixins: [table, searchMin], | 108 | mixins: [table, searchMin], |
| 109 | computed: { | 109 | computed: { |
| 110 | ...mapGetters(["dictData", "transfer"]), | 110 | ...mapGetters(["dictData", "transfer"]), |
| 111 | }, | 111 | }, |
| 112 | data () { | 112 | data () { |
| 113 | return { | 113 | return { |
| 114 | queryForm: { | ||
| 115 | ywly: "", | ||
| 116 | qllx: "", | ||
| 117 | djlx: "", | ||
| 118 | ywh: "", | ||
| 119 | }, | ||
| 120 | searchForm: { | ||
| 121 | ywlymc: "", | ||
| 122 | qllxmc: "", | ||
| 123 | djlxmc: "", | ||
| 124 | ywh: "", | ||
| 125 | }, | ||
| 126 | tableData: { | ||
| 127 | total: 0, | ||
| 128 | columns: datas.columns(), | ||
| 129 | data: [], | ||
| 130 | }, | ||
| 131 | jumpid: "", | ||
| 132 | }; | ||
| 133 | }, | ||
| 134 | mounted () { | ||
| 135 | sendThis(this); | ||
| 136 | window["getBpageList"] = () => { | ||
| 137 | this.queryClick(); | ||
| 138 | } | ||
| 139 | }, | ||
| 140 | watch: { | ||
| 114 | queryForm: { | 141 | queryForm: { |
| 115 | ywly: "", | 142 | handler (newName, oldName) { }, |
| 116 | qllx: "", | 143 | immediate: true, |
| 117 | djlx: "", | ||
| 118 | ywh: "", | ||
| 119 | }, | 144 | }, |
| 120 | searchForm: { | 145 | }, |
| 121 | ywlymc: "", | 146 | methods: { |
| 122 | qllxmc: "", | 147 | // 列表渲染接口 |
| 123 | djlxmc: "", | 148 | queryClick () { |
| 124 | ywh: "", | 149 | this.$startLoading(); |
| 150 | this.searchForm.ywh = this.queryForm.ywh; | ||
| 151 | this.iterationData(); | ||
| 152 | searchTaskToDo({ | ||
| 153 | ...this.queryForm, | ||
| 154 | ...this.otherForm, | ||
| 155 | ...this.pageData, | ||
| 156 | }).then((res) => { | ||
| 157 | this.$endLoading(); | ||
| 158 | if (res.code === 200) { | ||
| 159 | let { total, records } = res.result; | ||
| 160 | this.tableData.total = total ? total : 0; | ||
| 161 | this.tableData.data = records ? records : []; | ||
| 162 | } | ||
| 163 | }); | ||
| 125 | }, | 164 | }, |
| 126 | tableData: { | 165 | handleSort (val) { |
| 127 | total: 0, | 166 | this.queryForm.sortField = val.prop; |
| 128 | columns: datas.columns(), | 167 | this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc"; |
| 129 | data: [], | 168 | this.queryClick(); |
| 130 | }, | 169 | }, |
| 131 | jumpid: "", | 170 | del (item) { |
| 132 | }; | 171 | let formdata = new FormData(); |
| 133 | }, | 172 | formdata.append("bsmSlsq", item.bsmSlsq); |
| 134 | mounted () { | 173 | this.$confirm("确定要删除吗, 是否继续?", "提示", { |
| 135 | sendThis(this); | 174 | confirmButtonText: "确定", |
| 136 | window["getBpageList"] = () => { | 175 | cancelButtonText: "取消", |
| 137 | this.queryClick(); | 176 | type: "warning", |
| 138 | } | ||
| 139 | }, | ||
| 140 | watch: { | ||
| 141 | queryForm: { | ||
| 142 | handler (newName, oldName) { }, | ||
| 143 | immediate: true, | ||
| 144 | }, | ||
| 145 | }, | ||
| 146 | methods: { | ||
| 147 | // 列表渲染接口 | ||
| 148 | queryClick () { | ||
| 149 | this.$startLoading(); | ||
| 150 | this.searchForm.ywh = this.queryForm.ywh; | ||
| 151 | this.iterationData(); | ||
| 152 | searchTaskToDo({ | ||
| 153 | ...this.queryForm, | ||
| 154 | ...this.otherForm, | ||
| 155 | ...this.pageData, | ||
| 156 | }).then((res) => { | ||
| 157 | this.$endLoading(); | ||
| 158 | if (res.code === 200) { | ||
| 159 | let { total, records } = res.result; | ||
| 160 | this.tableData.total = total ? total : 0; | ||
| 161 | this.tableData.data = records ? records : []; | ||
| 162 | } | ||
| 163 | }); | ||
| 164 | }, | ||
| 165 | handleSort (val) { | ||
| 166 | this.queryForm.sortField = val.prop; | ||
| 167 | this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc"; | ||
| 168 | this.queryClick(); | ||
| 169 | }, | ||
| 170 | del (item) { | ||
| 171 | let formdata = new FormData(); | ||
| 172 | formdata.append("bsmSlsq", item.bsmSlsq); | ||
| 173 | this.$confirm("确定要删除吗, 是否继续?", "提示", { | ||
| 174 | confirmButtonText: "确定", | ||
| 175 | cancelButtonText: "取消", | ||
| 176 | type: "warning", | ||
| 177 | }) | ||
| 178 | .then(() => { | ||
| 179 | deleteFlow(formdata).then((res) => { | ||
| 180 | if (res.code === 200) { | ||
| 181 | this.handleDel(); | ||
| 182 | this.$message({ | ||
| 183 | type: "success", | ||
| 184 | message: "删除成功!", | ||
| 185 | }); | ||
| 186 | this.queryClick(); | ||
| 187 | } else { | ||
| 188 | this.$message.error(res.message); | ||
| 189 | } | ||
| 190 | }); | ||
| 191 | }) | 177 | }) |
| 192 | .catch(() => { | 178 | .then(() => { |
| 193 | this.$message({ | 179 | deleteFlow(formdata).then((res) => { |
| 194 | type: "info", | 180 | if (res.code === 200) { |
| 195 | message: "已取消删除", | 181 | this.handleDel(); |
| 182 | this.$message({ | ||
| 183 | type: "success", | ||
| 184 | message: "删除成功!", | ||
| 185 | }); | ||
| 186 | this.queryClick(); | ||
| 187 | } else { | ||
| 188 | this.$message.error(res.message); | ||
| 189 | } | ||
| 190 | }); | ||
| 191 | }) | ||
| 192 | .catch(() => { | ||
| 193 | this.$message({ | ||
| 194 | type: "info", | ||
| 195 | message: "已取消删除", | ||
| 196 | }); | ||
| 196 | }); | 197 | }); |
| 197 | }); | 198 | }, |
| 198 | }, | 199 | ywhClick (item) { |
| 199 | ywhClick (item) { | 200 | //判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面 |
| 200 | //判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面 | 201 | judgeUserTaskPermission({ |
| 201 | judgeUserTaskPermission({ | 202 | bsmSlsq: item.bsmSlsq, |
| 202 | bsmSlsq: item.bsmSlsq, | 203 | bestepid: item.bestepid, |
| 203 | bestepid: item.bestepid, | 204 | }).then((res) => { |
| 204 | }).then((res) => { | 205 | if (res.code == 200) { |
| 205 | if (res.code == 200) { | 206 | if (res.result) { |
| 206 | if (res.result) { | 207 | //有任务权限 |
| 207 | //有任务权限 | 208 | const { href } = this.$router.resolve( |
| 208 | const { href } = this.$router.resolve( | 209 | "/workFrame?bsmSlsq=" + |
| 209 | "/workFrame?bsmSlsq=" + | 210 | item.bsmSlsq + |
| 210 | item.bsmSlsq + | 211 | "&bestepid=" + |
| 211 | "&bestepid=" + | 212 | item.bestepid + |
| 212 | item.bestepid + | 213 | "&bsmBusiness=" + |
| 213 | "&bsmBusiness=" + | 214 | "&sqywbm=" + |
| 214 | "&sqywbm=" + | 215 | item.djywbm |
| 215 | item.djywbm | 216 | ); |
| 216 | ); | 217 | localStorage.setItem('ywbl', JSON.stringify(item)); |
| 217 | localStorage.setItem('ywbl', JSON.stringify(item)); | 218 | window.open(href, `urlname${item.bsmSlsq}`); |
| 218 | window.open(href, `urlname${item.bsmSlsq}`); | 219 | //从待办箱进入的调取任务领取接口 |
| 219 | //从待办箱进入的调取任务领取接口 | 220 | claimTask(item.bsmSlsq, item.bestepid); |
| 220 | claimTask(item.bsmSlsq, item.bestepid); | 221 | } else { |
| 222 | //无任务权限 | ||
| 223 | this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作"); | ||
| 224 | //刷新页面 | ||
| 225 | this.queryClick(); | ||
| 226 | } | ||
| 221 | } else { | 227 | } else { |
| 222 | //无任务权限 | 228 | this.$message.error("用户任务权限判断失败,请联系管理员"); |
| 223 | this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作"); | ||
| 224 | //刷新页面 | ||
| 225 | this.queryClick(); | ||
| 226 | } | 229 | } |
| 227 | } else { | 230 | }); |
| 228 | this.$message.error("用户任务权限判断失败,请联系管理员"); | 231 | }, |
| 229 | } | ||
| 230 | }); | ||
| 231 | }, | 232 | }, |
| 232 | }, | 233 | }; |
| 233 | }; | ||
| 234 | </script> | 234 | </script> |
| 235 | <style scoped lang="scss"> | 235 | <style scoped lang="scss"> |
| 236 | @import "~@/styles/public.scss"; | 236 | @import "~@/styles/public.scss"; |
| 237 | </style> | 237 | </style> | ... | ... |
-
Please register or sign in to post a comment