|
@@ -100,7 +100,7 @@
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="addForm.time"
|
|
v-model="addForm.time"
|
|
type="date"
|
|
type="date"
|
|
-
|
|
|
|
|
|
+
|
|
placeholder="请选择整改日期"
|
|
placeholder="请选择整改日期"
|
|
:disabled="type === 'changeRow' || type === 'review' || type === 'view'"
|
|
:disabled="type === 'changeRow' || type === 'review' || type === 'view'"
|
|
/>
|
|
/>
|
|
@@ -108,7 +108,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :span="12">
|
|
|
|
|
|
+ <el-col :span="8">
|
|
<el-form-item label="整改人" prop="key4">
|
|
<el-form-item label="整改人" prop="key4">
|
|
<HcTasksUser
|
|
<HcTasksUser
|
|
:disabled="type === 'changeRow' || type === 'review' || type === 'view'"
|
|
:disabled="type === 'changeRow' || type === 'review' || type === 'view'"
|
|
@@ -133,6 +133,18 @@
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <div class="hc-process-box">
|
|
|
|
+ <el-scrollbar style="max-height: 200px;">
|
|
|
|
+ <div v-for="(item, index) in processDataList" class="process-item-box">
|
|
|
|
+ <div class="process-item">
|
|
|
|
+ {{ item.path }}
|
|
|
|
+ </div>
|
|
|
|
+ <HcIcon class="process-icon" fill name="close-circle" @click="deleProcess(index)" />
|
|
|
|
+ </div>
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<div style="position: relative; height: 400px">
|
|
<div style="position: relative; height: 400px">
|
|
<HcTable :column="tableColumn" :datas="tableData">
|
|
<HcTable :column="tableColumn" :datas="tableData">
|
|
@@ -183,6 +195,7 @@
|
|
:datas="searchTreeData"
|
|
:datas="searchTreeData"
|
|
show-checkbox
|
|
show-checkbox
|
|
default-expand-all
|
|
default-expand-all
|
|
|
|
+ :default-checked-keys="defaultChecked"
|
|
@nodeTap="wbsElTreeClick"
|
|
@nodeTap="wbsElTreeClick"
|
|
@check="divisionTreeCheck"
|
|
@check="divisionTreeCheck"
|
|
>
|
|
>
|
|
@@ -193,8 +206,9 @@
|
|
<el-scrollbar v-show="!isSearchTree" class="scroll-bar-right-16">
|
|
<el-scrollbar v-show="!isSearchTree" class="scroll-bar-right-16">
|
|
<div class=" node-many-tree">
|
|
<div class=" node-many-tree">
|
|
<HcLazyTree
|
|
<HcLazyTree
|
|
- ref="wbstree"
|
|
|
|
|
|
+ ref="processElTree"
|
|
show-checkbox
|
|
show-checkbox
|
|
|
|
+ :default-checked-keys="defaultChecked"
|
|
@check="divisionTreeCheck"
|
|
@check="divisionTreeCheck"
|
|
@load="treeLoadNode"
|
|
@load="treeLoadNode"
|
|
@nodeTap="wbsElTreeClick"
|
|
@nodeTap="wbsElTreeClick"
|
|
@@ -359,8 +373,66 @@ const linksRelateModalClick = ()=>{
|
|
const linksRelateModalClose = ()=>{
|
|
const linksRelateModalClose = ()=>{
|
|
linksRelateModal.value = false
|
|
linksRelateModal.value = false
|
|
}
|
|
}
|
|
|
|
+const processDataList = ref([])
|
|
const linksRelateModalSave = ()=>{
|
|
const linksRelateModalSave = ()=>{
|
|
console.log('baocun')
|
|
console.log('baocun')
|
|
|
|
+ const keys = processElTree.value.treeRef.getCheckedKeys()
|
|
|
|
+ let linkTabIds = []
|
|
|
|
+ if (keys.length === 0) {
|
|
|
|
+ linkTabIds = []
|
|
|
|
+ }
|
|
|
|
+ //去出掉取消勾选的
|
|
|
|
+ for (let index = 0; index < keys.length; index++) {
|
|
|
|
+ linkTabIds = linkTabIds.filter((ele)=>{
|
|
|
|
+ if (ele.primaryKeyId === keys[index]) {
|
|
|
|
+ return ele
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ for (let index = 0; index < keys.length; index++) {
|
|
|
|
+ let pathArr = []
|
|
|
|
+ let node = processElTree.value.treeRef.getNode(keys[index])
|
|
|
|
+ getPathName(node, pathArr)
|
|
|
|
+ linkTabIds.push({
|
|
|
|
+ path: pathArr.join('/'),
|
|
|
|
+ primaryKeyId: keys[index],
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ //去除掉重复的
|
|
|
|
+ getNorepeatArr(linkTabIds)
|
|
|
|
+ console.log(linkTabIds, 'linkTabIds')
|
|
|
|
+ processDataList.value = linkTabIds
|
|
|
|
+ linksRelateModal.value = false
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+const getNorepeatArr = (tempArr)=> {
|
|
|
|
+ let newArr = []
|
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
|
+ if (newArr.indexOf(tempArr[i].primaryKeyId) == -1) {
|
|
|
|
+ newArr.push(tempArr[i].primaryKeyId)
|
|
|
|
+ } else {
|
|
|
|
+ tempArr.splice(i, 1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return tempArr
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+//获取节点的路径名字
|
|
|
|
+const getPathName = (node, pathArr) => {
|
|
|
|
+ if (node.parent?.parent) {
|
|
|
|
+ pathArr.unshift(node.data?.title.replace(/(^\s*)|(\s*$)/g, '')) //去掉头尾空格
|
|
|
|
+ getPathName(node.parent, pathArr)
|
|
|
|
+ } else {
|
|
|
|
+ return //根节点结束
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//移除工序
|
|
|
|
+const deleProcess = (index) => {
|
|
|
|
+ const linkTabIds = processDataList.value
|
|
|
|
+ linkTabIds.splice(index, 1)
|
|
|
|
+
|
|
|
|
+ processDataList.value = linkTabIds
|
|
}
|
|
}
|
|
const searchTreeVal = ref('')
|
|
const searchTreeVal = ref('')
|
|
const isSearchTree = ref(false)
|
|
const isSearchTree = ref(false)
|
|
@@ -435,6 +507,8 @@ const divisionTreeItemInfo = ref({})
|
|
const divisionTreeCheck = ({ data }) => {
|
|
const divisionTreeCheck = ({ data }) => {
|
|
divisionTreeItemInfo.value = data
|
|
divisionTreeItemInfo.value = data
|
|
}
|
|
}
|
|
|
|
+const defaultChecked = ref([]) //默认选中
|
|
|
|
+const processElTree = ref(null)
|
|
const goList = ()=>{
|
|
const goList = ()=>{
|
|
router.push({
|
|
router.push({
|
|
path: '/patrol/safe',
|
|
path: '/patrol/safe',
|
|
@@ -459,6 +533,38 @@ const goBack = ()=>{
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
|
|
-<style lang='scss'>
|
|
|
|
-
|
|
|
|
|
|
+<style lang='scss' scoped>
|
|
|
|
+ .hc-process-box {
|
|
|
|
+
|
|
|
|
+ position: relative;
|
|
|
|
+ flex: 1;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ .hc-scrollbar-box {
|
|
|
|
+ display: contents;
|
|
|
|
+ }
|
|
|
|
+ .process-item-box {
|
|
|
|
+ position: relative;
|
|
|
|
+ color: #838791;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ padding: 8px 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+ .process-item {
|
|
|
|
+ position: relative;
|
|
|
|
+ flex: 1;
|
|
|
|
+ }
|
|
|
|
+ .process-icon {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ margin-left: 16px;
|
|
|
|
+ transition: color 0.2s;
|
|
|
|
+ &:hover {
|
|
|
|
+ color: var(--el-color-primary-light-3);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .process-item-box + .process-item-box {
|
|
|
|
+ border-top: 0.5px solid #e9e9e9;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|