Browse Source

部门指标与岗位指标优化完毕

dev
超级管理员 3 years ago
parent
commit
10d8424c3e
  1. 2
      src/api/duty/projectNew.js
  2. 44
      src/api/people/peopledata.js
  3. 17
      src/api/personnel/post.js
  4. 157
      src/api/preload.js
  5. 280
      src/api/systemaccredit/systemapi.js
  6. 58
      src/api/workflowapi/workflowaip.js
  7. 10
      src/api/workflowapi/workflowhraip.js
  8. BIN
      src/assets/images/add-close.png
  9. BIN
      src/assets/images/add-close1.png
  10. BIN
      src/assets/images/cancel.png
  11. BIN
      src/assets/images/check_box.png
  12. BIN
      src/assets/images/icon_file.png
  13. BIN
      src/assets/images/icon_people.png
  14. BIN
      src/assets/images/icon_role.png
  15. BIN
      src/assets/images/jiaojiao.png
  16. BIN
      src/assets/images/list_search.png
  17. BIN
      src/assets/images/loading.gif
  18. BIN
      src/assets/images/next_level.png
  19. BIN
      src/assets/images/next_level_active.png
  20. BIN
      src/assets/logo.png
  21. 235
      src/components/addNode.vue
  22. 129
      src/components/dialog/employeesDialog.vue
  23. 146
      src/components/dialog/employeesRoleDialog.vue
  24. 72
      src/components/dialog/errorDialog.vue
  25. 48
      src/components/dialog/mixins.js
  26. 92
      src/components/dialog/roleDialog.vue
  27. 234
      src/components/drawer/approverDrawer.vue
  28. 362
      src/components/drawer/conditionDrawer.vue
  29. 99
      src/components/drawer/copyerDrawer.vue
  30. 89
      src/components/drawer/promoterDrawer.vue
  31. 296
      src/components/nodeWrap.vue
  32. 88
      src/components/selectBox.vue
  33. 100
      src/components/selectResult copy.vue
  34. 103
      src/components/selectResult.vue
  35. 12
      src/css/override-element-ui.css
  36. 17
      src/css/workflow.css
  37. 18
      src/main.js
  38. 5
      src/router/index.js
  39. 29
      src/store/index.js
  40. 2
      src/utils/requestFile.js
  41. 4
      src/views/assessmentProgram/departmentalAssessment copy.vue
  42. 4
      src/views/assessmentProgram/departmentalAssessment.vue
  43. 7
      src/views/assessmentProgram/gwQualitativeIndicators.vue
  44. 8
      src/views/assessmentProgram/qualitativeIndicators.vue
  45. 47
      src/views/basicCont/departTarget.vue
  46. 2
      src/views/basicCont/targetDepartmentConfig.vue
  47. 42
      src/views/basicCont/targetTabsLayout.vue
  48. 1099
      src/views/basicCont/targettabslayout/departmentpage.vue
  49. 175
      src/views/basicCont/targettabslayout/edittablepage.vue
  50. 1265
      src/views/basicCont/targettabslayout/postpage.vue
  51. 1210
      src/views/basicCont/targettabslayout/posttargetdetails.vue
  52. 565
      src/views/basicCont/targettabslayout/tabledetailspage.vue
  53. 1303
      src/views/basicCont/targettabslayout/targetdetails.vue
  54. 2
      src/views/basicInfo/assessmentDimension.vue
  55. 2
      src/views/basicInfo/gwProject.vue
  56. 16
      src/views/mete/index.vue
  57. 216
      src/views/workflow/flow.vue
  58. 89
      src/views/workflow/flow2.vue

2
src/api/duty/projectNew.js

@ -124,7 +124,7 @@ export function gettargetreport(data) {
// 添加部门指标 // 添加部门指标
export function add_department_target(data) { export function add_department_target(data) {
return request({ return request({
url: '/department_pc/add_department_target', url: '/department_pc/new_add_depar_target',
method: 'post', method: 'post',
data data
}) })

44
src/api/people/peopledata.js

@ -539,4 +539,46 @@ export function calcHeightx(value, wappered = true) {
} }
return res; return res;
}; };
//计算表格合并行
/**
*
* @param {*} dataAry //表格数据数组
* @param {*} mergeArr //要合并的字段
* @returns mergeObj //处理后的数据
*/
export function tableMergeTrade(dataAry = Array,mergeArr = Array,lastname ='endtable'){
// console.log("计算表格合并行------->dataAry===>",dataAry,dataAry.length)
// console.log("计算表格合并行------->mergeArr===>",mergeArr,mergeArr.length)
let mergeObj = {};
let endObj = new Array
//循环遍历要合并的字段
mergeArr.forEach((key, index1) => {
let count = 0; // 用来记录需要合并行的起始位置
mergeObj[key] = []; // 记录每一列的合并信息
//数据列表循环
dataAry.forEach((item, index) => {
// index == 0表示数据为第一行,直接 push 一个 1
if(index === 0) {
mergeObj[key].push(1);
}else{
// 判断当前行是否与上一行其值相等 如果相等 在 count 记录的位置其值 +1 表示当前行需要合并 并push 一个 0 作为占位
if(item[key] === dataAry[index - 1][key]) {
mergeObj[key][count] += 1;
mergeObj[key].push(0);
} else {
// 如果当前行和上一行其值不相等
count = index; // 记录当前位置
mergeObj[key].push(1); // 重新push 一个 1
}
}
});
if(index1 == 0){
endObj = mergeObj[key]
}
});
mergeObj[lastname] = endObj;
return mergeObj
}

17
src/api/personnel/post.js

@ -357,3 +357,20 @@ export const newAddPeopleCont = (data) => {
}) })
} }
//获取当前行政组织的所有主行政部门
export const getCompanyDeparment = (data) => {
return request({
url: '/org/getcompanydeparment',
method: 'post',
data: data
})
}
//获取指定行政组织列表
export const getAppointOrg = (data) => {
return request({
url: '/org/getappointorg',
method: 'post',
data: data
})
}

157
src/api/preload.js

@ -0,0 +1,157 @@
function All() { }
All.prototype = {
timer: "",
debounce(fn, delay = 500) {
var _this = this;
return function (arg) {
//获取函数的作用域和变量
let that = this;
let args = arg;
clearTimeout(_this.timer) // 清除定时器
_this.timer = setTimeout(function () {
fn.call(that, args)
}, delay)
}
},
setCookie(val) { //cookie设置[{key:value}]、获取key、清除['key1','key2']
for (var i = 0, len = val.length; i < len; i++) {
for (var key in val[i]) {
document.cookie = key + '=' + encodeURIComponent(val[i][key]) + "; path=/";
}
}
},
getCookie(name) {
var strCookie = document.cookie;
var arrCookie = strCookie.split("; ");
for (var i = 0, len = arrCookie.length; i < len; i++) {
var arr = arrCookie[i].split("=");
if (name == arr[0]) {
return decodeURIComponent(arr[1]);
}
}
},
clearCookie(name) {
var myDate = new Date();
myDate.setTime(-1000); //设置时间
for (var i = 0, len = name.length; i < len; i++) {
document.cookie = "" + name[i] + "=''; path=/; expires=" + myDate.toGMTString();
}
},
arrToStr(arr) {
if (arr) {
return arr.map(item => item.name).toString()
}
},
toggleClass(arr, elem, key = 'id') {
return arr.some(item => item[key] == elem[key]);
},
toChecked(arr, elem, key = 'id') {
var isIncludes = this.toggleClass(arr, elem, key);
!isIncludes ? arr.push(elem) : this.removeEle(arr, elem, key);
},
removeEle(arr, elem, key = 'id') {
var includesIndex;
arr.map((item, index) => {
if (item[key] == elem[key]) {
includesIndex = index
}
});
arr.splice(includesIndex, 1);
},
setApproverStr(nodeConfig) {
if (nodeConfig.settype == 1) {
if (nodeConfig.nodeUserList.length == 1) {
return nodeConfig.nodeUserList[0].name
} else if (nodeConfig.nodeUserList.length > 1) {
if (nodeConfig.examineMode == 1) {
return this.arrToStr(nodeConfig.nodeUserList)
} else if (nodeConfig.examineMode == 2) {
return nodeConfig.nodeUserList.length + "人会签"
}
}
} else if (nodeConfig.settype == 2) {
let level = nodeConfig.directorLevel == 1 ? '直接主管' : '第' + nodeConfig.directorLevel + '级主管'
if (nodeConfig.examineMode == 1) {
return level
} else if (nodeConfig.examineMode == 2) {
return level + "会签"
}
} else if (nodeConfig.settype == 4) {
if (nodeConfig.selectRange == 1) {
return "发起人自选"
} else {
if (nodeConfig.nodeUserList.length > 0) {
if (nodeConfig.selectRange == 2) {
return "发起人自选"
} else {
return '发起人从' + nodeConfig.nodeUserList[0].name + '中自选'
}
} else {
return "";
}
}
} else if (nodeConfig.settype == 5) {
return "发起人自己"
} else if (nodeConfig.settype == 7) {
return '从直接主管到通讯录中级别最高的第' + nodeConfig.examineEndDirectorLevel + '个层级主管'
}
},
dealStr(str, obj) {
let arr = [];
let list = str.split(",");
for (var elem in obj) {
list.map(item => {
if (item == elem) {
arr.push(obj[elem].value)
}
})
}
return arr.join("或")
},
conditionStr(nodeConfig, index) {
var { conditionList, nodeUserList } = nodeConfig.conditionNodes[index];
if (conditionList.length == 0) {
return (index == nodeConfig.conditionNodes.length - 1) && nodeConfig.conditionNodes[0].conditionList.length != 0 ? '其他条件进入此流程' : '请设置条件'
} else {
let str = ""
for (var i = 0; i < conditionList.length; i++) {
var { columnId, columnType, showType, showName, optType, zdy1, opt1, zdy2, opt2, fixedDownBoxValue } = conditionList[i];
if (columnId == 0) {
if (nodeUserList.length != 0) {
str += '发起人属于:'
str += nodeUserList.map(item => item.name).join("或") + " 并且 "
}
}
if (columnType == "String" && showType == "checkBox") {
if (zdy1) {
str += showName + '属于:' + this.dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + " 并且 "
}
}
if (columnType == "Double") {
if (optType != 6 && zdy1) {
var optTypeStr = ["", "<", ">", "≤", "=", "≥"][optType]
str += `${showName} ${optTypeStr} ${zdy1} 并且 `
} else if (optType == 6 && zdy1 && zdy2) {
str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 `
}
}
}
return str ? str.substring(0, str.length - 4) : '请设置条件'
}
},
copyerStr(nodeConfig) {
if (nodeConfig.nodeUserList.length != 0) {
return this.arrToStr(nodeConfig.nodeUserList)
} else {
if (nodeConfig.ccSelfSelectFlag == 1) {
return "发起人自选"
}
}
},
toggleStrClass(item, key) {
let a = item.zdy1 ? item.zdy1.split(",") : []
return a.some(item => item == key);
},
}
export default new All();

280
src/api/systemaccredit/systemapi.js

@ -148,6 +148,13 @@ export const getorgary = (data) => {
data: data data: data
}) })
} }
export const getOrgAndPostAry = (data) => {
return request({
url: '/postpc/get_organdpost_ary',
method: 'post',
data: data
})
}
//添加岗位 //添加岗位
export const newAddPostTarget = (data) => { export const newAddPostTarget = (data) => {
return request({ return request({
@ -164,4 +171,275 @@ export const getQuantitativeTasks = (data) => {
method: 'post', method: 'post',
data: data data: data
}) })
} }
//删除部门指标
export const deltarget = (data) => {
return request({
url: '/department_pc/deltarget',
method: 'post',
data: data
})
}
//获取部门指标(新版)
export const newDepartTarList = (data) => {
return request({
url: '/department_pc/new_depart_tar_list',
method: 'post',
data: data
})
}
//指标改变状态(启用、禁用、软删除、硬删除)
export const targetEditState = (data) => {
return request({
url: '/department_pc/new_del_target',
method: 'post',
data: data
})
}
// 编辑单一部门指标(新版)
export function new_edit_one_target(data) {
return request({
url: '/department_pc/new_edit_one_target',
method: 'post',
data
})
}
// 指标关联岗位(新版)
export function new_dep_tar_post(data) {
return request({
url: '/department_pc/new_dep_tar_post',
method: 'post',
data
})
}
// 获取指标已关联岗位
export function get_target_relevant_post_Report(data) {
return request({
url: '/department_pc/get_target_relevant_post_Report',
method: 'post',
data
})
}
// 获取岗位指标列表
export function get_posttarget_list(data) {
return request({
url: '/postpc/get_posttarget_list',
method: 'post',
data
})
}
// 编辑岗位指标状态
export function setPosttargetState(data) {
return request({
url: '/postpc/set_posttarget_state',
method: 'post',
data
})
}
//添加岗位指标
export const addPostTargetCont = (data) => {
return request({
url: '/postpc/addposttargetcont',
method: 'post',
data: data
})
}
// 获取岗位指标详情
export function get_post_target(data) {
return request({
url: '/postpc/get_post_target',
method: 'post',
data
})
}
// 获取岗位指标详情
export function newEditPostTarget(data) {
return request({
url: '/postpc/neweditposttarget',
method: 'post',
data
})
}
// 获取部门指标细则
export function getTargetDetailsList(data) {
return request({
url: '/department_pc/get_target_details_list',
method: 'post',
data
})
}
// 获取指定指标下的栏目列表
export function getTargetColumnList(data) {
return request({
url: '/department_pc/get_target_column_list',
method: 'post',
data
})
}
// 添加部门指标细则
export function newAddDepartDetails(data) {
return request({
url: '/department_pc/new_add_depart_details',
method: 'post',
data
})
}
// 编辑指标细则状态
export function editDetailsState(data) {
return request({
url: '/department_pc/edit_details_state',
method: 'post',
data
})
}
// 获取单一指标细则内容
export function getonedetailedtarget(data) {
return request({
url: '/department_pc/getonedetailedtarget',
method: 'post',
data
})
}
// 编辑单一指标细则内容(新版)
export function editDetailsCont(data) {
return request({
url: '/department_pc/edit_details_cont',
method: 'post',
data
})
}
//获取子栏目基础信息
export function getSonTargetCont(data) {
return request({
url: '/department_pc/getsontargetcont',
method: 'post',
data
})
}
//根据栏目添加细则
export function tableAddDetailses(data) {
return request({
url: '/department_pc/table_add_detailses',
method: 'post',
data
})
}
//修改栏目名称及关联岗位和提报人
export function editTableDepartMan(data) {
return request({
url: '/department_pc/edit_table_depart_man',
method: 'post',
data
})
}
// 根据指标和部门获取相关岗位
export function delsontarget(data) {
return request({
url: '/department_pc/delsontarget',
method: 'post',
data
})
}
// 根据指标获取岗位细则
export function getPostDetailsList(data) {
return request({
url: '/postpc/getdetailslist',
method: 'post',
data
})
}
// 获取岗位指标关联部门相关岗位及提报人(新版)
export function getNewTargetDepartPostMan(data) {
return request({
url: '/postpc/getnew_target_depart_postman',
method: 'post',
data
})
}
// 根据指标获取岗位指标栏目
export function tableBasePostTarget(data) {
return request({
url: '/postpc/table_base_post_target',
method: 'post',
data
})
}
// 根据指标提交岗位细则数据
export function addDetailsList(data) {
return request({
url: '/postpc/adddetailslist',
method: 'post',
data
})
}
// 编辑岗位指标细则状态
export function eidtPostTardetaiLsstrte(data) {
return request({
url: '/postpc/eidtposttardetailsstrte',
method: 'post',
data
})
}
// 获取岗位指标细则内容
export function getPostDetailsCont(data) {
return request({
url: '/postpc/getdetailscont',
method: 'post',
data
})
}
// 编辑岗位指标细则(新版)
export function editPostDetailscont(data) {
return request({
url: '/postpc/edit_post_detailscont',
method: 'post',
data
})
}
// 根据栏目添加细则列表
export function addTableDetailsList(data) {
return request({
url: '/postpc/addtabledetailslist',
method: 'post',
data
})
}
// 根据栏目添加细则列表
export function delSonTargetCont(data) {
return request({
url: '/postpc/del_son_target_cont',
method: 'post',
data
})
}
// 获取岗位栏目关联部门相关岗位及提报人(新版)
export function getNewTableDepartMan(data) {
return request({
url: '/postpc/get_new_table_departMan',
method: 'post',
data
})
}
// 编辑岗位子栏目内容(新版)
export function editNewsonTargetCont(data) {
return request({
url: '/postpc/edit_newson_target_cont',
method: 'post',
data
})
}

58
src/api/workflowapi/workflowaip.js

@ -0,0 +1,58 @@
import request from '@/utils/requestFile'
//获取流程数值
export const getShiyanData = (data) => {
return request({
url: '/workflowapi/shiyan_data',
method: 'post',
data: data
})
}
/**
* 获取角色
* @param {*} data
* @returns
*/
export const getRoles = (data) => {
return request({
url: '/workflowapi/shiyan_data',
method: 'post',
data: data
})
}
/**
* 获取部门
* @param {*} data
* @returns
*/
export const getDepartments = (data) => {
return request({
url: '/workflowapi/shiyan_data',
method: 'post',
data: data
})
}
/**
* 获取职员
* @param {*} data
* @returns
*/
export const getEmployees = (data) => {
return request({
url: '/workflowapi/shiyan_data',
method: 'post',
data: data
})
}
/**
* 获取条件字段
* @param {*} data
* @returns
*/
export const getConditions = (data) => {
return request({
url: '/workflowapi/shiyan_data',
method: 'post',
data: data
})
}

10
src/api/workflowapi/workflowhraip.js

@ -0,0 +1,10 @@
import request from '@/utils/request1'
//获取组织及成员
export const getOrgAndMan = (data) => {
return request({
url: '/org/basis_org_obtain_sonorg_and_man',
method: 'post',
data: data
})
}

BIN
src/assets/images/add-close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

BIN
src/assets/images/add-close1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
src/assets/images/cancel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

BIN
src/assets/images/check_box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

BIN
src/assets/images/icon_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

BIN
src/assets/images/icon_people.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/images/icon_role.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/jiaojiao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/images/list_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
src/assets/images/next_level.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

BIN
src/assets/images/next_level_active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

BIN
src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

235
src/components/addNode.vue

@ -0,0 +1,235 @@
<template>
<div class="add-node-btn-box">
<div class="add-node-btn">
<el-popover placement="right-start" v-model="visible">
<div class="add-node-popover-body">
<a class="add-node-popover-item approver" @click="addType(1)">
<div class="item-wrapper">
<span class="iconfont"></span>
</div>
<p>审批人</p>
</a>
<a class="add-node-popover-item notifier" @click="addType(2)">
<div class="item-wrapper">
<span class="iconfont"></span>
</div>
<p>抄送人</p>
</a>
<a class="add-node-popover-item condition" @click="addType(4)">
<div class="item-wrapper">
<span class="iconfont"></span>
</div>
<p>条件分支</p>
</a>
</div>
<button class="btn" type="button" slot="reference">
<span class="iconfont"></span>
</button>
</el-popover>
</div>
</div>
</template>
<script>
export default {
props: ["childNodeP"],
data() {
return {
visible: false
}
},
methods: {
addType(type) {
this.visible = false;
if (type != 4) {
var data;
if (type == 1) {
data = {
"nodeName": "审核人",
"error": true,
"type": 1,
"settype": 1,
"selectMode": 0,
"selectRange": 0,
"directorLevel": 1,
"examineMode": 1,
"noHanderAction": 1,
"examineEndDirectorLevel": 0,
"childNode": this.childNodeP,
"nodeUserList": []
}
} else if (type == 2) {
data = {
"nodeName": "抄送人",
"type": 2,
"ccSelfSelectFlag": 1,
"childNode": this.childNodeP,
"nodeUserList": []
}
}
this.$emit("update:childNodeP", data)
} else {
this.$emit("update:childNodeP", {
"nodeName": "路由",
"type": 4,
"childNode": null,
"conditionNodes": [{
"nodeName": "条件1",
"error": true,
"type": 3,
"priorityLevel": 1,
"conditionList": [],
"nodeUserList": [],
"childNode": this.childNodeP,
}, {
"nodeName": "条件2",
"type": 3,
"priorityLevel": 2,
"conditionList": [],
"nodeUserList": [],
"childNode": null
}]
})
}
}
}
}
</script>
<style scoped lang="less">
.add-node-btn-box {
width: 240px;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-ms-flex-negative: 0;
flex-shrink: 0;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
position: relative;
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
margin: auto;
width: 2px;
height: 100%;
background-color: #cacaca
}
.add-node-btn {
user-select: none;
width: 240px;
padding: 20px 0 32px;
display: flex;
-webkit-box-pack: center;
justify-content: center;
flex-shrink: 0;
-webkit-box-flex: 1;
flex-grow: 1;
.btn {
outline: none;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .1);
width: 30px;
height: 30px;
background: #3296fa;
border-radius: 50%;
position: relative;
border: none;
line-height: 30px;
-webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
transition: all .3s cubic-bezier(.645, .045, .355, 1);
.iconfont {
color: #fff;
font-size: 16px
}
&:hover {
transform: scale(1.3);
box-shadow: 0 13px 27px 0 rgba(0, 0, 0, .1)
}
&:active {
transform: none;
background: #1e83e9;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .1)
}
}
}
}
</style>
<style lang="less">
.add-node-popover-body {
display: flex;
.add-node-popover-item {
margin-right: 10px;
cursor: pointer;
text-align: center;
flex: 1;
color: #191f25 !important;
.item-wrapper {
user-select: none;
display: inline-block;
width: 80px;
height: 80px;
margin-bottom: 5px;
background: #fff;
border: 1px solid #e2e2e2;
border-radius: 50%;
transition: all .3s cubic-bezier(.645, .045, .355, 1);
.iconfont {
font-size: 35px;
line-height: 80px
}
}
&.approver {
.item-wrapper {
color: #ff943e
}
}
&.notifier {
.item-wrapper {
color: #3296fa
}
}
&.condition {
.item-wrapper {
color: #15bc83
}
}
&:hover {
.item-wrapper {
background: #3296fa;
box-shadow: 0 10px 20px 0 rgba(50, 150, 250, .4)
}
.iconfont {
color: #fff
}
}
&:active {
.item-wrapper {
box-shadow: none;
background: #eaeaea
}
.iconfont {
color: inherit
}
}
}
}
</style>

129
src/components/dialog/employeesDialog.vue

@ -0,0 +1,129 @@
<template>
<el-dialog title="选择成员" :visible.sync="visibleDialog" width="600px" append-to-body class="promoter_person">
<div class="person_body clear">
<el-row>
<el-col :span="12">
<div class="person_tree l">
<input type="text" placeholder="搜索成员" v-model="searchVal" @input="getDebounceData($event)">
<p class="ellipsis tree_nav" v-if="!searchVal">
<span @click="getDepartmentList(309)" class="ellipsis">全部</span>
<span v-for="(item,index) in departments.titleDepartments" class="ellipsis"
:key="index+'a'" @click="getDepartmentList(item.id)">{{item.departmentName}}</span>
</p>
<selectBox :list="list"/>
</div>
</el-col>
<el-col :span="12">
<selectResult :total="total" @del="delList" :list="resList"/>
</el-col>
</el-row>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:visible',false)"> </el-button>
<el-button type="primary" @click="saveDialog"> </el-button>
</span>
</el-dialog>
</template>
<script>
import selectBox from '../selectBox.vue';
import selectResult from '../selectResult.vue';
import mixins from './mixins'
export default {
components: { selectBox, selectResult },
mixins: [mixins],
props: ['visible', 'data', 'isDepartment'],
watch: {
visible(val) {
this.visibleDialog = this.visible
if (val) {
this.getDepartmentList();
this.searchVal = "";
if(this.data !== null){
this.checkedEmployessList = this.data.filter(item => item.type === 1).map(({ name, targetId }) => ({
employeeName: name,
id: targetId
}));
this.checkedDepartmentList = this.data.filter(item => item.type === 3).map(({ name, targetId }) => ({
departmentName: name,
id: targetId
}));
}
}
},
visibleDialog(val) {
this.$emit('update:visible', val)
}
},
computed: {
total() {
return this.checkedDepartmentList.length + this.checkedEmployessList.length
},
list() {
return [{
isDepartment: this.isDepartment,
type: 'department',
data: this.departments.childDepartments,
isActive: (item) => this.$func.toggleClass(this.checkedDepartmentList, item),
change: (item) => this.$func.toChecked(this.checkedDepartmentList, item),
next: (item) => this.getDepartmentList(item.id)
}, {
type: 'employee',
data: this.departments.employees,
isActive: (item) => this.$func.toggleClass(this.checkedEmployessList, item),
change: (item) => this.$func.toChecked(this.checkedEmployessList, item),
}]
},
resList() {
let data = [{
type: 'employee',
data: this.checkedEmployessList,
cancel: (item) => this.$func.removeEle(this.checkedEmployessList, item)
}]
if (this.isDepartment) {
data.unshift({
type: 'department',
data: this.checkedDepartmentList,
cancel: (item) => this.$func.removeEle(this.checkedDepartmentList, item)
})
}
return data
}
},
data() {
return {
checkedDepartmentList: [],
checkedEmployessList: [],
}
},
methods: {
saveDialog() {
let checkedList = [...this.checkedDepartmentList, ...this.checkedEmployessList].map(item => ({
type: item.employeeName ? 1 : 3,
targetId: item.id,
name: item.employeeName || item.departmentName
}))
this.$emit('change', checkedList)
},
delList() {
this.checkedDepartmentList = [];
this.checkedEmployessList = []
}
}
}
</script>
<style>
@import "../../css/dialog.css";
</style>

146
src/components/dialog/employeesRoleDialog.vue

@ -0,0 +1,146 @@
<template>
<el-dialog title="选择成员" :visible.sync="visibleDialog" width="600px" append-to-body class="promoter_person">
<div class="person_body clear">
<div class="person_tree l">
<input type="text" placeholder="搜索成员" v-model="searchVal" @input="getDebounceData($event,activeName)">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="组织架构" name="1"></el-tab-pane>
<el-tab-pane label="角色列表" name="2"></el-tab-pane>
</el-tabs>
<p class="ellipsis tree_nav" v-if="activeName==1&&!searchVal">
<span @click="getDepartmentList(0)" class="ellipsis">天下</span>
<span v-for="(item,index) in departments.titleDepartments" class="ellipsis"
:key="index+'a'" @click="getDepartmentList(item.id)">{{item.departmentName}}</span>
</p>
<selectBox :list="list" style="height: 360px;"/>
</div>
<selectResult :total="total" @del="delList" :list="resList"/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:visible',false)"> </el-button>
<el-button type="primary" @click="saveDialog"> </el-button>
</span>
</el-dialog>
</template>
<script>
import selectBox from '../selectBox.vue';
import selectResult from '../selectResult.vue';
import mixins from './mixins'
export default {
components: { selectBox, selectResult },
mixins: [mixins],
props: ['visible', 'data', 'isDepartment'],
watch: {
visible(val) {
this.visibleDialog = this.visible
if (val) {
this.activeName = "1";
this.getDepartmentList();
this.searchVal = "";
if(this.data !== null) {
this.checkedEmployessList = this.data.filter(item => item.type === 1).map(({ name, targetId }) => ({
employeeName: name,
id: targetId
}));
this.checkedRoleList = this.data.filter(item => item.type === 2).map(({ name, targetId }) => ({
roleName: name,
roleId: targetId
}));
this.checkedDepartmentList = this.data.filter(item => item.type === 3).map(({ name, targetId }) => ({
departmentName: name,
id: targetId
}));
}
}
},
visibleDialog(val) {
this.$emit('update:visible', val)
}
},
computed: {
total() {
return this.checkedEmployessList.length + this.checkedRoleList.length + this.checkedDepartmentList.length
},
list() {
if (this.activeName === '2') {
return [{
type: 'role',
not: false,
data: this.roles,
isActiveItem: (item) => this.$func.toggleClass(this.checkedRoleList, item, 'roleId'),
change: (item) => this.$func.toChecked(this.checkedRoleList, item, 'roleId')
}]
} else {
return [{
isDepartment: this.isDepartment,
type: 'department',
data: this.departments.childDepartments,
isActive: (item) => this.$func.toggleClass(this.checkedDepartmentList, item),
change: (item) => this.$func.toChecked(this.checkedDepartmentList, item),
next: (item) => this.getDepartmentList(item.id)
}, {
type: 'employee',
data: this.departments.employees,
isActive: (item) => this.$func.toggleClass(this.checkedEmployessList, item),
change: (item) => this.$func.toChecked(this.checkedEmployessList, item),
}]
}
},
resList() {
let data = [{
type: 'role',
data: this.checkedRoleList,
cancel: (item) => this.$func.removeEle(this.checkedRoleList, item, 'roleId')
}, {
type: 'employee',
data: this.checkedEmployessList,
cancel: (item) => this.$func.removeEle(this.checkedEmployessList, item)
}]
if (this.isDepartment) {
data.splice(1, 0, {
type: 'department',
data: this.checkedDepartmentList,
cancel: (item) => this.$func.removeEle(this.checkedDepartmentList, item)
})
}
return data
}
},
data() {
return {
checkedRoleList: [],
checkedEmployessList: [],
checkedDepartmentList: []
}
},
methods: {
handleClick() {
this.searchVal = "";
this.conditionRoleSearchName = "";
if (this.activeName == 1) {
this.getDepartmentList();
} else {
this.getRoleList();
}
},
saveDialog() {
let checkedList = [...this.checkedRoleList, ...this.checkedEmployessList, ...this.checkedDepartmentList].map(item => ({
type: item.employeeName ? 1 : (item.roleName ? 2 : 3),
targetId: item.id || item.roleId,
name: item.employeeName || item.roleName || item.departmentName
}))
this.$emit('change', checkedList)
},
delList() {
this.checkedEmployessList = [];
this.checkedRoleList = [];
this.checkedDepartmentList = []
}
}
}
</script>
<style>
@import "../../css/dialog.css";
</style>

72
src/components/dialog/errorDialog.vue

@ -0,0 +1,72 @@
<!--
* @Date: 2022-08-04 16:29:35
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:16:58
* @FilePath: /Workflow/src/components/dialog/errorDialog.vue
-->
<template>
<el-dialog title="提示" :visible.sync="visibleDialog">
<div class="ant-confirm-body">
<i class="anticon anticon-close-circle" style="color: #f00;"></i>
<span class="ant-confirm-title">当前无法发布</span>
<div class="ant-confirm-content">
<div>
<p class="error-modal-desc">以下内容不完善需进行修改</p>
<div class="error-modal-list">
<div class="error-modal-item" v-for="(item,index) in list" :key="index">
<div class="error-modal-item-label">流程设计</div>
<div class="error-modal-item-content">{{item.name}} 未选择{{item.type}}</div>
</div>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="visibleDialog = false">我知道了</el-button>
<el-button type="primary" @click="visibleDialog = false">前往修改</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: ["list", "visible"],
data() {
return {
visibleDialog: false,
}
},
watch: {
visible(val) {
this.visibleDialog = val
},
visibleDialog(val) {
this.$emit('update:visible', val)
}
}
}
</script>
<style scoped>
.ant-confirm-body .ant-confirm-title {
color: rgba(0, 0, 0, .85);
font-weight: 500;
font-size: 16px;
line-height: 1.4;
display: block;
overflow: hidden
}
.ant-confirm-body .ant-confirm-content {
margin-left: 38px;
font-size: 14px;
color: rgba(0, 0, 0, .65);
margin-top: 8px
}
.ant-confirm-body>.anticon {
font-size: 22px;
margin-right: 16px;
float: left
}
</style>

48
src/components/dialog/mixins.js

@ -0,0 +1,48 @@
import { getRoles, getDepartments, getEmployees } from "@/api/workflowapi/workflowaip"
import { getOrgAndMan } from "@/api/workflowapi/workflowhraip"
export default {
data() {
return {
visibleDialog: false,
searchVal: "",
activeName: "1",
departments: {},
roles: [],
}
},
methods: {
async getRoleList() {
let { data: { list } } = await getRoles()
this.roles = list;
},
async getDepartmentList(parentId = 309) {
let sendForm = {
id:parentId.toString()
}
let { data } = await getOrgAndMan(sendForm)
console.log("获取人员信息------->",data)
this.departments = data;
},
getDebounceData(event, type = 1) {
this.$func.debounce(async function () {
if (event.target.value) {
let data = {
searchName: event.target.value,
pageNum: 1,
pageSize: 30
}
if (type == 1) {
this.departments.childDepartments = [];
let res = await getEmployees(data)
this.departments.employees = res.data.list
} else {
let res = await getRoles(data)
this.roles = res.data.list
}
} else {
type == 1 ? await this.getDepartmentList() : await this.getRoleList();
}
}.bind(this))()
},
}
}

92
src/components/dialog/roleDialog.vue

@ -0,0 +1,92 @@
<!--
* @Date: 2022-08-04 16:29:35
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:25:18
* @FilePath: /Workflow/src/components/dialog/roleDialog.vue
-->
<template>
<el-dialog title="选择角色" :visible.sync="visibleDialog" width="600px" append-to-body class="promoter_person">
<div class="person_body clear">
<div class="person_tree l">
<input type="text" placeholder="搜索角色" v-model="searchVal" @input="getDebounceData($event,2)">
<selectBox :list="list" />
</div>
<selectResult :total="total" @del="delList" :list="resList"/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:visible',false)"> </el-button>
<el-button type="primary" @click="saveDialog"> </el-button>
</span>
</el-dialog>
</template>
<script>
import selectBox from '../selectBox.vue';
import selectResult from '../selectResult.vue';
import mixins from './mixins'
export default {
components: { selectBox, selectResult },
mixins: [mixins],
props: ['visible', 'data'],
watch: {
visible(val) {
this.visibleDialog = this.visible
if (val) {
this.getRoleList();
this.searchVal = "";
this.checkedRoleList = this.data.map(({ name, targetId }) => ({
roleName: name,
roleId: targetId
}));
}
},
visibleDialog(val) {
this.$emit('update:visible', val)
}
},
computed: {
total() {
return this.checkedRoleList.length
},
list() {
return [{
type: 'role',
not: true,
data: this.roles,
isActive: (item) => this.$func.toggleClass(this.checkedRoleList, item, 'roleId'),
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
change: (item) => this.checkedRoleList = [item]
}]
},
resList() {
return [{
type: 'role',
data: this.checkedRoleList,
cancel: (item) => this.$func.removeEle(this.checkedRoleList, item, 'roleId')
}]
}
},
data() {
return {
checkedRoleList: [],
}
},
methods: {
saveDialog() {
let checkedList = this.checkedRoleList.map(item => ({
type: 2,
targetId: item.roleId,
name: item.roleName
}))
this.$emit('change', checkedList)
},
delList() {
this.checkedRoleList = [];
}
}
}
</script>
<style>
@import "../../css/dialog.css";
</style>

234
src/components/drawer/approverDrawer.vue

@ -0,0 +1,234 @@
<template>
<el-drawer :append-to-body="true" title="审批人设置" :visible.sync="approverDrawer" direction="rtl" class="set_promoter" size="550px" :before-close="saveApprover">
<div class="demo-drawer__content">
<div class="drawer_content">
<div class="approver_content">
<el-radio-group v-model="approverConfig.settype" class="clear" @change="changeType">
<el-radio :label="1">指定成员</el-radio>
<el-radio :label="2">负责人</el-radio>
<el-radio :label="4">发起人自选</el-radio>
<el-radio :label="5">发起人自己</el-radio>
<el-radio :label="7">连续多负责人</el-radio>
</el-radio-group>
<el-button type="primary" @click="addApprover" v-if="approverConfig.settype==1">添加/修改成员</el-button>
<p class="selected_list" v-if="approverConfig.settype==1">
<span v-for="(item,index) in approverConfig.nodeUserList" :key="index">{{item.name}}
<img src="@/assets/images/add-close1.png" @click="$func.removeEle(approverConfig.nodeUserList,item,'targetId')">
</span>
<a v-if="approverConfig.nodeUserList.length!=0" @click="approverConfig.nodeUserList=[]">清除</a>
</p>
</div>
<div class="approver_manager" v-if="approverConfig.settype==2">
<p>
<span>发起人的</span>
<select v-model="approverConfig.directorLevel">
<option v-for="item in directorMaxLevel" :value="item" :key="item">{{item==1?'直接':''+item+''}}负责人</option>
</select>
</p>
<p class="tip">找不到负责人时由上级负责人代审批</p>
</div>
<div class="approver_self" v-if="approverConfig.settype==5">
<p>该审批节点设置发起人自己审批人默认为发起人</p>
</div>
<div class="approver_self_select" v-show="approverConfig.settype==4">
<el-radio-group v-model="approverConfig.selectMode" style="width: 100%;">
<el-radio :label="1">选一个人</el-radio>
<el-radio :label="2">选多个人</el-radio>
</el-radio-group>
<h3>选择范围</h3>
<el-radio-group v-model="approverConfig.selectRange" style="width: 100%;" @change="changeRange">
<el-radio :label="1">全公司</el-radio>
<el-radio :label="2">指定成员</el-radio>
<el-radio :label="3">指定角色</el-radio>
</el-radio-group>
<el-button type="primary" size="mini" @click="addApprover" v-if="approverConfig.selectRange==2">添加/修改成员</el-button>
<el-button type="primary" size="mini" @click="addRoleApprover" v-if="approverConfig.selectRange==3">添加/修改角色</el-button>
<p class="selected_list" v-if="approverConfig.selectRange==2||approverConfig.selectRange==3">
<span v-for="(item,index) in approverConfig.nodeUserList" :key="index">{{item.name}}
<img src="@/assets/images/add-close1.png" @click="$func.removeEle(approverConfig.nodeUserList,item,'targetId')">
</span>
<a v-if="approverConfig.nodeUserList.length!=0&&approverConfig.selectRange!=1" @click="approverConfig.nodeUserList=[]">清除</a>
</p>
</div>
<div class="approver_manager" v-if="approverConfig.settype==7">
<p>审批终点</p>
<p style="padding-bottom:20px">
<span>发起人的</span>
<select v-model="approverConfig.examineEndDirectorLevel">
<option v-for="item in directorMaxLevel" :value="item" :key="item">{{item==1?'最高':''+item}}层级负责人</option>
</select>
</p>
</div>
<div class="approver_some" v-if="(approverConfig.settype==1&&approverConfig.nodeUserList.length>1)||approverConfig.settype==2||(approverConfig.settype==4&&approverConfig.selectMode==2)">
<p>多人审批时采用的审批方式</p>
<el-radio-group v-model="approverConfig.examineMode" class="clear">
<el-radio :label="1">依次审批</el-radio>
<br/>
<el-radio :label="2" v-if="approverConfig.settype!=2">会签(须所有审批人同意)</el-radio>
</el-radio-group>
</div>
<div class="approver_some" v-if="approverConfig.settype==2||approverConfig.settype==7">
<p>审批人为空时</p>
<el-radio-group v-model="approverConfig.noHanderAction" class="clear">
<el-radio :label="1">自动审批通过/不允许发起</el-radio>
<br/>
<el-radio :label="2">转交给审核管理员</el-radio>
</el-radio-group>
</div>
</div>
<div class="demo-drawer__footer clear">
<el-button type="primary" @click="saveApprover"> </el-button>
<el-button @click="closeDrawer"> </el-button>
</div>
<employees-dialog
:visible.sync="approverVisible"
:data.sync="checkedList"
@change="sureApprover"
/>
<role-dialog
:visible.sync="approverRoleVisible"
:data.sync="checkedRoleList"
@change="sureRoleApprover"
/>
</div>
</el-drawer>
</template>
<script>
import employeesDialog from '../dialog/employeesDialog.vue'
import roleDialog from '../dialog/roleDialog.vue'
import { mapState, mapMutations } from 'vuex'
export default {
components: { employeesDialog, roleDialog },
props: ['directorMaxLevel'],
data() {
return {
approverConfig: {},
approverVisible: false,
approverRoleVisible: false,
approverEmplyessList: [],
checkedRoleList: [],
checkedList: []
}
},
computed: {
...mapState(['approverConfig1', 'approverDrawer']),
},
watch: {
approverConfig1(val) {
this.approverConfig = val.value;
}
},
methods: {
...mapMutations(['setApproverConfig', 'setApprover']),
changeRange() {
this.approverConfig.nodeUserList = [];
},
changeType(val) {
this.approverConfig.nodeUserList = [];
this.approverConfig.examineMode = 1;
this.approverConfig.noHanderAction = 2;
if (val == 2) {
this.approverConfig.directorLevel = 1;
} else if (val == 4) {
this.approverConfig.selectMode = 1;
this.approverConfig.selectRange = 1;
} else if (val == 7) {
this.approverConfig.examineEndDirectorLevel = 1
}
},
addApprover() {
this.approverVisible = true;
this.checkedList = this.approverConfig.nodeUserList
},
addRoleApprover() {
this.approverRoleVisible = true;
this.checkedRoleList = this.approverConfig.nodeUserList
},
sureApprover(data) {
this.approverConfig.nodeUserList = data;
this.approverVisible = false;
},
sureRoleApprover(data) {
this.approverConfig.nodeUserList = data;
this.approverRoleVisible = false;
},
saveApprover() {
this.approverConfig.error = !this.$func.setApproverStr(this.approverConfig)
this.setApproverConfig({
value: this.approverConfig,
flag: true,
id: this.approverConfig1.id
})
this.$emit("update:nodeConfig", this.approverConfig);
this.closeDrawer()
},
closeDrawer() {
this.setApprover(false)
}
}
}
</script>
<style lang="less">
.set_promoter {
.approver_content {
padding-bottom: 10px;
border-bottom: 1px solid #f2f2f2;
}
.approver_self_select .el-button,
.approver_content .el-button {
margin-bottom: 20px;
}
.approver_content .el-radio,
.approver_some .el-radio,
.approver_self_select .el-radio {
width: 27%;
margin-bottom: 20px;
}
.approver_manager p {
line-height: 32px;
}
.approver_manager select {
width: 420px;
height: 32px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
border: 1px solid rgba(217, 217, 217, 1);
}
.approver_manager p.tip {
margin: 10px 0 22px 0;
font-size: 12px;
line-height: 16px;
color: #f8642d;
}
.approver_self {
padding: 28px 20px;
}
.approver_self_select,
.approver_manager,
.approver_content,
.approver_some {
padding: 20px 20px 0;
}
.approver_manager p:first-of-type,
.approver_some p {
line-height: 19px;
font-size: 14px;
margin-bottom: 14px;
}
.approver_self_select h3 {
margin: 5px 0 20px;
font-size: 14px;
font-weight: bold;
line-height: 19px;
}
}
</style>

362
src/components/drawer/conditionDrawer.vue

@ -0,0 +1,362 @@
<template>
<el-drawer :append-to-body="true" title="条件设置" :visible.sync="conditionDrawer" direction="rtl" class="condition_copyer" size="550px" :before-close="saveCondition">
<select v-model="conditionConfig.priorityLevel" class="priority_level">
<option v-for="item in conditionsConfig.conditionNodes.length" :value="item" :key="item">优先级{{item}}</option>
</select>
<div class="demo-drawer__content">
<div class="condition_content drawer_content">
<p class="tip">当审批单同时满足以下条件时进入此流程</p>
<ul>
<li v-for="(item,index) in conditionConfig.conditionList" :key="index">
<span class="ellipsis">{{item.type==1?'发起人':item.showName}}</span>
<div v-if="item.type==1">
<p :class="conditionConfig.nodeUserList.length > 0?'selected_list':''" @click.self="addConditionRole" style="cursor:text">
<span v-for="(item1,index1) in conditionConfig.nodeUserList" :key="index1">
{{item1.name}}<img src="@/assets/images/add-close1.png" @click="$func.removeEle(conditionConfig.nodeUserList,item1,'targetId')">
</span>
<input type="text" placeholder="请选择具体人员/角色/部门" v-if="conditionConfig.nodeUserList.length == 0" @click="addConditionRole">
</p>
</div>
<div v-else-if="item.columnType == 'String' && item.showType == 'checkBox'">
<p class="check_box">
<a :class="$func.toggleStrClass(item,item1.key)&&'active'" @click="toStrChecked(item,item1.key)"
v-for="(item1,index1) in JSON.parse(item.fixedDownBoxValue)" :key="index1">{{item1.value}}</a>
</p>
</div>
<div v-else>
<p>
<select v-model="item.optType" :style="'width:'+(item.optType==6?370:100)+'px'" @change="changeOptType(item)">
<option value="1">小于</option>
<option value="2">大于</option>
<option value="3">小于等于</option>
<option value="4">等于</option>
<option value="5">大于等于</option>
<option value="6">介于两个数之间</option>
</select>
<input v-if="item.optType!=6" type="text" :placeholder="'请输入'+item.showName" v-enter-number="2" v-model="item.zdy1">
</p>
<p v-if="item.optType==6">
<input type="text" style="width:75px;" class="mr_10" v-enter-number="2" v-model="item.zdy1">
<select style="width:60px;" v-model="item.opt1">
<option value="<">&lt;</option>
<option value="≤"></option>
</select>
<span class="ellipsis" style="display:inline-block;width:60px;vertical-align: text-bottom;">{{item.showName}}</span>
<select style="width:60px;" class="ml_10" v-model="item.opt2">
<option value="<">&lt;</option>
<option value="≤"></option>
</select>
<input type="text" style="width:75px;" v-enter-number="2" v-model="item.zdy2">
</p>
</div>
<a v-if="item.type==1" @click="conditionConfig.nodeUserList= [];$func.removeEle(conditionConfig.conditionList,item,'columnId')">删除</a>
<a v-if="item.type==2" @click="$func.removeEle(conditionConfig.conditionList,item,'columnId')">删除</a>
</li>
</ul>
<el-button type="primary" @click="addCondition">添加条件</el-button>
<el-dialog title="选择条件" :visible.sync="conditionVisible" width="480px" append-to-body class="condition_list">
<p>请选择用来区分审批流程的条件字段</p>
<p class="check_box">
<a :class="$func.toggleClass(conditionList,{columnId:0},'columnId')&&'active'" @click="$func.toChecked(conditionList,{columnId:0},'columnId')">发起人</a>
<a v-for="(item,index) in conditions" :key="index" :class="$func.toggleClass(conditionList,item,'columnId')&&'active'"
@click="$func.toChecked(conditionList,item,'columnId')">{{item.showName}}</a>
</p>
<span slot="footer" class="dialog-footer">
<el-button @click="conditionVisible = false"> </el-button>
<el-button type="primary" @click="sureCondition"> </el-button>
</span>
</el-dialog>
</div>
<employees-role-dialog
:visible.sync="conditionRoleVisible"
:data.sync="checkedList"
@change="sureConditionRole"
:isDepartment="true"
/>
<div class="demo-drawer__footer clear">
<el-button type="primary" @click="saveCondition"> </el-button>
<el-button @click="setCondition(false)"> </el-button>
</div>
</div>
</el-drawer>
</template>
<script>
import { mapState, mapMutations } from 'vuex'
import employeesRoleDialog from '../dialog/employeesRoleDialog.vue'
// import { getConditions } from '@/plugins/api.js'
import { getConditions } from "@/api/workflowapi/workflowaip"
export default {
components: {
employeesRoleDialog
},
data() {
return {
conditionVisible: false,
conditionsConfig: {
conditionNodes: [],
},
conditionConfig: {},
PriorityLevel: "",
conditions: [],
conditionList: [],
checkedList: [],
conditionRoleVisible: false,
}
},
computed: {
...mapState(['tableId', 'conditionsConfig1', 'conditionDrawer']),
},
watch: {
conditionsConfig1(val) {
this.conditionsConfig = val.value;
this.PriorityLevel = val.priorityLevel
this.conditionConfig = val.priorityLevel
? this.conditionsConfig.conditionNodes[val.priorityLevel - 1]
: { nodeUserList: [], conditionList: [] }
},
},
methods: {
...mapMutations(['setCondition', 'setConditionsConfig']),
changeOptType(item) {
if (item.optType == 1) {
item.zdy1 = 2;
} else {
item.zdy1 = 1;
item.zdy2 = 2;
}
},
toStrChecked(item, key) {
let a = item.zdy1 ? item.zdy1.split(",") : []
var isIncludes = this.$func.toggleStrClass(item, key);
if (!isIncludes) {
a.push(key)
item.zdy1 = a.toString()
} else {
this.removeStrEle(item, key);
}
},
removeStrEle(item, key) {
let a = item.zdy1 ? item.zdy1.split(",") : []
var includesIndex;
a.map((item, index) => {
if (item == key) {
includesIndex = index
}
});
a.splice(includesIndex, 1);
item.zdy1 = a.toString()
},
async addCondition() {
this.conditionList = [];
this.conditionVisible = true;
let { data } = await getConditions({ tableId: this.tableId })
this.conditions = data;
if (this.conditionConfig.conditionList) {
for (var i = 0; i < this.conditionConfig.conditionList.length; i++) {
var { columnId } = this.conditionConfig.conditionList[i]
if (columnId == 0) {
this.conditionList.push({ columnId: 0 })
} else {
this.conditionList.push(this.conditions.filter(item => item.columnId == columnId)[0])
}
}
}
},
sureCondition() {
//1.+
//2.
for (var i = 0; i < this.conditionList.length; i++) {
var { columnId, showName, columnName, showType, columnType, fixedDownBoxValue } = this.conditionList[i];
if (this.$func.toggleClass(this.conditionConfig.conditionList, this.conditionList[i], "columnId")) {
continue;
}
if (columnId == 0) {
this.conditionConfig.nodeUserList == [];
this.conditionConfig.conditionList.push({
"type": 1,
columnId,
"showName": '发起人'
});
} else {
if (columnType == "Double") {
this.conditionConfig.conditionList.push({
showType,
columnId,
"type": 2,
showName,
"optType": "1",
"zdy1": "2",
"opt1": "<",
"zdy2": "",
"opt2": "<",
"columnDbname": columnName,
columnType,
})
} else if (columnType == "String" && showType == "checkBox") {
this.conditionConfig.conditionList.push({
showType,
columnId,
"type": 2,
showName,
"zdy1": "",
"columnDbname": columnName,
columnType,
fixedDownBoxValue
})
}
}
}
//3.-
for (let i = this.conditionConfig.conditionList.length - 1; i >= 0; i--) {
if (!this.$func.toggleClass(this.conditionList, this.conditionConfig.conditionList[i], "columnId")) {
this.conditionConfig.conditionList.splice(i, 1);
}
}
this.conditionConfig.conditionList.sort(function (a, b) { return a.columnId - b.columnId; });
this.conditionVisible = false;
},
saveCondition() {
this.setCondition(false)
var a = this.conditionsConfig.conditionNodes.splice(this.PriorityLevel - 1, 1)//
this.conditionsConfig.conditionNodes.splice(this.conditionConfig.priorityLevel - 1, 0, a[0])//
this.conditionsConfig.conditionNodes.map((item, index) => {
item.priorityLevel = index + 1
});
for (var i = 0; i < this.conditionsConfig.conditionNodes.length; i++) {
this.conditionsConfig.conditionNodes[i].error = this.$func.conditionStr(this.conditionsConfig, i) == "请设置条件" && i != this.conditionsConfig.conditionNodes.length - 1
}
this.setConditionsConfig({
value: this.conditionsConfig,
flag: true,
id: this.conditionsConfig1.id
})
},
addConditionRole() {
this.conditionRoleVisible = true;
this.checkedList = this.conditionConfig.nodeUserList
},
sureConditionRole(data) {
this.conditionConfig.nodeUserList = data;
this.conditionRoleVisible = false;
},
}
}
</script>
<style lang="less">
.condition_copyer {
.el-drawer__body {
.priority_level {
position: absolute;
top: 11px;
right: 30px;
width: 100px;
height: 32px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
border: 1px solid rgba(217, 217, 217, 1);
}
}
.condition_content {
padding: 20px 20px 0;
p.tip {
margin: 20px 0;
width: 510px;
text-indent: 17px;
line-height: 45px;
background: rgba(241, 249, 255, 1);
border: 1px solid rgba(64, 163, 247, 1);
color: #46a6fe;
font-size: 14px;
}
ul {
max-height: 500px;
overflow-y: scroll;
margin-bottom: 20px;
li {
&>span {
float: left;
margin-right: 8px;
width: 70px;
line-height: 32px;
text-align: right;
}
&>div {
display: inline-block;
width: 370px;
&>p:not(:last-child) {
margin-bottom: 10px;
}
}
&:not(:last-child)>div>p {
margin-bottom: 20px;
}
&>a {
float: right;
margin-right: 10px;
margin-top: 7px;
}
select,
input {
width: 100%;
height: 32px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
border: 1px solid rgba(217, 217, 217, 1);
}
select+input {
width: 260px;
}
select {
margin-right: 10px;
width: 100px;
}
p.selected_list {
padding-left: 10px;
border-radius: 4px;
min-height: 32px;
border: 1px solid rgba(217, 217, 217, 1);
word-break: break-word;
}
p.check_box {
line-height: 32px;
}
}
}
.el-button {
margin-bottom: 20px;
}
}
}
.condition_list {
.el-dialog__body {
padding: 16px 26px;
}
p {
color: #666666;
margin-bottom: 10px;
&>.check_box {
margin-bottom: 0;
line-height: 36px;
}
}
}
</style>

99
src/components/drawer/copyerDrawer.vue

@ -0,0 +1,99 @@
<!--
* @Date: 2022-08-04 16:29:35
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 14:14:32
* @FilePath: /Workflow/src/components/drawer/copyerDrawer.vue
-->
<template>
<el-drawer :append-to-body="true" title="抄送人设置" :visible.sync="copyerDrawer" direction="rtl" class="set_copyer" size="550px" :before-close="saveCopyer">
<div class="demo-drawer__content">
<div class="copyer_content drawer_content">
<el-button type="primary" @click="addCopyer">添加成员</el-button>
<p class="selected_list">
<span v-for="(item,index) in copyerConfig.nodeUserList" :key="index">{{item.name}}
<img src="@/assets/images/add-close1.png" @click="$func.removeEle(copyerConfig.nodeUserList,item,'targetId')">
</span>
<a v-if="copyerConfig.nodeUserList&&copyerConfig.nodeUserList.length!=0" @click="copyerConfig.nodeUserList=[]">清除</a>
</p>
<el-checkbox-group v-model="ccSelfSelectFlag" class="clear">
<el-checkbox :label="1">允许发起人自选抄送人</el-checkbox>
</el-checkbox-group>
</div>
<div class="demo-drawer__footer clear">
<el-button type="primary" @click="saveCopyer"> </el-button>
<el-button @click="closeDrawer"> </el-button>
</div>
<employees-role-dialog
:visible.sync="copyerVisible"
:data.sync="checkedList"
@change="sureCopyer"
/>
</div>
</el-drawer>
</template>
<script>
import employeesRoleDialog from '../dialog/employeesRoleDialog.vue'
import { mapState, mapMutations } from 'vuex'
export default {
components: {
employeesRoleDialog
},
data() {
return {
copyerConfig: {},
ccSelfSelectFlag: [],
copyerVisible: false,
checkedList: [],
}
},
computed: {
...mapState(['copyerDrawer', 'copyerConfig1']),
},
watch: {
copyerConfig1(val) {
this.copyerConfig = val.value;
this.ccSelfSelectFlag = this.copyerConfig.ccSelfSelectFlag == 0 ? [] : [this.copyerConfig.ccSelfSelectFlag]
}
},
methods: {
...mapMutations(['setCopyerConfig', 'setCopyer']),
addCopyer() {
this.copyerVisible = true;
this.checkedList = this.copyerConfig.nodeUserList
},
sureCopyer(data) {
this.copyerConfig.nodeUserList = data;
this.copyerVisible = false;
},
saveCopyer() {
this.copyerConfig.ccSelfSelectFlag = this.ccSelfSelectFlag.length == 0 ? 0 : 1;
this.copyerConfig.error = !this.$func.copyerStr(this.copyerConfig);
this.setCopyerConfig({
value: this.copyerConfig,
flag: true,
id: this.copyerConfig1.id
})
this.closeDrawer();
},
closeDrawer() {
this.setCopyer(false)
},
}
}
</script>
<style lang="less">
.set_copyer {
.copyer_content {
padding: 20px 20px 0;
.el-button {
margin-bottom: 20px;
}
.el-checkbox {
margin-bottom: 20px;
}
}
}
</style>

89
src/components/drawer/promoterDrawer.vue

@ -0,0 +1,89 @@
<!--
* @Date: 2022-08-04 16:29:35
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:17:15
* @FilePath: /Workflow/src/components/drawer/promoterDrawer.vue
-->
<template>
<el-drawer :append-to-body="true" title="发起人" :visible.sync="promoterDrawer" direction="rtl" class="set_promoter" size="550px" :before-close="savePromoter">
<div class="demo-drawer__content">
<div class="promoter_content drawer_content">
<p>{{$func.arrToStr(flowPermission)?$func.arrToStr(flowPermission):'所有人'}}</p>
<el-button type="primary" @click="addPromoter">添加/修改发起人</el-button>
</div>
<div class="demo-drawer__footer clear">
<el-button type="primary" @click="savePromoter"> </el-button>
<el-button @click="closeDrawer"> </el-button>
</div>
<employees-dialog
:isDepartment="true"
:visible.sync="promoterVisible"
:data.sync="checkedList"
@change="surePromoter"
/>
</div>
</el-drawer>
</template>
<script>
import employeesDialog from '../dialog/employeesDialog.vue'
import { mapState, mapMutations } from 'vuex'
export default {
components: { employeesDialog },
data() {
return {
flowPermission: [],
promoterVisible: false,
checkedList: [],
}
},
computed: {
...mapState(['promoterDrawer', 'flowPermission1']),
},
watch: {
flowPermission1(val) {
this.flowPermission = val.value
}
},
methods: {
...mapMutations(['setPromoter', 'setFlowPermission']),
addPromoter() {
this.checkedList = this.flowPermission
this.promoterVisible = true;
},
surePromoter(data) {
this.flowPermission = data;
this.promoterVisible = false;
},
savePromoter() {
this.setFlowPermission({
value: this.flowPermission,
flag: true,
id: this.flowPermission1.id
})
this.closeDrawer()
},
closeDrawer() {
this.setPromoter(false)
}
}
}
</script>
<style lang="less" >
.set_promoter {
.promoter_content {
padding: 0 20px;
.el-button {
margin-bottom: 20px;
}
p {
padding: 18px 0;
font-size: 14px;
line-height: 20px;
color: #000000;
}
}
}
</style>

296
src/components/nodeWrap.vue

@ -0,0 +1,296 @@
<template>
<div>
<div class="node-wrap" v-if="nodeConfig.type<3">
<div class="node-wrap-box" :class="(nodeConfig.type==0?'start-node ':'')+(isTried&&nodeConfig.error?'active error':'')">
<div>
<div class="title" :style="`background: rgb(${bgColor});`">
<span v-if="nodeConfig.type==0">{{nodeConfig.nodeName}}</span>
<template v-else>
<span class="iconfont">{{nodeConfig.type==1?'':''}}</span>
<input type="text"
v-if="isInput"
class="ant-input editable-title-input"
@blur="blurEvent()"
@focus="$event.currentTarget.select()"
v-focus
v-model="nodeConfig.nodeName"
:placeholder="defaultText"
>
<span v-else class="editable-title" @click="clickEvent()">{{nodeConfig.nodeName}}</span>
<i class="anticon anticon-close close" @click="delNode"></i>
</template>
</div>
<div class="content" @click="setPerson">
<div class="text">
<span class="placeholder" v-if="!showText">请选择{{defaultText}}</span>
{{showText}}
</div>
<i class="anticon anticon-right arrow"></i>
</div>
<div class="error_tip" v-if="isTried&&nodeConfig.error">
<i class="anticon anticon-exclamation-circle"></i>
</div>
</div>
</div>
<addNode :childNodeP.sync="nodeConfig.childNode"></addNode>
</div>
<div class="branch-wrap" v-if="nodeConfig.type==4">
<div class="branch-box-wrap">
<div class="branch-box">
<button class="add-branch" @click="addTerm">添加条件</button>
<div class="col-box" v-for="(item,index) in nodeConfig.conditionNodes" :key="index">
<div class="condition-node">
<div class="condition-node-box">
<div class="auto-judge" :class="isTried&&item.error?'error active':''">
<div class="sort-left" v-if="index!=0" @click="arrTransfer(index,-1)">&lt;</div>
<div class="title-wrapper">
<input
v-if="isInputList[index]"
type="text"
class="ant-input editable-title-input"
@blur="blurEvent(index)"
@focus="$event.currentTarget.select()"
v-focus v-model="item.nodeName"
>
<span v-else class="editable-title" @click="clickEvent(index)">{{item.nodeName}}</span>
<span class="priority-title" @click="setPerson(item.priorityLevel)">优先级{{item.priorityLevel}}</span>
<i class="anticon anticon-close close" @click="delTerm(index)"></i>
</div>
<div class="sort-right" v-if="index!=nodeConfig.conditionNodes.length-1" @click="arrTransfer(index)">&gt;</div>
<div class="content" @click="setPerson(item.priorityLevel)">{{$func.conditionStr(nodeConfig,index)}}</div>
<div class="error_tip" v-if="isTried&&item.error">
<i class="anticon anticon-exclamation-circle"></i>
</div>
</div>
<addNode :childNodeP.sync="item.childNode"></addNode>
</div>
</div>
<nodeWrap v-if="item.childNode" :nodeConfig.sync="item.childNode"></nodeWrap>
<template v-if="index==0">
<div class="top-left-cover-line"></div>
<div class="bottom-left-cover-line"></div>
</template>
<template v-if="index==nodeConfig.conditionNodes.length-1">
<div class="top-right-cover-line"></div>
<div class="bottom-right-cover-line"></div>
</template>
</div>
</div>
<addNode :childNodeP.sync="nodeConfig.childNode"></addNode>
</div>
</div>
<nodeWrap v-if="nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode"></nodeWrap>
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex'
export default {
props: ["nodeConfig", "flowPermission"],
data() {
return {
placeholderList: ["发起人", "审核人", "抄送人"],
isInputList: [],
isInput: false,
}
},
mounted() {
if (this.nodeConfig.type == 1) {
this.nodeConfig.error = !this.$func.setApproverStr(this.nodeConfig)
} else if (this.nodeConfig.type == 2) {
this.nodeConfig.error = !this.$func.copyerStr(this.nodeConfig)
} else if (this.nodeConfig.type == 4) {
this.resetConditionNodesErr()
}
},
computed: {
...mapState(['isTried', 'flowPermission1', 'approverConfig1', 'copyerConfig1', 'conditionsConfig1']),
defaultText() {
return this.placeholderList[this.nodeConfig.type]
},
showText() {
if (this.nodeConfig.type == 0) return this.$func.arrToStr(this.flowPermission) || '所有人'
if (this.nodeConfig.type == 1) return this.$func.setApproverStr(this.nodeConfig)
return this.$func.copyerStr(this.nodeConfig)
},
bgColor() {
return ['87, 106, 149', '255, 148, 62', '50, 150, 250'][this.nodeConfig.type]
}
},
watch: {
flowPermission1(data) {
if (data.flag && data.id === this._uid) {
this.$emit('update:flowPermission', data.value)
}
},
approverConfig1(data) {
if (data.flag && data.id === this._uid) {
this.$emit('update:nodeConfig', data.value)
}
},
copyerConfig1(data) {
if (data.flag && data.id === this._uid) {
this.$emit('update:nodeConfig', data.value)
}
},
conditionsConfig1(data) {
if (data.flag && data.id === this._uid) {
this.$emit('update:nodeConfig', data.value)
}
},
},
methods: {
...mapMutations([
'setPromoter',
'setApprover',
'setCopyer',
'setCondition',
'setFlowPermission',
'setApproverConfig',
'setCopyerConfig',
'setConditionsConfig'
]),
clickEvent(index) {
if (index || index === 0) {
this.$set(this.isInputList, index, true)
} else {
this.isInput = true;
}
},
blurEvent(index) {
if (index || index === 0) {
this.$set(this.isInputList, index, false)
this.nodeConfig.conditionNodes[index].nodeName = this.nodeConfig.conditionNodes[index].nodeName || "条件"
} else {
this.isInput = false;
this.nodeConfig.nodeName = this.nodeConfig.nodeName || this.defaultText
}
},
delNode() {
this.$emit("update:nodeConfig", this.nodeConfig.childNode);
},
addTerm() {
let len = this.nodeConfig.conditionNodes.length + 1
this.nodeConfig.conditionNodes.push({
"nodeName": "条件" + len,
"type": 3,
"priorityLevel": len,
"conditionList": [],
"nodeUserList": [],
"childNode": null
});
this.resetConditionNodesErr()
this.$emit("update:nodeConfig", this.nodeConfig);
},
delTerm(index) {
this.nodeConfig.conditionNodes.splice(index, 1)
this.nodeConfig.conditionNodes.map((item, index) => {
item.priorityLevel = index + 1
item.nodeName = `条件${index + 1}`
});
this.resetConditionNodesErr()
this.$emit("update:nodeConfig", this.nodeConfig);
if (this.nodeConfig.conditionNodes.length == 1) {
if (this.nodeConfig.childNode) {
if (this.nodeConfig.conditionNodes[0].childNode) {
this.reData(this.nodeConfig.conditionNodes[0].childNode, this.nodeConfig.childNode)
} else {
this.nodeConfig.conditionNodes[0].childNode = this.nodeConfig.childNode
}
}
this.$emit("update:nodeConfig", this.nodeConfig.conditionNodes[0].childNode);
}
},
reData(data, addData) {
if (!data.childNode) {
data.childNode = addData
} else {
this.reData(data.childNode, addData)
}
},
setPerson(priorityLevel) {
console.log("请选择------------>",priorityLevel)
var { type } = this.nodeConfig;
console.log("请选择-----1------->",type,this.nodeConfig)
if (type == 0) {
this.setPromoter(true)
this.setFlowPermission({
value: this.flowPermission,
flag: false,
id: this._uid
})
} else if (type == 1) {
this.setApprover(true)
this.setApproverConfig({
value: {
...JSON.parse(JSON.stringify(this.nodeConfig)),
...{ settype: this.nodeConfig.settype ? this.nodeConfig.settype : 1 }
},
flag: false,
id: this._uid
})
} else if (type == 2) {
this.setCopyer(true)
this.setCopyerConfig({
value: JSON.parse(JSON.stringify(this.nodeConfig)),
flag: false,
id: this._uid
})
} else {
this.setCondition(true)
this.setConditionsConfig({
value: JSON.parse(JSON.stringify(this.nodeConfig)),
priorityLevel,
flag: false,
id: this._uid
})
}
},
arrTransfer(index, type = 1) {//-1,1
this.nodeConfig.conditionNodes[index] = this.nodeConfig.conditionNodes.splice(index + type, 1, this.nodeConfig.conditionNodes[index])[0];
this.nodeConfig.conditionNodes.map((item, index) => {
item.priorityLevel = index + 1
})
this.$emit("update:nodeConfig", this.nodeConfig);
},
resetConditionNodesErr() {
for (var i = 0; i < this.nodeConfig.conditionNodes.length; i++) {
this.nodeConfig.conditionNodes[i].error = this.$func.conditionStr(this.nodeConfig, i) == "请设置条件" && i != this.nodeConfig.conditionNodes.length - 1
}
},
}
}
</script>
<style>
.error_tip {
position: absolute;
top: 0px;
right: 0px;
transform: translate(150%, 0px);
font-size: 24px;
}
.promoter_person .el-dialog__body {
padding: 10px 20px 14px 20px;
}
.selected_list {
margin-bottom: 20px;
line-height: 30px;
}
.selected_list span {
margin-right: 10px;
padding: 3px 6px 3px 9px;
line-height: 12px;
white-space: nowrap;
border-radius: 2px;
border: 1px solid rgba(220, 220, 220, 1);
}
.selected_list img {
margin-left: 5px;
width: 7px;
height: 7px;
cursor: pointer;
}
</style>

88
src/components/selectBox.vue

@ -0,0 +1,88 @@
<!-- eslint-disable vue/no-template-key -->
<!--
* @Date: 2022-08-26 17:18:14
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:17:23
* @FilePath: /Workflow/src/components/selectBox.vue
-->
<template>
<ul class="select-box">
<template v-for="elem in list">
<template v-if="elem.type === 'role'">
<li v-for="item in elem.data" :key="item.roleId"
class="check_box"
:class="{active: elem.isActive && elem.isActive(item), not: elem.not}"
@click="elem.change(item)">
<a :title="item.description" :class="{active: elem.isActiveItem && elem.isActiveItem(item)}">
<img src="@/assets/images/icon_role.png">{{item.roleName}}
</a>
</li>
</template>
<template v-if="elem.type === 'department'">
<li v-for="item in elem.data" :key="item.id" class="check_box" :class="{not: !elem.isDepartment}">
<a v-if="elem.isDepartment"
:class="elem.isActive(item) && 'active'"
@click="elem.change(item)">
<img src="@/assets/images/icon_file.png">{{item.departmentName}}</a>
<a v-else><img src="@/assets/images/icon_file.png">{{item.departmentName}}</a>
<i @click="elem.next(item)">下级</i>
</li>
</template>
<template v-if="elem.type === 'employee'">
<li v-for="item in elem.data" :key="item.id" class="check_box">
<a :class="elem.isActive(item) && 'active'"
@click="elem.change(item)"
:title="item.departmentNames">
<img v-if="item.icon!=''" :src="item.icon">
<img v-else-if="(item.icon==''&&item.iconToBase64!='') " :src="item.iconToBase64">
<img v-else src="@/assets/images/icon_people.png">
{{item.employeeName}}
</a>
</li>
</template>
</template>
</ul>
</template>
<script>
export default {
props: {
list: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="less">
.select-box {
height: 420px;
overflow-y: auto;
li {
padding: 5px 0;
i {
float: right;
padding-left: 24px;
padding-right: 10px;
color: #3195f8;
font-size: 12px;
cursor: pointer;
background: url(~@/assets/images/next_level_active.png) no-repeat 10px center;
border-left: 1px solid rgb(238, 238, 238);
}
a.active+i {
color: rgb(197, 197, 197);
background-image: url(~@/assets/images/next_level.png);
pointer-events: none;
}
img {
width: 14px;
vertical-align: middle;
margin-right: 5px;
}
}
}
</style>

100
src/components/selectResult copy.vue

@ -0,0 +1,100 @@
<!-- eslint-disable vue/no-template-key -->
<!--
* @Date: 2022-08-26 16:29:24
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:17:24
* @FilePath: /Workflow/src/components/selectResult.vue
-->
<template>
<div class="select-result l">
<p class="clear">已选{{total}}
<a @click="$emit('del')">清空</a>
</p>
<ul>
<template v-for="({type, data, cancel}) in list">
<template v-if="type === 'role'">
<li v-for="item in data" :key="item.roleId">
<img src="@/assets/images/icon_role.png">
<span>{{item.roleName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
<template v-if="type === 'department'">
<li v-for="item in data" :key="item.id">
<img src="@/assets/images/icon_file.png">
<span>{{item.departmentName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
<template v-if="type === 'employee'">
<li v-for="item in data" :key="item.id">
<img src="@/assets/images/icon_people.png">
<span>{{item.employeeName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
</template>
</ul>
</div>
</template>
<script>
export default {
props: {
total: {
type: Number,
default: 0
},
list: {
type: Array,
default: () => [{ type: 'role', data: [], cancel: function () { } }]
}
}
}
</script>
<style lang="less">
.select-result {
width: 276px;
height: 100%;
font-size: 12px;
ul {
height: 460px;
overflow-y: auto;
li {
margin: 11px 26px 13px 19px;
line-height: 17px;
span {
vertical-align: middle;
}
img {
&:first-of-type {
width: 14px;
vertical-align: middle;
margin-right: 5px;
}
&:last-of-type {
float: right;
margin-top: 2px;
width: 14px;
}
}
}
}
p {
padding-left: 19px;
padding-right: 20px;
line-height: 37px;
border-bottom: 1px solid #f2f2f2;
a {
float: right;
}
}
}
</style>

103
src/components/selectResult.vue

@ -0,0 +1,103 @@
<!-- eslint-disable vue/no-template-key -->
<!--
* @Date: 2022-08-26 16:29:24
* @LastEditors: StavinLi
* @LastEditTime: 2022-09-21 11:17:24
* @FilePath: /Workflow/src/components/selectResult.vue
-->
<template>
<div class="select-result l">
<p class="clear">已选{{total}}
<a @click="$emit('del')">清空</a>
</p>
<ul>
<template v-for="({type, data, cancel}) in list">
<template v-if="type === 'role'">
<li v-for="item in data" :key="item.roleId">
<img src="@/assets/images/icon_role.png">
<span>{{item.roleName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
<template v-if="type === 'department'">
<li v-for="item in data" :key="item.id">
<img src="@/assets/images/icon_file.png">
<span>{{item.departmentName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
<template v-if="type === 'employee'">
<li v-for="item in data" :key="item.id">
<!-- <img src="@/assets/images/icon_people.png"> -->
<img v-if="item.icon!=''" :src="item.icon">
<img v-else-if="(item.icon==''&&item.iconToBase64!='') " :src="item.iconToBase64">
<img v-else src="@/assets/images/icon_people.png">
<span>{{item.employeeName}}</span>
<img src="@/assets/images/cancel.png" @click="cancel(item)">
</li>
</template>
</template>
</ul>
</div>
</template>
<script>
export default {
props: {
total: {
type: Number,
default: 0
},
list: {
type: Array,
default: () => [{ type: 'role', data: [], cancel: function () { } }]
}
}
}
</script>
<style lang="less">
.select-result {
width: 276px;
height: 100%;
font-size: 12px;
ul {
height: 460px;
overflow-y: auto;
li {
margin: 11px 26px 13px 19px;
line-height: 17px;
span {
vertical-align: middle;
}
img {
&:first-of-type {
width: 14px;
vertical-align: middle;
margin-right: 5px;
}
&:last-of-type {
float: right;
margin-top: 2px;
width: 14px;
}
}
}
}
p {
padding-left: 19px;
padding-right: 20px;
line-height: 37px;
border-bottom: 1px solid #f2f2f2;
a {
float: right;
}
}
}
</style>

12
src/css/override-element-ui.css

@ -25,16 +25,16 @@
} }
.el-button { .el-button {
min-width: 79px; /* min-width: 79px;
padding: 8px 12px; padding: 8px 12px; */
font-size: 12px; /* font-size: 12px; */
border-radius: 2px; /* border-radius: 2px; */
background: #46A6FE; /* background: #46A6FE; */
} }
.el-button.el-button--default { .el-button.el-button--default {
color: #323232; color: #323232;
background: #f2f2f2; /* background: #f2f2f2; */
} }
.demo-drawer__footer { .demo-drawer__footer {

17
src/css/workflow.css

@ -1,6 +1,6 @@
body { /* body {
background: #eee background: #eee
} } */
@font-face { @font-face {
font-family: Chinese Quote; font-family: Chinese Quote;
@ -25,14 +25,14 @@ input::-ms-reveal {
box-sizing: border-box box-sizing: border-box
} }
html { /* html {
font-family: sans-serif; font-family: sans-serif;
line-height: 1.15; line-height: 1.15;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar; -ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
} } */
@-ms-viewport { @-ms-viewport {
width: device-width width: device-width
@ -58,8 +58,8 @@ body {
font-size: 14px; font-size: 14px;
font-variant: tabular-nums; font-variant: tabular-nums;
line-height: 1.5; line-height: 1.5;
color: rgba(0, 0, 0, .65); /* color: rgba(0, 0, 0, .65); */
background-color: #fff /* background-color: #fff */
} }
[tabindex="-1"]:focus { [tabindex="-1"]:focus {
@ -902,7 +902,8 @@ body,
html { html {
font-size: 12px!important; font-size: 12px!important;
color: #191f25!important; color: #191f25!important;
background: #f6f6f6!important /* background: #f6f6f6!important */
height: 100%;
} }
.wrap { .wrap {
@ -1052,7 +1053,7 @@ html {
.fd-nav-content { .fd-nav-content {
position: fixed; position: fixed;
top: 60px; top: 60px;
left: 0; left: 160px;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 1; z-index: 1;

18
src/main.js

@ -14,6 +14,10 @@ import store from './store'
import router from './router' import router from './router'
import 'font-awesome/css/font-awesome.min.css' import 'font-awesome/css/font-awesome.min.css'
//流程样式
import '@/css/override-element-ui.css'
import "@/css/workflow.css"
// import 'handsontable/dist/handsontable.full.css'; // import 'handsontable/dist/handsontable.full.css';
import '@/icons' // icon import '@/icons' // icon
@ -22,6 +26,16 @@ import '@/icons' // icon
import Node from 'workflow-ui/src/components/Generator/node' import Node from 'workflow-ui/src/components/Generator/node'
Vue.component('Node', Node) Vue.component('Node', Node)
/**
* 工作流组件
*/
import func from '@/api/preload.js'
Vue.prototype.$func = func;
import nodeWrap from '@/components/nodeWrap'
Vue.component('nodeWrap', nodeWrap); //初始化组件
import addNode from '@/components/addNode'
Vue.component('addNode', addNode); //初始化组件
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
* you want to use MockJs for mock api * you want to use MockJs for mock api
@ -61,5 +75,9 @@ new Vue({
el: '#app', el: '#app',
router, router,
store, store,
components: {
nodeWrap,
addNode,
},
render: h => h(App) render: h => h(App)
}) })

5
src/router/index.js

@ -284,7 +284,8 @@ export const constantRoutes = [
// UserHome 将被渲染到 User 的 <router-view> 内部 // UserHome 将被渲染到 User 的 <router-view> 内部
{ {
path: 'targetbasic', path: 'targetbasic',
component: () => import('@/views/basicCont/targetLayout'), // component: () => import('@/views/basicCont/targetLayout'),
component: () => import('@/views/basicCont/targetTabsLayout'),
meta: { title: '考核指标'} meta: { title: '考核指标'}
}, },
{ {
@ -508,7 +509,7 @@ export const constantRoutes = [
{ {
path: 'flow', path: 'flow',
// component: () => import('@/views/workflow/flow'), // component: () => import('@/views/workflow/flow'),
component: () => import('@/views/workflow/flow1'), component: () => import('@/views/workflow/flow'),
meta: { title: '设置工作时段'} meta: { title: '设置工作时段'}
}, },
], ],

29
src/store/index.js

@ -12,21 +12,23 @@ const store = new Vuex.Store({
app, app,
settings, settings,
user, user,
tableId: '',
isTried: false,
promoterDrawer: false,
flowPermission1: {},
approverDrawer: false,
approverConfig1: {},
copyerDrawer: false,
copyerConfig1: {},
conditionDrawer: false,
conditionsConfig1: {
conditionNodes: [],
},
}, },
getters, getters,
state: {
tableId: '',
isTried: false,
promoterDrawer: false,
flowPermission1: {},
approverDrawer: false,
approverConfig1: {},
copyerDrawer: false,
copyerConfig1: {},
conditionDrawer: false,
conditionsConfig1: {
conditionNodes: [],
},
},
mutations: { mutations: {
setTableId(status, payload) { setTableId(status, payload) {
console.log("验证store----------------->",status, payload) console.log("验证store----------------->",status, payload)
@ -36,6 +38,7 @@ const store = new Vuex.Store({
status.isTried = payload status.isTried = payload
}, },
setPromoter(status, payload) { setPromoter(status, payload) {
console.log("验证setPromoter----------------->",status, payload)
status.promoterDrawer = payload status.promoterDrawer = payload
}, },
setFlowPermission(status, payload) { setFlowPermission(status, payload) {

2
src/utils/requestFile.js

@ -47,7 +47,7 @@ service.interceptors.response.use(
const res = response.data const res = response.data
// if the custom code is not 20000, it is judged as an error. // if the custom code is not 20000, it is judged as an error.
if (res.code !== 0) { if (res.code !== 0 && res.code !== 571) {
if(res.code === 7){ if(res.code === 7){
store.commit('user/loginOut') store.commit('user/loginOut')
} }

4
src/views/assessmentProgram/departmentalAssessment copy.vue

@ -42,7 +42,7 @@
<div class="gva-table-box"> <div class="gva-table-box">
<div class="gva-btn-list"> <div class="gva-btn-list">
<!-- <el-button size="mini" type="primary" icon="el-icon-setting" @click="showDimension()">设置维度权重</el-button> --> <!-- <el-button size="mini" type="primary" icon="el-icon-setting" @click="showDimension()">设置维度权重</el-button> -->
<el-button size="mini" type="primary" icon="el-icon-setting" @click="showIndex()">生成部门考核方案</el-button></el-button> <el-button size="mini" type="primary" icon="el-icon-setting" @click="showIndex()">生成部门考核方案</el-button>
</div> </div>
<el-table :data="tableData" border :span-method="objectSpanMethod"> <el-table :data="tableData" border :span-method="objectSpanMethod">
<el-table-column prop="parentname" label="部门"></el-table-column> <el-table-column prop="parentname" label="部门"></el-table-column>
@ -286,7 +286,7 @@
<el-form-item v-if="form.parentid!=''"> <el-form-item v-if="form.parentid!=''">
<!-- 表格表单提交 --> <!-- 表格表单提交 -->
<el-card class="box-card" v-for="(item,index) in weiDuList" :key="item.id"> <el-card class="box-card" v-for="item in weiDuList" :key="item.id">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">

4
src/views/assessmentProgram/departmentalAssessment.vue

@ -314,7 +314,7 @@
</el-row> </el-row>
<el-form-item v-if="form.parentid!=''"> <el-form-item v-if="form.parentid!=''">
<!-- 表格表单提交 --> <!-- 表格表单提交 -->
<el-card class="box-card" v-for="(item,index) in weiDuList" :key="item.id"> <el-card class="box-card" v-for="item in weiDuList" :key="item.id">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<span>考核纬度{{item.name}}</span> <span>考核纬度{{item.name}}</span>
@ -568,7 +568,7 @@
<el-form-item> <el-form-item>
<!-- 表格表单提交 --> <!-- 表格表单提交 -->
<el-card class="box-card" v-for="(item,index) in weiDuCopyList" :key="item.id"> <el-card class="box-card" v-for="item in weiDuCopyList" :key="item.id">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<span>考核纬度{{item.name}}</span> <span>考核纬度{{item.name}}</span>

7
src/views/assessmentProgram/gwQualitativeIndicators.vue

@ -104,7 +104,7 @@
<template #default="scope"> <template #default="scope">
<el-collapse> <el-collapse>
<el-collapse-item title="详情" name="1"> <el-collapse-item title="详情" name="1">
<div v-for="(iteam,index) in scope.row.postary"> <div v-for="(iteam,index) in scope.row.postary" :key="index">
{{iteam.name}} {{iteam.name}}
</div> </div>
</el-collapse-item> </el-collapse-item>
@ -611,6 +611,11 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="targetsunname" label="权重"></el-table-column> --> <!-- <el-table-column prop="targetsunname" label="权重"></el-table-column> -->
<el-table-column
label="序号"
type="index"
width="50">
</el-table-column>
<el-table-column prop="title" label="考核内容"></el-table-column> <el-table-column prop="title" label="考核内容"></el-table-column>
<el-table-column prop="referencescore" label="考核标准" width="80" align="center"></el-table-column> <el-table-column prop="referencescore" label="考核标准" width="80" align="center"></el-table-column>
<el-table-column prop="company" label="单位" width="80" align="center"> <el-table-column prop="company" label="单位" width="80" align="center">

8
src/views/assessmentProgram/qualitativeIndicators.vue

@ -575,7 +575,7 @@
</template> </template>
</el-dialog> </el-dialog>
<!-- 考核办法弹框 --> <!-- 考核办法弹框 -->
<el-dialog :visible.sync="methodShow" title="考核1办法" width="75%"> <el-dialog :visible.sync="methodShow" title="考核办法" width="75%">
<div class="gva-search-box"> <div class="gva-search-box">
<el-form :inline="true" :model="rowZhiData"> <el-form :inline="true" :model="rowZhiData">
<el-form-item label="所属公司"> <el-form-item label="所属公司">
@ -633,6 +633,11 @@
{{scope.row.sontargetname}} {{scope.row.sontargetname}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="序号"
type="index"
width="50">
</el-table-column>
<!-- <el-table-column prop="targetsunname" label="权重"></el-table-column> --> <!-- <el-table-column prop="targetsunname" label="权重"></el-table-column> -->
<el-table-column prop="title" label="考核内容"></el-table-column> <el-table-column prop="title" label="考核内容"></el-table-column>
<el-table-column prop="standard" label="考核标准" width="80" align="center"></el-table-column> <el-table-column prop="standard" label="考核标准" width="80" align="center"></el-table-column>
@ -658,7 +663,6 @@
<el-table-column label="检查周期" width="80" align="center"> <el-table-column label="检查周期" width="80" align="center">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.cycle==='0'"></div> <div v-if="scope.row.cycle==='0'"></div>
<div v-else-if="scope.row.cycle==='0'"></div>
<div v-else> <div v-else>
{{scope.row.censorrate}} / {{scope.row.censorrate}} /
<span v-if="scope.row.cycle==1"></span> <span v-if="scope.row.cycle==1"></span>

47
src/views/basicCont/departTarget.vue

@ -9,8 +9,9 @@
<el-input v-model="searchInfo.title" placeholder="请输入指标名称"></el-input> <el-input v-model="searchInfo.title" placeholder="请输入指标名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="指标维度"> <el-form-item label="指标维度">
<el-select v-model="searchInfo.dimension" clearable placeholder="请选择指标维度"> <el-select v-model="searchInfo.dimension" clearable placeholder="请选择指标维度">
<el-option <el-option
v-for="item in dutyclasslist" v-for="item in dutyclasslist"
:key="item.outId" :key="item.outId"
:label="item.title" :label="item.title"
@ -236,7 +237,7 @@
<el-cascader filterable clearable v-model="editAdd.acceptdepartmentid" :options="grouplist" :show-all-levels="false" :props="propsdepart"></el-cascader> <el-cascader filterable clearable v-model="editAdd.acceptdepartmentid" :options="grouplist" :show-all-levels="false" :props="propsdepart"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="指标维度" prop="dimension"> <el-form-item label="指标维度" prop="dimension">
<el-select v-model="editAdd.dimension" clearable placeholder="请选择考核维度"> <el-select v-model="editAdd.dimension" clearable placeholder="请选择考核维度" @change="cccxs">
<el-option <el-option
v-for="item in dutyclasslist" v-for="item in dutyclasslist"
:key="item.outId" :key="item.outId"
@ -374,11 +375,12 @@
import { positionlist } from "@/api/personnel/post"; // import { positionlist } from "@/api/personnel/post"; //
import { dutyclasslist } from '@/api/duty/dimension' //api import { dutyclasslist } from '@/api/duty/dimension' //api
import { add_department_target,get_one_terget_info,deparment_target_about_post,edit_one_target } from '@/api/duty/projectNew' // import { add_department_target,get_one_terget_info,deparment_target_about_post,edit_one_target } from '@/api/duty/projectNew' //
import { gettarget,addtarget,gettargetinfo,eiteassessinfo,eitetarget,deltarget } from '@/api/duty/project' //api import { gettarget,addtarget,gettargetinfo,eiteassessinfo,eitetarget } from '@/api/duty/project' //api
import { import {
getgroupdepartmap, getgroupdepartmap,
getgroupuser getgroupuser
} from '@/api/duty/group' // } from '@/api/duty/group' //
import { deltarget } from "@/api/systemaccredit/systemapi"
export default { export default {
props:['bmId'], props:['bmId'],
data(){ data(){
@ -537,6 +539,7 @@
async getDutyclasslist(){ async getDutyclasslist(){
const res = await dutyclasslist(this.searchList) const res = await dutyclasslist(this.searchList)
this.dutyclasslist=res.data.list this.dutyclasslist=res.data.list
console.log("2222222222222222",res.data)
}, },
// //
onSubmit() { onSubmit() {
@ -598,7 +601,7 @@
// //
} }
}) })
console.log(this.grouplistBackup,"获取员工列表-------------------------->") console.log("获取员工列表-------------------------->",this.grouplistBackup,"获取员工列表-------------------------->")
}, },
// //
async enterAddDialog(){ async enterAddDialog(){
@ -645,7 +648,8 @@
}, },
// //
async editEnterDialog(){ async editEnterDialog(){
console.log("修改数据表单----》",this.editAdd) console.log("修改数据表单----》",this.editAdd,this.editAdd.dimension)
this.editAdd.dimension=this.editAdd.dimension.toString()
this.$refs.editForm.validate(async valid => { this.$refs.editForm.validate(async valid => {
console.log("修改数据表单---1-》",this.editAdd) console.log("修改数据表单---1-》",this.editAdd)
console.log("修改数据表单---2-》",valid) console.log("修改数据表单---2-》",valid)
@ -665,7 +669,7 @@
}) })
this.editAdd.acceptdepartmentid = newDeaprtAry this.editAdd.acceptdepartmentid = newDeaprtAry
this.editAdd.report=this.editAdd.reportmap this.editAdd.report=this.editAdd.reportmap
this.editAdd.dimension=this.editAdd.dimensionidstr; this.editAdd.dimension=this.editAdd.dimension.toString();
this.editAdd.cycleattr =parseInt(this.editAdd.cycleattr) this.editAdd.cycleattr =parseInt(this.editAdd.cycleattr)
const res = await edit_one_target(this.editAdd) const res = await edit_one_target(this.editAdd)
if (res.code === 0) { if (res.code === 0) {
@ -771,10 +775,37 @@
//
//
async deleteOperate(val){
this.$confirm('此操作将永久删除, 是否继续?', '是否删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
let sendData = {
id:val.id.toString(),
}
const respon = await deltarget(sendData)
if (respon.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getDataList()
}
})
},
//
cccxs(val){
console.log("测试指标维度---------------->",val,this.editAdd.dimension)
}

2
src/views/basicCont/targetDepartmentConfig.vue

@ -129,7 +129,7 @@
</el-row> </el-row>
<el-card class="box-card" style="width:96%;margin: 0 auto;"> <el-card class="box-card" style="width:96%;margin: 0 auto;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>批量添加目标值</span> <span>批量添加目标值版本号{{ banben }}</span>
</div> </div>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">

42
src/views/basicCont/targetTabsLayout.vue

@ -0,0 +1,42 @@
<template>
<div class="tabs_box">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门指标" name="departmentpage">
<departmentpage v-if="activeName=='departmentpage'"></departmentpage> <!--部门指标引用页面-->
</el-tab-pane>
<el-tab-pane label="岗位指标" name="postpage">
<postpage v-if="activeName=='postpage'"></postpage> <!--岗位指标引用页面-->
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import departmentpage from "@/views/basicCont/targettabslayout/departmentpage.vue";
import postpage from "@/views/basicCont/targettabslayout/postpage.vue";
export default {
components: {
departmentpage,
postpage
},
data() {
return {
activeName: 'departmentpage',
}
},
created(){
},
methods:{
handleClick(tab, event,name) {
// console.log(tab,"------------------->" ,event,"------------------->" ,this.activeName);
}
}
}
</script>
<style>
.tabs_box{
padding: 10px 25px;
}
</style>

1099
src/views/basicCont/targettabslayout/departmentpage.vue

File diff suppressed because it is too large

175
src/views/basicCont/targettabslayout/edittablepage.vue

@ -0,0 +1,175 @@
<template>
<el-dialog :close-on-click-modal="false" :visible.sync="boxIsShow" :before-close="closeBox" title="编辑栏目" custom-class="dialogBox" append-to-body width="50%" top="15vh">
<el-form ref="edittableForm" :model="editTableInfo" :rules="editPostTaRules" label-width="120px" >
<el-form-item label="栏目名称" prop="title">
<el-input type="textarea" v-model="editTableInfo.title" autocomplete="off" placeholder="请输入栏目名称" />
</el-form-item>
<el-form-item label="岗位/提报人">
<el-table
ref="setPostManTableEdit"
:data="targetOrgList"
style="width: 100%"
@selection-change="handTableOrgReportChange">
<el-table-column
label="已关联"
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="关联岗位"
>
<template slot-scope="scope">
<el-input v-model="scope.row.name"></el-input>
</template>
</el-table-column>
<el-table-column
prop="name"
label="提报人"
>
<template slot-scope="scope">
<el-cascader
filterable
clearable
v-model="scope.row.keylist"
:options="scope.row.child"
:show-all-levels="false"
:props="userTaProps"
collapse-tags
>
<template slot-scope="{ node, data }">
<span>{{ data.name }}</span>
<span v-if="node.isLeaf"> ({{ data.number }}) </span>
</template>
</el-cascader>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeBox"> </el-button>
<el-button size="small" type="primary" @click="sendEditTableInfo" :loading="butTdLoading"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import { getNewTargetDepartPostMan,getNewTableDepartMan,editNewsonTargetCont } from "@/api/systemaccredit/systemapi";
export default {
props:['editTableBox','tarid','tid','getTargetPostDetailsList'],
data() {
return {
butTdLoading:false,
boxIsShow:this.editTableBox,
tgid:this.tarid,
id:this.tid,
editTableInfo:{}, //
editPostTaRules:{}, //
targetOrgList:[], //
transitionOrgReport:[], //
//
userTaProps: {
value: "id",
label: "name",
children: "govlist",
emitPath:false,
multiple: true
},
}
},
created(){
},
watch:{
tarid(){
this.tgid = this.tarid
},
tid(){
this.id = this.tid;
this.editTableInfo.id=this.tid;
this.getTableCont();
},
editTableBox(){
this.boxIsShow = this.editTableBox
this.getTableCont();
},
},
methods:{
//
closeBox(){
this.boxIsShow = false;
this.targetOrgList = [];
this.transitionOrgReport = [];
this.$emit('closeEditTableBox');
},
//
async getTableCont(){
//
let sendData = {
id:this.tgid
}
const res = await getNewTargetDepartPostMan(sendData)
if(res.code ==0){
this.targetOrgList = res.data.organdpostlist
}
//
let sendDataTable = {
id:this.id
}
let tableOrgReport = new Array
const resing = await getNewTableDepartMan(sendDataTable)
if(resing.code ==0){
this.$set(this.editTableInfo,'title',resing.data.name)
tableOrgReport = resing.data.organdpostlist
}
if(tableOrgReport != null && tableOrgReport.length > 0){
this.targetOrgList.forEach((item,indx) =>{
tableOrgReport.forEach(items=>{
if(item.id == items.id && item.orgid == items.orgid){
// console.log("---------0--------->",item,indx)
item.keylist = items.keylist
this.$nextTick(() => {
this.$refs.setPostManTableEdit.toggleRowSelection(item, true)
})
}
})
})
}else{
this.$nextTick(() => {
for (let i = 0; i < this.targetOrgList.length; i++) {
this.$refs.setPostManTableEdit.toggleRowSelection(this.targetOrgList[i], true)
}
})
}
},
//
handTableOrgReportChange(val){
this.transitionOrgReport = val;
},
//
async sendEditTableInfo(){
this.boxIsShow = true;
this.editTableInfo.repostlist=this.transitionOrgReport;
console.log("提交数据---------0--------->",this.editTableInfo,this.transitionOrgReport)
const res = await editNewsonTargetCont(this.editTableInfo)
if(res.code == 0){
this.$emit('getTargetPostDetailsList');
this.closeBox()
}
this.boxIsShow = false;
},
}
}
</script>
<style>
</style>

1265
src/views/basicCont/targettabslayout/postpage.vue

File diff suppressed because it is too large

1210
src/views/basicCont/targettabslayout/posttargetdetails.vue

File diff suppressed because it is too large

565
src/views/basicCont/targettabslayout/tabledetailspage.vue

@ -0,0 +1,565 @@
<template>
<el-dialog :close-on-click-modal="false" :visible.sync="tableAddDetailsBoxes" :before-close="closeTableAddBox" title="新增指标细则" custom-class="dialogBox" append-to-body width="80%" top="15vh">
<el-row>
<el-col :span="24">
<el-button
icon="el-icon-circle-plus-outline"
type="primary"
@click="addTablePostDetailsCont()"
>添加细则</el-button>
</el-col>
</el-row>
<el-table ref="detailsPostTablees" :data="addDetailsInfoList" style="width: 100%" empty-text="">
<el-table-column
fixed
label="考核内容"
width="150">
<template slot-scope="scope">
<el-input
type="textarea"
autosize
placeholder="请输入考核内容"
v-model="scope.row.title">
</el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作属性"
width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.punishtype" placeholder="请选择">
<el-option label="分数" :value=1></el-option>
<el-option label="现金" :value=2></el-option>
<el-option label="分数和现金" :value=3></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
label="考核标准"
width="150">
<template slot-scope="scope">
<el-input
autosize
placeholder="请输入考核标准"
v-model="scope.row.standard">
</el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="单位"
width="80">
<template slot-scope="scope">
<el-input
autosize
placeholder="单位"
v-model="scope.row.unit">
</el-input>
</template>
</el-table-column>
<el-table-column
label="现金标准"
width="150">
<template slot-scope="scope">
<el-input
autosize
placeholder="请输入现金标准"
v-model="scope.row.cashstandard">
</el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作类型"
width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.types" placeholder="请选择">
<el-option label="扣除" :value=1></el-option>
<el-option label="增加" :value=2></el-option>
<el-option label="现场确认扣除/增加" :value=3></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
label="检查方式"
width="140">
<template slot-scope="scope">
<el-select multiple v-model="scope.row.inspemethod" placeholder="请选择">
<el-option label="现场检查" :value=1></el-option>
<el-option label="资料审查" :value=2></el-option>
<el-option label="事件触发" :value=3></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
label="检查周期"
width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.cycle" placeholder="请选择">
<el-option
v-for="item in optionsclye"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
label="检查频次"
width="120">
<template slot-scope="scope">
<el-input-number v-model="scope.row.frequency" :min="1" :max="12" label="检查频次" controls-position="right" style="width:100px"></el-input-number>
</template>
</el-table-column>
<el-table-column
label="检查依据"
width="180">
<template slot-scope="scope">
<el-input
type="textarea"
autosize
placeholder="请输入检查依据"
v-model="scope.row.evidence">
</el-input>
</template>
</el-table-column>
<el-table-column
prop="remarks"
label="备注说明"
width="180">
<template slot-scope="scope">
<el-input
type="textarea"
autosize
placeholder="请输入备注说明"
v-model="scope.row.remarks">
</el-input>
</template>
</el-table-column>
<el-table-column
prop="postandexport"
align="center"
fixed="right"
label="设置岗位及提报人"
width="140">
<template slot-scope="scope">
<el-button type="primary" icon="el-icon-s-tools" size="small" @click="setTablePostAndReport(scope)">设置</el-button>
</template>
</el-table-column>
<el-table-column
fixed="right"
align="center"
label="操作"
width="100">
<template #default="scope">
<el-button
icon="el-icon-delete"
size="mini"
type="danger"
@click="deleteRulesTableList(scope)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeTableAddBox"> </el-button>
<el-button size="small" type="primary" @click="addTableDetails" :loading="butLoadings"> </el-button>
</div>
</template>
<!--设置岗位及提报人-->
<el-dialog :close-on-click-modal="false" :visible.sync="setDialogPostManBox" :before-close="closeSetPostAndReportBoxes" title="设置岗位及提报人" custom-class="dialogBox" append-to-body width="50%" top="25vh">
<el-table
ref="setPostManTables"
:data="orgPostList"
style="width: 100%"
@selection-change="handleSelectionChangees">
<el-table-column
label="已关联"
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="关联岗位"
>
<template slot-scope="scope">
<el-input v-model="scope.row.name"></el-input>
</template>
</el-table-column>
<el-table-column
prop="name"
label="提报人"
>
<template slot-scope="scope">
<el-cascader
filterable
clearable
v-model="scope.row.keylist"
:options="scope.row.child"
:show-all-levels="false"
:props="userProps"
collapse-tags
>
<template slot-scope="{ node, data }">
<span>{{ data.name }}</span>
<span v-if="node.isLeaf"> ({{ data.number }}) </span>
</template>
</el-cascader>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-row>
<el-col :span="3"><el-button type="warning" size="small" @click="clearAllSetTable">全部取消</el-button></el-col>
<el-col :span="21">
<el-button size="small" @click="closeSetPostAndReportBoxes"> </el-button>
<el-button size="small" type="primary" @click="setIsTruePostManEs" :loading="butLoadings"> </el-button>
</el-col>
</el-row>
</div>
</template>
</el-dialog>
</el-dialog>
</template>
<script>
import { getNewTargetDepartPostMan,addTableDetailsList } from "@/api/systemaccredit/systemapi";
export default {
props:['tableAddDetailsBox','tableToTargetid','tableToid','targetPostMakList','targetunit'],
data() {
return {
butLoadings:false, //Loading
tableAddDetailsBoxes:this.tableAddDetailsBox,
targetId:this.tableToTargetid,
tableId:this.tableToid,
orgPostList:this.targetPostMakList,
addDetailsInfoList:[], //
//
userProps: {
value: "id",
label: "name",
children: "govlist",
emitPath:false,
multiple: true
},
//
optionsclye: [
{
value: 4,
label: '月'
}, {
value: 5,
label: '季度'
}, {
value: 6,
label: '年'
}
],
setDialogPostManBox:false,
multipleSelectiontable:[], //
listIndex:"", //
}
},
created(){
},
watch:{
tableAddDetailsBox(){
this.tableAddDetailsBoxes = this.tableAddDetailsBox
},
tableToTargetid(){
this.targetId = this.tableToTargetid
},
tableToid(){
this.tableId = this.tableToid
this.addTablePostDetailsCont()
},
targetPostMakList:{
handler(newVal){
// console.log("newVal");
// console.log("newVal------------>",newVal);
// this.orgPostList = this.targetPostMakList
// console.log("newVal-----222------->",this.targetPostMakList);
},
deep: true
},
},
methods:{
//
addTablePostDetailsCont(){
let detailsInfo = {
title:"", //
punishtype:1, //1:23
standard:"", //
unit:this.targetunit,
cashstandard:"", //
types:1, //1:23
inspemethod:[1], //
cycle:4, //
frequency:"", //
evidence:"", //
remarks:"", //
postandexport:[], //
}
this.addDetailsInfoList.push(detailsInfo);
},
//
closeTableAddBox(){
this.tableAddDetailsBoxes = false;
// this.$refs.setPostManTables.clearSelection();
this.$emit('closeTableAddBox');
this.addDetailsInfoList = [];
},
//
async setTablePostAndReport(val){
this.setDialogPostManBox = true;
this.listIndex = val.$index
// this.getOrgPostLists()
let sendData = {
id:this.targetId.toString()
}
const res = await getNewTargetDepartPostMan(sendData)
this.orgPostList =res.data.organdpostlist
if(val.row.postandexport != null && val.row.postandexport.length > 0){
// val.row.postandexport.forEach(item=>{
// this.$refs.setPostManTables.toggleRowSelection(item, true);
// })
this.orgPostList.forEach((item,indx) =>{
val.row.postandexport.forEach(items=>{
if(item.id == items.id && item.orgid == items.orgid){
console.log("色织关联人---------0--------->",item,indx)
item.keylist = items.keylist
this.$nextTick(() => {
this.$refs.setPostManTables.toggleRowSelection(item, true)
})
}
})
})
}else{
this.$nextTick(() => {
for (let i = 0; i < this.orgPostList.length; i++) {
this.$refs.setPostManTables.toggleRowSelection(this.orgPostList[i], true)
}
})
}
console.log("色织关联人---------1--------->",this.listIndex)
console.log("色织关联人---------2--------->",val.row.postandexport)
console.log("色织关联人---------3--------->",this.orgPostList)
console.log("色织关联人---------4--------->",val.row)
},
//
deleteRulesTableList(row){
if(this.addDetailsInfoList.length - 1 > 0){
this.addDetailsInfoList.splice(row.$index,1);
}else{
this.$alert('<strong>至少要有一条细则内容!</strong>!</strong>', '温馨提示!', {
confirmButtonText: '确定',
type: 'warning',
center: true,
dangerouslyUseHTMLString: true
})
}
},
//
closeSetPostAndReportBoxes(){
this.setDialogPostManBox = false;
this.butLoadings= false;
this.clearAllSetTable();
this.multipleSelectiontable = [];
},
//
setIsTruePostManEs(){
if(this.multipleSelectiontable != null && this.multipleSelectiontable.length >0){
let isShouw = true;
this.multipleSelectiontable.forEach(item=>{
if(item.keylist == null || item.keylist.length < 1){
this.$alert('<strong>请检查您选中的岗位,存在未选择提报人的选项!!</strong>!</strong>', '温馨提示!', {
confirmButtonText: '确定',
type: 'warning',
center: true,
dangerouslyUseHTMLString: true
})
isShouw = false;
return false;
}
})
if(!isShouw){
return false;
}
}else{
this.$alert('<strong>至少要关联一个岗位!</strong>!</strong>!</strong>', '温馨提示!', {
confirmButtonText: '确定',
type: 'warning',
center: true,
dangerouslyUseHTMLString: true
})
return false;
}
// this.$refs.setPostManTable
// console.log("--111111---->",this.multipleSelectiontable,this.addDetailsInfoList[this.listIndex])
this.addDetailsInfoList[this.listIndex].postandexport = this.multipleSelectiontable
// console.log("--22222---->",this.multipleSelectiontable,this.addDetailsInfoList)
this.closeSetPostAndReportBoxes()
},
//
handleSelectionChangees(val){
this.multipleSelectiontable = val;
},
//
clearAllSetTable(){
this.$refs.setPostManTables.clearSelection();
},
//
async addTableDetails(){
console.log("提交添加数据---->",this.addDetailsInfoList)
this.butLoadings= true
if(this.addDetailsInfoList == null || this.addDetailsInfoList.length <1){
this.$alert('<strong>请您至少添加一条考核细则内容!</strong>', '温馨提示!', {
confirmButtonText: '确定',
type: 'warning',
center: true,
dangerouslyUseHTMLString: true
})
this.butLoadings= false
return false;
}
let nextWriterIsTrue = true;
this.addDetailsInfoList.forEach(item=>{
if(item.title == null || item.title == ""){
nextWriterIsTrue = false;
// console.log("1----------------->")
}
switch (item.punishtype){
case 2:
if(item.cashstandard == null || item.cashstandard == ""){
nextWriterIsTrue = false;
// console.log("5-----1------------>")
}
break;
case 3:
if(item.standard == null || item.standard == ""){
nextWriterIsTrue = false;
// console.log("5-----3------------>")
}
if(item.cashstandard == null || item.cashstandard == ""){
nextWriterIsTrue = false;
// console.log("5-----2------------>")
}
break;
default:
if(item.standard == null || item.standard == ""){
nextWriterIsTrue = false;
// console.log("5-----4------------>")
}
break;
}
if(item.unit == null || item.unit == ""){
nextWriterIsTrue = false;
// console.log("2----------------->")
}
if(item.types == null || item.types == "" || item.types == 0){
nextWriterIsTrue = false;
// console.log("3----------------->")
}
if(item.inspemethod == null || item.inspemethod.length <1){
nextWriterIsTrue = false;
// console.log("4----------------->")
}else{
item.inspemethod = item.inspemethod.map(String)
}
// if(item.postandexport == null || item.postandexport.length < 1){
// nextWriterIsTrue = false;
// // console.log("5----------------->")
// }
});
if(!nextWriterIsTrue){
this.$alert('<strong>至少一条考核细则内容填写不符合规范!请检查并补充完成后,重新提交!</strong>', '温馨提示!', {
confirmButtonText: '确定',
type: 'warning',
center: true,
dangerouslyUseHTMLString: true
})
this.butLoadings= false
return false;
}
let sendData = {
targetid:this.targetId.toString(),
tableid:this.tableId.toString(),
detailslist:this.addDetailsInfoList
}
const res = await addTableDetailsList(sendData)
console.log("提交添加数据--1-->",sendData,res)
if(res.code == 0){
this.$message({
showClose: true,
message: res.msg,
type: 'success'
});
// this.getTargetPostDetailsList();
this.$emit('getTargetPostDetailsList');
this.closeTableAddBox();
this.butLoadings= false
}else{
this.butLoadings= false
}
},
//
async getOrgPostLists(){
let sendData = {
id:this.targetId.toString()
}
const res = await getNewTargetDepartPostMan(sendData)
if(res.code ==0){
this.orgPostList = res.data.organdpostlist
}
},
}
}
</script>
<style>
</style>

1303
src/views/basicCont/targettabslayout/targetdetails.vue

File diff suppressed because it is too large

2
src/views/basicInfo/assessmentDimension.vue

@ -192,8 +192,10 @@ export default {
// //
async showEdit(row){ async showEdit(row){
this.editFrom.outid=row.outId this.editFrom.outid=row.outId
const res = await getdutyclassinfo(this.editFrom) const res = await getdutyclassinfo(this.editFrom)
this.editAdd = res.data this.editAdd = res.data
this.editAdd.outID = row.outId
this.editDialogFormVisible=true; this.editDialogFormVisible=true;
}, },

2
src/views/basicInfo/gwProject.vue

@ -1013,7 +1013,7 @@ export default {
} }
}); });
console.log("新增按钮------------->",this.relevantpostsman); console.log("新增按钮------------->",this.otherOrgList);
}, },
// //
async showEdit(row) { async showEdit(row) {

16
src/views/mete/index.vue

@ -390,14 +390,14 @@ export default {
// list:this.fromData // list:this.fromData
list:[row] list:[row]
} }
console.log("提交------------->",row,from) // console.log("------------->",row,from)
// const res = await quanOperation(from) const res = await quanOperation(from)
// if (res.code === 0) { if (res.code === 0) {
// this.$message({ this.$message({
// type: 'success', type: 'success',
// message: res.msg message: res.msg
// }) })
// } }
}) })

216
src/views/workflow/flow.vue

@ -1,89 +1,183 @@
<template> <template>
<el-main > <div>
<workflow <div class="fd-nav-content">
:data="data"
@ok="ok" <section class="dingflow-design">
/> <div class="box-scale" id="box-scale" :style="'transform: scale('+nowVal/100+'); transform-origin: 50% 0px 0px;'">
</el-main> <nodeWrap :nodeConfig.sync="nodeConfig" :flowPermission.sync="flowPermission"></nodeWrap>
<div class="end-node">
<div class="end-node-circle"></div>
<div class="end-node-text">流程结束</div>
</div>
</div>
</section>
</div>
<promoterDrawer />
<approverDrawer :directorMaxLevel="directorMaxLevel"/>
</div>
</template> </template>
<script> <script>
import workflow from 'workflow-ui/src/components/Generator'
import 'workflow-ui/lib/workflow-ui.css' //
import { getShiyanData } from "@/api/workflowapi/workflowaip"
import promoterDrawer from "@/components/drawer/promoterDrawer"
import approverDrawer from '@/components/drawer/approverDrawer'
import { mapMutations } from 'vuex'
export default { export default {
components: { components: {
workflow promoterDrawer,
approverDrawer
}, },
data() { data() {
return { return {
data:{}, nowVal:100,
title: '请假', nodeConfig: {},
node: { flowPermission: [],
name: '发起人', processConfig: {},
type: 'start', directorMaxLevel: 0,
nodeId: 'sid-startevent', workFlowDef: {},
childNode: {}
}
} }
}, },
created(){ created(){
this.getInitData()
},
computed:{
// selectedNode(){
// return this.$store.state.selectedNode
// }
}, },
methods:{ methods:{
ok (data) { ...mapMutations(['setTableId', 'setIsTried','setPromoter']),
console.log("ok------>",data) //
}, async getInitData(){
toReturn() { const res = await getShiyanData()
//window.location.href = "" console.log("获取初始化数据---->",res)
}, this.processConfig = res.data;
async saveData() { let { nodeConfig, flowPermission, directorMaxLevel, workFlowDef, tableId } = res.data;
console.log("发布流程") this.nodeConfig = nodeConfig;
}, this.flowPermission = flowPermission;
validate(){ this.directorMaxLevel = directorMaxLevel;
return this.$refs["process-tree"].validateProcess() this.workFlowDef = workFlowDef;
this.setTableId(tableId)
}, },
nodeSelected(node){
console.log('配置节点', node)
this.showConfig = true
}
} }
} }
</script> </script>
<style scoped> <style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #333333;
}
.clear:before,
.clear:after {
content: " ";
display: table;
}
.clear:after {
clear: both;
}
</style> .ellipsis {
<style lang="less" scoped> overflow: hidden;
.design { text-overflow: ellipsis;
margin-top: 100px; white-space: nowrap;
display: flex;
transform-origin: 50% 0px 0px;
} }
.scale { .l {
z-index: 999; float: left;
position: fixed; }
top: 80px;
right: 40px; input {
text-indent: 10px;
}
span { select {
margin: 0 10px; text-indent: 8px;
font-size: 15px;
color: #7a7a7a;
width: 50px;
}
} }
.node-config-content{ .ml_10 {
padding: 0 20px 20px; margin-left: 10px;
} }
/deep/ .el-drawer__body{ .mr_10 {
overflow-y: auto; margin-right: 10px;
}
.radio_box a,
.check_box a {
font-size: 12px;
position: relative;
padding-left: 20px;
margin-right: 30px;
cursor: pointer;
color: #333;
}
.check_box.not a:hover {
color: #333;
}
.check_box.not a::before,
.check_box.not a:hover::before {
border: none;
}
.check_box.not.active {
background: #f3f3f3;
}
.radio_box a:hover::before,
.check_box a:hover::before {
border: 1px solid #46a6fe;
}
.radio_box a::before,
.check_box a::before {
position: absolute;
width: 14px;
height: 14px;
border: 1px solid #dcdfe6;
border-radius: 2px;
left: 0;
top: 1px;
content: "";
}
.radio_box a::before {
border-radius: 50%;
}
.check-dot.active::after,
.radio_box a.active::after,
.check_box a.active::after {
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
top: 3px;
left: 3px;
content: "";
}
.radio_box a.active::after {
background: #46a6fe;
}
.check_box a.active::after {
background: url(~@/assets/images/check_box.png) no-repeat center;
}
.error-modal-list {
width: 455px;
} }
</style> </style>

89
src/views/workflow/flow2.vue

@ -0,0 +1,89 @@
<template>
<el-main >
<workflow
:data="data"
@ok="ok"
/>
</el-main>
</template>
<script>
import workflow from 'workflow-ui/src/components/Generator'
import 'workflow-ui/lib/workflow-ui.css'
export default {
components: {
workflow
},
data() {
return {
// data:{},
title: '请假',
data: {
name: '发起人',
type: 'start',
nodeId: 'sid-startevent',
childNode: {}
}
}
},
created(){
},
computed:{
selectedNode(){
return this.$store.state.selectedNode
}
},
methods:{
ok (data) {
console.log("ok------>",data)
},
toReturn() {
//window.location.href = ""
},
async saveData() {
console.log("发布流程")
},
validate(){
return this.$refs["process-tree"].validateProcess()
},
nodeSelected(node){
console.log('配置节点', node)
this.showConfig = true
}
}
}
</script>
<style scoped>
</style>
<style lang="less" scoped>
.design {
margin-top: 100px;
display: flex;
transform-origin: 50% 0px 0px;
}
.scale {
z-index: 999;
position: fixed;
top: 80px;
right: 40px;
span {
margin: 0 10px;
font-size: 15px;
color: #7a7a7a;
width: 50px;
}
}
.node-config-content{
padding: 0 20px 20px;
}
/deep/ .el-drawer__body{
overflow-y: auto;
}
</style>
Loading…
Cancel
Save