a403ebff by xiaomiao

流程图逻辑处理

1 parent 6aa657ab
/*
* @Description: 引入公共组件
* @Autor: renchao
* @LastEditTime: 2023-04-25 15:18:20
* @LastEditTime: 2023-04-26 17:26:12
*/
import dialogBox from '@/components/DialogBox/dialogBox.vue'
import dialogBox from '@/components/dialogBox/dialogBox.vue'
import LbTable from '@/components/LbTable/lb-table.vue'
import Theme from '@/components/Theme/theme.vue'
import Popup from '@/components/Popup/index'
......
<!--
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 14:54:49
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-04-27 10:39:11
* @FilePath: \不动产登记系统\bdcdj-web\src\views\workflow\components\batchDel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class='batchDel'>
<lb-table :column="columns" :data="formData.dataList" :maxHeight="460" :heightNumSetting="true" :pagination="false"
......@@ -5,7 +13,7 @@
</lb-table>
<div class="text-center">
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="childFn" plain>确定</el-button>
<el-button type="primary" @click="submitdelclick" plain>确定</el-button>
</div>
</div>
</template>
......@@ -46,7 +54,8 @@
}
},
methods: {
childFn () {
// 批量删除确定按钮
submitdelclick () {
var formdata = new FormData();
formdata.append("bsmSldyList", this.selectBdcdy);
formdata.append("bsmSlsq", this.formData.bsmSlsq);
......@@ -60,6 +69,7 @@
}
})
},
// 批量删除勾选事件
handleSelectionChange (e) {
this.selectBdcdy = [];
e.forEach((item, index) => {
......
......@@ -53,6 +53,12 @@
</el-select>
<el-table :data="taskCommentList" size="mini" border header-cell-class-name="table-header-gray">
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" />
<el-table-column label="流程状态" header-align="center" align="center">
<template slot-scope="scope">
<div v-if="scope.row.finishTime == null">正在办理</div>
<div v-else>已完结</div>
</template>
</el-table-column>
<el-table-column label="环节名称" prop="taskName" minWidth="150px" align="center" />
<el-table-column label="办理人" prop="assigneeName" minWidth="100px" align="center" />
<el-table-column label="处理时间" prop="createTime" width="140px" align="center" />
......@@ -150,13 +156,12 @@
onSelectElement (element) {
this.selectTaskId = undefined
this.dlgTitle = undefined
if (this.processNodeInfo == null || this.processNodeInfo.finishedTaskSet == null) return
if (element == null || this.processNodeInfo.finishedTaskSet.indexOf(element.id) === -1) {
let allfinishedTaskSet = [...this.processNodeInfo.finishedTaskSet, ...this.processNodeInfo.unfinishedTaskSet]
if (this.processNodeInfo == null || allfinishedTaskSet == null)
return
if (element == null || allfinishedTaskSet.indexOf(element.id) === -1) {
return
}
this.selectTaskId = element.id
this.selectValue = element.id
this.dlgTitle = element.businessObject ? element.businessObject.name : undefined
......@@ -182,6 +187,9 @@
if (this.formData.finishedInfo.finishedTaskSet.includes(item.value)) {
return item
}
if (this.formData.finishedInfo.unfinishedTaskSet.includes(item.value)) {
return item
}
}).filter(Boolean);
this.selectValue = xmlData.startEvent._id
this.clearViewer('a')
......
......@@ -95,143 +95,143 @@
</div>
</template>
<script>
import { mapGetters } from "vuex";
import searchBox from "../components/search.vue";
import table from "@/utils/mixin/table";
import searchMin from "../components/mixin/index";
import { datas, sendThis } from "./dbxdata";
import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl";
import { judgeUserTaskPermission } from "@/api/fqsq";
export default {
name: "dbx",
components: { searchBox },
mixins: [table, searchMin],
computed: {
...mapGetters(["dictData", "transfer"]),
},
data () {
return {
import { mapGetters } from "vuex";
import searchBox from "../components/search.vue";
import table from "@/utils/mixin/table";
import searchMin from "../components/mixin/index";
import { datas, sendThis } from "./dbxdata";
import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl";
import { judgeUserTaskPermission } from "@/api/fqsq";
export default {
name: "dbx",
components: { searchBox },
mixins: [table, searchMin],
computed: {
...mapGetters(["dictData", "transfer"]),
},
data () {
return {
queryForm: {
ywly: "",
qllx: "",
djlx: "",
ywh: "",
},
searchForm: {
ywlymc: "",
qllxmc: "",
djlxmc: "",
ywh: "",
},
tableData: {
total: 0,
columns: datas.columns(),
data: [],
},
jumpid: "",
};
},
mounted () {
sendThis(this);
window["getBpageList"] = () => {
this.queryClick();
}
},
watch: {
queryForm: {
ywly: "",
qllx: "",
djlx: "",
ywh: "",
handler (newName, oldName) { },
immediate: true,
},
searchForm: {
ywlymc: "",
qllxmc: "",
djlxmc: "",
ywh: "",
},
methods: {
// 列表渲染接口
queryClick () {
this.$startLoading();
this.searchForm.ywh = this.queryForm.ywh;
this.iterationData();
searchTaskToDo({
...this.queryForm,
...this.otherForm,
...this.pageData,
}).then((res) => {
this.$endLoading();
if (res.code === 200) {
let { total, records } = res.result;
this.tableData.total = total ? total : 0;
this.tableData.data = records ? records : [];
}
});
},
tableData: {
total: 0,
columns: datas.columns(),
data: [],
handleSort (val) {
this.queryForm.sortField = val.prop;
this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc";
this.queryClick();
},
jumpid: "",
};
},
mounted () {
sendThis(this);
window["getBpageList"] = () => {
this.queryClick();
}
},
watch: {
queryForm: {
handler (newName, oldName) { },
immediate: true,
},
},
methods: {
// 列表渲染接口
queryClick () {
this.$startLoading();
this.searchForm.ywh = this.queryForm.ywh;
this.iterationData();
searchTaskToDo({
...this.queryForm,
...this.otherForm,
...this.pageData,
}).then((res) => {
this.$endLoading();
if (res.code === 200) {
let { total, records } = res.result;
this.tableData.total = total ? total : 0;
this.tableData.data = records ? records : [];
}
});
},
handleSort (val) {
this.queryForm.sortField = val.prop;
this.queryForm.sortOrder = val.order == "ascending" ? "asc" : "desc";
this.queryClick();
},
del (item) {
let formdata = new FormData();
formdata.append("bsmSlsq", item.bsmSlsq);
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteFlow(formdata).then((res) => {
if (res.code === 200) {
this.handleDel();
this.$message({
type: "success",
message: "删除成功!",
});
this.queryClick();
} else {
this.$message.error(res.message);
}
});
del (item) {
let formdata = new FormData();
formdata.append("bsmSlsq", item.bsmSlsq);
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
.then(() => {
deleteFlow(formdata).then((res) => {
if (res.code === 200) {
this.handleDel();
this.$message({
type: "success",
message: "删除成功!",
});
this.queryClick();
} else {
this.$message.error(res.message);
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
});
},
ywhClick (item) {
//判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面
judgeUserTaskPermission({
bsmSlsq: item.bsmSlsq,
bestepid: item.bestepid,
}).then((res) => {
if (res.code == 200) {
if (res.result) {
//有任务权限
const { href } = this.$router.resolve(
"/workFrame?bsmSlsq=" +
item.bsmSlsq +
"&bestepid=" +
item.bestepid +
"&bsmBusiness=" +
"&sqywbm=" +
item.djywbm
);
localStorage.setItem('ywbl', JSON.stringify(item));
window.open(href, `urlname${item.bsmSlsq}`);
//从待办箱进入的调取任务领取接口
claimTask(item.bsmSlsq, item.bestepid);
},
ywhClick (item) {
//判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面
judgeUserTaskPermission({
bsmSlsq: item.bsmSlsq,
bestepid: item.bestepid,
}).then((res) => {
if (res.code == 200) {
if (res.result) {
//有任务权限
const { href } = this.$router.resolve(
"/workFrame?bsmSlsq=" +
item.bsmSlsq +
"&bestepid=" +
item.bestepid +
"&bsmBusiness=" +
"&sqywbm=" +
item.djywbm
);
localStorage.setItem('ywbl', JSON.stringify(item));
window.open(href, `urlname${item.bsmSlsq}`);
//从待办箱进入的调取任务领取接口
claimTask(item.bsmSlsq, item.bestepid);
} else {
//无任务权限
this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作");
//刷新页面
this.queryClick();
}
} else {
//无任务权限
this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作");
//刷新页面
this.queryClick();
this.$message.error("用户任务权限判断失败,请联系管理员");
}
} else {
this.$message.error("用户任务权限判断失败,请联系管理员");
}
});
});
},
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/public.scss";
</style>
......