Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -312,7 +312,8 @@
|
||||
path:'/docManage/splitting/splitDetail',
|
||||
query: {
|
||||
infoId:val.id,
|
||||
infoNumber:val.serialNumber
|
||||
infoNumber:val.serialNumber,
|
||||
createBy:val.createBy
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<div class="split-detail-wrap">
|
||||
<div class="split-detail-left">
|
||||
<div class="split-detail-left-tree">
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')" @change="onLeftChange" @search="onSearch" />
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')" @change="onLeftChange"
|
||||
@search="onSearch"/>
|
||||
<a-tree
|
||||
v-if="gData.length>0"
|
||||
:selected-keys="selectedKeys"
|
||||
@@ -21,13 +22,19 @@
|
||||
<template #title="{ key: treeKey, title, record }">
|
||||
<a-dropdown :trigger="['contextmenu']">
|
||||
<!-- <span>{{ title }}</span>-->
|
||||
<span v-if="title.indexOf(searchValue) >= -1 && title.length <= 18" :title="title" class="expand-title">
|
||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
||||
<span v-if="title.indexOf(searchValue) >= -1 && title.length <= 18" :title="title"
|
||||
class="expand-title">
|
||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span
|
||||
style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
||||
</span>
|
||||
<span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18" :title="title">
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)>18"
|
||||
:title="title">
|
||||
{{title && title.length > 18?title.slice(0,17)+'...':title}}
|
||||
</span>
|
||||
<span v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18" :title="title">
|
||||
<span
|
||||
v-else-if="title.indexOf(searchValue) >= -1 && title.length > 18 && title.indexOf(searchValue)<=18"
|
||||
:title="title">
|
||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ title.indexOf(searchValue)+searchValue.length>18?searchValue.substr(0,18-title.indexOf(searchValue)) : searchValue }}</span>{{ title.indexOf(searchValue)+searchValue.length>18?'...': title.substr(title.indexOf(searchValue) + searchValue.length,18-title.indexOf(searchValue) - searchValue.length)+'...' }}
|
||||
|
||||
</span>
|
||||
@@ -35,10 +42,16 @@
|
||||
{{title && title.length > 18?title.slice(0,17)+'...':title}}
|
||||
</span>
|
||||
<template #overlay>
|
||||
<a-menu @click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">
|
||||
<a-menu-item key="1" @click="orgAdd" v-has="'split:sarFileSplitMenu:add'">{{$t('newNode')}}</a-menu-item>
|
||||
<a-menu-item key="2" @click="orgEdit" v-has="'split:sarFileSplitMenu:update'">{{$t('modifyNode')}}</a-menu-item>
|
||||
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode" v-has="'split:sarFileSplitMenu:delete'">{{$t('deleteNode')}}</a-menu-item>
|
||||
<a-menu v-if="$route.query.createBy == userData.username"
|
||||
@click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">
|
||||
<a-menu-item key="1" @click="orgAdd" v-has="'split:sarFileSplitMenu:add'">{{$t('newNode')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" @click="orgEdit" v-has="'split:sarFileSplitMenu:update'">
|
||||
{{$t('modifyNode')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode"
|
||||
v-has="'split:sarFileSplitMenu:delete'">{{$t('deleteNode')}}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -53,37 +66,54 @@
|
||||
:menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleCopyManage" v-has="'split:sarFileSplitItems:copy'">
|
||||
<div class="operator-text" @click="handleCopyManage"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:copy'">
|
||||
<a-icon type="copy"/>
|
||||
{{ $t('copy') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleAddManage" v-has="'split:sarFileSplitItems:add'">
|
||||
<div class="operator-text" @click="handleAddManage"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:add'">
|
||||
<a-icon type="plus"/>
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text upload-split" @click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId===undefined||uploadMenuId===''" />{{ (uploadMenuId===''||uploadMenuId===undefined)? $t('import'):'' }}
|
||||
<upload v-if="menuId" ref="uploadSplit":infoId="infoId" :menuId="uploadMenuId" @uploadSuccess="uploadSuccess"></upload>
|
||||
<div class="operator-text upload-split"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
@click="handleImportManage" v-has="'split:sarFileSplitItems:import'">
|
||||
<a-icon type="import" :rotate="-90" v-if="uploadMenuId===undefined||uploadMenuId===''"/>
|
||||
{{ (uploadMenuId===''||uploadMenuId===undefined)? $t('import'):'' }}
|
||||
<upload v-if="menuId" ref="uploadSplit" :infoId="infoId" :menuId="uploadMenuId"
|
||||
@uploadSuccess="uploadSuccess"></upload>
|
||||
<!-- <ImportFile :url="url"/>-->
|
||||
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage" v-has="'split:sarFileSplitItems:export'">
|
||||
<div class="operator-text" @click="handleExportManage"
|
||||
v-has="'split:sarFileSplitItems:export'">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDownManage" v-has="'split:sarFileSplitItems:template'">
|
||||
<div class="operator-text" @click="handleDownManage"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:template'">
|
||||
<a-icon type="download"/>
|
||||
{{ $t('TemplateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleMergeManage" v-has="'split:sarFileSplitItems:merge'">
|
||||
<div class="operator-text" @click="handleMergeManage"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:merge'">
|
||||
<a-icon type="snippets"/>
|
||||
{{ $t('MergerClause') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleManage" v-has="'split:sarFileSplitItems:set'">
|
||||
<div class="operator-text" @click="handleManage"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:set'">
|
||||
<a-icon type="setting"/>
|
||||
{{ $t('BatchSetting') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleBatCancel" v-has="'split:sarFileSplitItems:delete'">
|
||||
<div class="operator-text" @click="handleBatCancel"
|
||||
v-if="$route.query.createBy == userData.username"
|
||||
v-has="'split:sarFileSplitItems:delete'">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('BatchDelete') }}
|
||||
</div>
|
||||
@@ -96,7 +126,7 @@
|
||||
:OperationList="OperationList"
|
||||
:infoId="$route.query.infoId"
|
||||
:menuId="menuId"
|
||||
:showAction="true"
|
||||
:showAction="$route.query.createBy == userData.username ? true :false"
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
@@ -140,7 +170,9 @@
|
||||
<a-input v-model="form.itemName" :placeholder="$t('PleaseEnter')+$t('clauseName')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('serialNumber')" prop="displaySeq">
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999" :placeholder="$t('PleaseEnter')+$t('serialNumber')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999"
|
||||
:placeholder="$t('PleaseEnter')+$t('serialNumber')" :formatter="limitNumber"
|
||||
:parser="limitNumber" style="width: 100%"/>
|
||||
<!-- <a-input-number v-model="rowCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />-->
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
@@ -164,7 +196,9 @@
|
||||
:ids="ids">
|
||||
</split-bat-form>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" @closeVisible="closeVisible" @sumber="sumber"></split-add-form>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'"
|
||||
:url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" @closeVisible="closeVisible"
|
||||
@sumber="sumber"></split-add-form>
|
||||
|
||||
</div>
|
||||
</a-card>
|
||||
@@ -185,6 +219,8 @@
|
||||
import moment from 'moment'
|
||||
import eventBUs from '@/common/event'
|
||||
import Vue from 'vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'SplitDetail',
|
||||
components: {
|
||||
@@ -192,12 +228,13 @@
|
||||
TableData,
|
||||
SplitBatForm,
|
||||
SplitAddForm,
|
||||
upload,
|
||||
upload
|
||||
// ImportFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
labelCol: { span: 6 },
|
||||
userData: {},
|
||||
wrapperCol: { span: 16 },
|
||||
contentVisible: false, //条款内容弹框显示
|
||||
queryParams: {
|
||||
@@ -230,16 +267,16 @@
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('clauseNo'), trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||
],
|
||||
itemName: [
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('clauseName'), trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||
],
|
||||
displaySeq: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('serialNumber'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('serialNumber'), trigger: 'blur' }
|
||||
// { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
]
|
||||
},
|
||||
infoId: '',
|
||||
menuId: '',
|
||||
@@ -266,11 +303,11 @@
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||
updateInfo: '/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||
getDocumentInfo: 'split/sarFileSplitItems/getSplitItemsById',
|
||||
importZipUrl: '/split/sarFileSplitItems/importSplitItems',//导入
|
||||
importZipUrl: '/split/sarFileSplitItems/importSplitItems'//导入
|
||||
},
|
||||
urlBatSet: {
|
||||
getAddForm: 'split/sarFileSplitItems/getBatchSetForm',
|
||||
addInfo:'/jero-boot/split/sarFileSplitItems/batchSet',
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/batchSet'
|
||||
},
|
||||
batSetVisible: false, //批量设置弹框显示
|
||||
ids: '',
|
||||
@@ -283,7 +320,7 @@
|
||||
parameter: {},
|
||||
widthBrown: '',
|
||||
creenWidth: document.body.clientWidth,
|
||||
brownHeight:document.documentElement.clientHeight,
|
||||
brownHeight: document.documentElement.clientHeight
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -297,11 +334,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
const that = this;
|
||||
const that = this
|
||||
let client = ''
|
||||
let width = ''
|
||||
// this.widthBrown = window.screenWidth || document.body.clientWidth;
|
||||
@@ -321,14 +356,15 @@
|
||||
// }, false);
|
||||
|
||||
|
||||
|
||||
this.userData = this.userInfo()
|
||||
this.infoId = this.$route.query.infoId
|
||||
console.log('info', this.$route.query)
|
||||
this.loadMenuData()
|
||||
// this.loadData()
|
||||
this.generateList(this.gData);
|
||||
this.generateList(this.gData)
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
//显示条款内容弹框
|
||||
showContent(val) {
|
||||
this.contentVisible = true
|
||||
@@ -336,52 +372,52 @@
|
||||
},
|
||||
//关闭条款内容弹框
|
||||
handleCancel() {
|
||||
this.contentVisible = false;
|
||||
this.contentVisible = false
|
||||
},
|
||||
generateList(data) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const node = data[i];
|
||||
const key = node.key;
|
||||
this.dataList.push({ key, title: key });
|
||||
const node = data[i]
|
||||
const key = node.key
|
||||
this.dataList.push({ key, title: key })
|
||||
if (node.children) {
|
||||
this.generateList(node.children);
|
||||
this.generateList(node.children)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getParentKey(key, tree) {
|
||||
let parentKey;
|
||||
let parentKey
|
||||
for (let i = 0; i < tree.length; i++) {
|
||||
const node = tree[i];
|
||||
const node = tree[i]
|
||||
if (node.children) {
|
||||
if (node.children.some(item => item.key === key)) {
|
||||
parentKey = node.key;
|
||||
parentKey = node.key
|
||||
} else if (this.getParentKey(key, node.children)) {
|
||||
parentKey = this.getParentKey(key, node.children);
|
||||
parentKey = this.getParentKey(key, node.children)
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentKey;
|
||||
return parentKey
|
||||
},
|
||||
onExpand(expandedKeys) {
|
||||
// console.log('expandedKeys',expandedKeys)
|
||||
this.expandedKeys = expandedKeys;
|
||||
this.autoExpandParent = false;
|
||||
this.expandedKeys = expandedKeys
|
||||
this.autoExpandParent = false
|
||||
},
|
||||
onLeftChange(e) {
|
||||
const value = e.target.value;
|
||||
const value = e.target.value
|
||||
const expandedKeys = this.dataList
|
||||
.map(item => {
|
||||
if (item.title.indexOf(value) > -1) {
|
||||
return this.getParentKey(item.key, this.gData);
|
||||
return this.getParentKey(item.key, this.gData)
|
||||
}
|
||||
return null;
|
||||
return null
|
||||
})
|
||||
.filter((item, i, self) => item && self.indexOf(item) === i);
|
||||
.filter((item, i, self) => item && self.indexOf(item) === i)
|
||||
Object.assign(this, {
|
||||
expandedKeys,
|
||||
searchValue: value,
|
||||
autoExpandParent: true,
|
||||
autoExpandParent: true
|
||||
})
|
||||
this.onSearch()
|
||||
},
|
||||
@@ -397,7 +433,7 @@
|
||||
this.gData = [...this.data]
|
||||
Object.assign(this, {
|
||||
expandedKeys: this.expandedKeys,
|
||||
autoExpandParent: true,
|
||||
autoExpandParent: true
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
@@ -408,29 +444,29 @@
|
||||
toTree(config) {
|
||||
// 删除 所有 children,以防止多次调用
|
||||
config.forEach(function(item) {
|
||||
delete item.children;
|
||||
});
|
||||
delete item.children
|
||||
})
|
||||
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||
let map = {};
|
||||
let map = {}
|
||||
config.forEach((item) => {
|
||||
item.label = item.name;
|
||||
item.key=item.id;
|
||||
item.label = item.name
|
||||
item.key = item.id
|
||||
item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
|
||||
map[item.id] = item;
|
||||
});
|
||||
let val = [];
|
||||
map[item.id] = item
|
||||
})
|
||||
let val = []
|
||||
config.forEach((item) => {
|
||||
// 以当前遍历项,的pid,去map对象中找到索引的id
|
||||
let parent = map[item.pid];
|
||||
let parent = map[item.pid]
|
||||
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||
val.push(item);
|
||||
val.push(item)
|
||||
}
|
||||
});
|
||||
return val;
|
||||
})
|
||||
return val
|
||||
},
|
||||
//鼠标右键
|
||||
rightClick({ event, node }) {
|
||||
@@ -439,8 +475,8 @@
|
||||
// console.log('eee',event,node)
|
||||
// this.NodeTreeItemVisible=true
|
||||
const x =
|
||||
event.currentTarget.offsetLeft + event.currentTarget.clientWidth;
|
||||
const y = event.currentTarget.offsetTop;
|
||||
event.currentTarget.offsetLeft + event.currentTarget.clientWidth
|
||||
const y = event.currentTarget.offsetTop
|
||||
this.NodeTreeItem = {
|
||||
pageX: x,
|
||||
pageY: y,
|
||||
@@ -450,7 +486,7 @@
|
||||
displaySeq: node._props.dataRef.displaySeq,
|
||||
title: node._props.dataRef.title,
|
||||
pid: node._props.dataRef.pid || null
|
||||
};
|
||||
}
|
||||
this.nodeItem = JSON.parse(JSON.stringify(this.NodeTreeItem))
|
||||
// this.form.pid=this.NodeTreeItem.id
|
||||
// this.form.id=this.NodeTreeItem.id
|
||||
@@ -462,12 +498,12 @@
|
||||
top: `${y + 6 - 0}px`,
|
||||
background: `#FFFFFF`,
|
||||
zIndex: `2`
|
||||
};
|
||||
}
|
||||
// console.log('NodeTreeItem',this.NodeTreeItem)
|
||||
},
|
||||
// 用于点击空白处隐藏增删改菜单
|
||||
clearMenu() {
|
||||
this.NodeTreeItem = null;
|
||||
this.NodeTreeItem = null
|
||||
// this.NodeTreeItemVisible=false
|
||||
},
|
||||
//选择树节点
|
||||
@@ -477,7 +513,7 @@
|
||||
this.selectedKeys = selectedKeys
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.parameter.info_id = this.infoId
|
||||
@@ -518,7 +554,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -530,7 +566,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onContextMenuClick(treeKey, menuKey,) {
|
||||
onContextMenuClick(treeKey, menuKey) {
|
||||
// console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
|
||||
},
|
||||
//清空按钮
|
||||
@@ -551,7 +587,7 @@
|
||||
let params = {
|
||||
infoId: this.infoId,
|
||||
pid: this.nodeItem.id,
|
||||
...this.form,
|
||||
...this.form
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
@@ -570,7 +606,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -588,7 +624,7 @@
|
||||
} else {
|
||||
let params = {
|
||||
info_id: this.infoId,
|
||||
...this.form,
|
||||
...this.form
|
||||
}
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
@@ -683,7 +719,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -694,7 +730,7 @@
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
},
|
||||
}
|
||||
})
|
||||
} else if (menuIds.length == 0) {
|
||||
this.$message.warning(this.$t('PleaseSelectData'))
|
||||
@@ -730,7 +766,7 @@
|
||||
if (status === 'success') {
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
this.loadMenuData()
|
||||
@@ -813,7 +849,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -855,7 +891,7 @@
|
||||
this.selectClear()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -894,7 +930,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -905,13 +941,14 @@
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
onCancel() {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
@@ -963,7 +1000,7 @@
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -973,8 +1010,8 @@
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
// postAction(`split/sarFileSplitItems/batchDeleteItems`,params).then(res=> {
|
||||
@@ -991,12 +1028,13 @@
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
onCancel() {
|
||||
}
|
||||
})
|
||||
},
|
||||
//选择框
|
||||
onSelectChange(selectedRowKeys, rows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = rows
|
||||
this.selecIds = selectedRowKeys
|
||||
// console.log('rows',this.selectedRows)
|
||||
@@ -1014,24 +1052,24 @@
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
let self = this;
|
||||
let self = this
|
||||
let tree = JSON.parse(JSON.stringify(this.data))
|
||||
this.expandedKeys = []
|
||||
if (this.searchValue.trim() == "") {
|
||||
if (this.searchValue.trim() == '') {
|
||||
this.gData = JSON.parse(JSON.stringify(this.data))
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (tree && tree.length > 0) {
|
||||
tree.forEach((n, i, a) => {
|
||||
self.searchEach(n,this.searchValue);
|
||||
});
|
||||
self.searchEach(n, this.searchValue)
|
||||
})
|
||||
|
||||
// 没有叶子节点的根节点也要清理掉
|
||||
let length = tree.length;
|
||||
let length = tree.length
|
||||
for (let i = length - 1; i >= 0; i--) {
|
||||
let e2 = tree[i];
|
||||
let e2 = tree[i]
|
||||
if (!this.isHasChildren(e2) && e2.title.indexOf(this.searchValue) <= -1) {
|
||||
tree.splice(i, 1);
|
||||
tree.splice(i, 1)
|
||||
this.expandedKeys.push(e2.key)
|
||||
}
|
||||
}
|
||||
@@ -1039,73 +1077,73 @@
|
||||
}
|
||||
},
|
||||
searchEach(node, value) {
|
||||
let depth = this.getTreeDepth(node);
|
||||
let self = this;
|
||||
let depth = this.getTreeDepth(node)
|
||||
let self = this
|
||||
for (let i = 0; i < depth - 1; i++) {
|
||||
let spliceCounter = 0;
|
||||
let spliceCounter = 0
|
||||
this.traverseTree(node, n => {
|
||||
if (self.isHasChildren(n)) {
|
||||
let children = n.children;
|
||||
let length = children.length;
|
||||
let children = n.children
|
||||
let length = children.length
|
||||
for (let j = length - 1; j >= 0; j--) {
|
||||
let e3 = children[j];
|
||||
let e3 = children[j]
|
||||
if (!self.isHasChildren(e3) && e3.title.indexOf(value) <= -1) {
|
||||
children.splice(j, 1);
|
||||
spliceCounter++;
|
||||
children.splice(j, 1)
|
||||
spliceCounter++
|
||||
} else {
|
||||
this.expandedKeys.push(e3.key)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
if (spliceCounter == 0) {
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
// 判断树形结构中的一个节点是否具有孩子节点
|
||||
isHasChildren(node) {
|
||||
let flag = false;
|
||||
let flag = false
|
||||
if (node.children && node.children.length > 0) {
|
||||
flag = true;
|
||||
flag = true
|
||||
}
|
||||
return flag;
|
||||
return flag
|
||||
},
|
||||
|
||||
// 通过传入根节点获得树的深度
|
||||
getTreeDepth(node) {
|
||||
if (undefined == node || null == node) {
|
||||
return 0;
|
||||
return 0
|
||||
}
|
||||
let r = 0;
|
||||
let currentLevelNodes = [node];
|
||||
let r = 0
|
||||
let currentLevelNodes = [node]
|
||||
while (currentLevelNodes.length > 0) {
|
||||
r++;
|
||||
let nextLevelNodes = new Array();
|
||||
r++
|
||||
let nextLevelNodes = new Array()
|
||||
for (let i = 0; i < currentLevelNodes.length; i++) {
|
||||
let e = currentLevelNodes[i];
|
||||
let e = currentLevelNodes[i]
|
||||
if (this.isHasChildren(e)) {
|
||||
nextLevelNodes = nextLevelNodes.concat(e.children);
|
||||
nextLevelNodes = nextLevelNodes.concat(e.children)
|
||||
}
|
||||
}
|
||||
currentLevelNodes = nextLevelNodes;
|
||||
currentLevelNodes = nextLevelNodes
|
||||
}
|
||||
return r;
|
||||
return r
|
||||
},
|
||||
|
||||
traverseTree(node, callback) {
|
||||
if (!node) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
let stack = [];
|
||||
stack.push(node);
|
||||
let tmpNode;
|
||||
let stack = []
|
||||
stack.push(node)
|
||||
let tmpNode
|
||||
while (stack.length > 0) {
|
||||
tmpNode = stack.pop();
|
||||
callback(tmpNode);
|
||||
tmpNode = stack.pop()
|
||||
callback(tmpNode)
|
||||
if (tmpNode.children && tmpNode.children.length > 0) {
|
||||
for (let i = tmpNode.children.length - 1; i >= 0; i--) {
|
||||
stack.push(tmpNode.children[i]);
|
||||
stack.push(tmpNode.children[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1119,28 +1157,32 @@
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', {}, false);
|
||||
},
|
||||
window.removeEventListener('resize', {}, false)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.split-detail {
|
||||
height: 100% !important;
|
||||
|
||||
.split-detail-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.split-detail-left {
|
||||
height: 100%;
|
||||
min-width: 300px;
|
||||
padding-right: 20px;
|
||||
border-right: 1px solid #E6E7EC;
|
||||
overflow-y: auto;
|
||||
|
||||
.split-detail-left-tree {
|
||||
|
||||
}
|
||||
@@ -1151,28 +1193,34 @@
|
||||
border-bottom: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menu-bottom {
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: #00B3BE;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-right {
|
||||
padding-left: 20px;
|
||||
flex: 1;
|
||||
|
||||
.split-detail-search-header {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-table {
|
||||
.action-edit {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.content-show {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -1183,19 +1231,23 @@
|
||||
line-height: 20px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.split-item {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ant-table-body {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
@@ -1207,6 +1259,7 @@
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.add-menus {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal-footer {
|
||||
@@ -1214,16 +1267,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-right-wraper {
|
||||
.table-page-search-submitButtons {
|
||||
.ant-col-md-6 {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-search-header {
|
||||
.ant-col-sm-8 {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.ant-select-selection--multiple {
|
||||
ul {
|
||||
height: 36px;
|
||||
@@ -1231,35 +1287,42 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-split {
|
||||
.ant-upload {
|
||||
color: #040B29;
|
||||
|
||||
}
|
||||
|
||||
.anticon-import {
|
||||
display: inline-block;
|
||||
margin-right: 3px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.show-setting {
|
||||
.ant-modal {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.split-detail-left {
|
||||
|
||||
.ant-tree-node-content-wrapper-normal {
|
||||
|
||||
}
|
||||
|
||||
ant-tree-node-content-wrapper {
|
||||
.expand-title {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tree-title {
|
||||
span {
|
||||
//display: block;
|
||||
@@ -1270,6 +1333,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ant-tree-child-tree {
|
||||
.ant-tree-title {
|
||||
span {
|
||||
@@ -1284,40 +1348,49 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.split-detail-table {
|
||||
.ant-table-body {
|
||||
overflow: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item-content-show {
|
||||
.wordImg {
|
||||
width: 40px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) and (max-width: 1600px) {
|
||||
|
||||
.operator-text {
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
min-width: 73px !important;
|
||||
}
|
||||
|
||||
.split-detail-wrap {
|
||||
height: 481px !important;
|
||||
}
|
||||
|
||||
.mainItem {
|
||||
height: 500px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1600px) and (max-width: 2000px) {
|
||||
.split-detail .split-detail-wrap .split-detail-left {
|
||||
height: 735px !important;
|
||||
}
|
||||
|
||||
.mainItem {
|
||||
height: 800px !important;
|
||||
}
|
||||
|
||||
@@ -251,11 +251,22 @@
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div style='font-size: 20px;margin-bottom: 20px;display: flex;justify-content: center' class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'>
|
||||
<!-- 没有工程接口人,导致下发收集失败提示-->
|
||||
<span v-if='NoEngineer === 0'>
|
||||
NIO编号为
|
||||
</span>
|
||||
<span style='font-size: 16px;margin-bottom: 20px;' v-for='(item,key) in NotSelectedNoEngineerValue' v-if='NoEngineer === 0'>
|
||||
<span style='color: red'>{{ item.nioNumber }}、</span>
|
||||
</span>
|
||||
<span v-if='NoEngineer === 0'>
|
||||
工程接口人没有填写,请填写完工程接口人再进行下发收集。
|
||||
</span>
|
||||
<!-- 状态不符合,导致不能操作按钮,没有权限-->
|
||||
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center' class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue' v-if='NoEngineer === 1'>
|
||||
<div>NIO编号为{{ item.nioNumber }},状态为<span style='color: red'>{{ item.state }}</span>,没有此按钮的操作权限。</div>
|
||||
</div>
|
||||
<!-- 认证工程师-提示-->
|
||||
<div style='font-size: 16px;color: red;display: flex;justify-content: center'>
|
||||
<div style='font-size: 16px;color: red;display: flex;justify-content: center' v-if='NoEngineer === 1'>
|
||||
{{ currentPersonRole =='homo'? '认证工程师': (currentPersonRole =='sdt'? '工程接口人': '填写人') }}数据状态为
|
||||
<!-- 下发收集时-->
|
||||
<span v-if='jurisdiction === "HOMOZFSJ"'>
|
||||
@@ -444,6 +455,8 @@ export default {
|
||||
},
|
||||
RoleType: [ ],// 控件类型
|
||||
NotSelectedRowKeysValue: [],
|
||||
NoEngineer: 1, // 下发收集的权限,0为没有接口人 1为由接口人 默认有
|
||||
NotSelectedNoEngineerValue: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -484,7 +497,9 @@ export default {
|
||||
// 认证工程师 下发收集 权限
|
||||
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以下发收集
|
||||
homodistributionAndCollection() {
|
||||
this.NoEngineer = 1
|
||||
this.NotSelectedRowKeysValue = []
|
||||
this.NotSelectedNoEngineerValue = []
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
@@ -492,9 +507,15 @@ export default {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
// 状态不符合,不能下发收集
|
||||
if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更') {
|
||||
this.NotSelectedRowKeysValue.push(item)
|
||||
flag = 0
|
||||
}
|
||||
// 状态符合,但是没有工程接口人 不能下发收集
|
||||
if(item.sdt.dataValue === null && (flag == 1 || flag == 3)) {
|
||||
this.NotSelectedNoEngineerValue.push(item)
|
||||
flag = 3
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -699,7 +720,6 @@ export default {
|
||||
// 填写人 提交 权限
|
||||
// 仅仅状态为 待填写 认证工程师退回 可以提交
|
||||
dreJurisdictionSubmit() {
|
||||
console.log(this.selectedRowKeysValue,'this.selectedRowKeysValue')
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
this.NotSelectedRowKeysValue = []
|
||||
let flag = 1
|
||||
@@ -782,7 +802,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
this.areaVisibleFreeze = false
|
||||
@@ -792,7 +811,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 冻结配置取消
|
||||
@@ -819,7 +837,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
this.FreezeList = res.data.result
|
||||
}else{
|
||||
@@ -827,7 +844,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 下发收集的权限
|
||||
@@ -838,6 +854,9 @@ export default {
|
||||
} else if(homodistributionAndCollection == 0){
|
||||
this.visibleoperationFailed = true
|
||||
this.jurisdiction = 'HOMOZFSJ'
|
||||
} else if(homodistributionAndCollection == 3) {
|
||||
this.visibleoperationFailed = true
|
||||
this.NoEngineer = 0
|
||||
}
|
||||
},
|
||||
// 下发收集---请求接口
|
||||
@@ -865,7 +884,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
_this.areaVisible = false
|
||||
@@ -875,7 +893,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 同步上报库 权限
|
||||
@@ -937,7 +954,6 @@ export default {
|
||||
this.$confirm({
|
||||
content: _this.$t('Areyousureparameteritems'),
|
||||
onOk() {
|
||||
console.log(configDataList,'configDataListconfigDataList')
|
||||
postAction(_this.url.add, configDataList).then((res) => {
|
||||
if (res.success) {
|
||||
_this.GetgetTableList()
|
||||
@@ -985,7 +1001,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
_this.GetgetTableList()
|
||||
@@ -995,7 +1010,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 强制撤回权限
|
||||
@@ -1032,7 +1046,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
_this.getTableList()
|
||||
@@ -1042,7 +1055,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 分配填写人
|
||||
@@ -1092,7 +1104,6 @@ export default {
|
||||
|
||||
},
|
||||
handleCody() {
|
||||
console.log(this.paramsManifest, 'paramsManifestparamsManifestparamsManifestparamsManifest')
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
@@ -1147,7 +1158,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -888,7 +888,7 @@
|
||||
return current && current < moment().subtract(1, 'day')
|
||||
},
|
||||
getRoleByUserId() {
|
||||
getAction('/sys/role/getRoleByUserId', {}).then((res) => {
|
||||
getAction('/sys/role/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.roleSwitchingList = res.result || []
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user