Commit 45d0d0a6 authored by ztf's avatar ztf

Merge branch 'develop' of http://94.191.100.41/inet-two/web into develop

parents 23c3e451 e015b333
......@@ -20,5 +20,5 @@ yarn.lock
*.sw*
.env.*
applications/architecture-dee/.env.development
applications/architecture-dee/dee.config.js
#applications/architecture-dee/dee.config.js
export/dist.zip
module.exports = {
'PROXY': {
/* 新模块添加位置 */
'/dee-global-config/': {
'target': 'http://localhost:10803/'
},
'/dee-workflow/': {
'target': 'http://localhost:10243/'
},
'/dee-user/': {
'target': 'http://localhost:10244/'
},
'/dee-dashboard/': {
'target': 'http://localhost:10245/'
},
'/dee-perm/': {
'target': 'http://localhost:10246/'
},
'/dee-dic/': {
'target': 'http://localhost:10247/'
},
'/dee-es/': {
'target': 'http://localhost:10248/'
},
'/dee-file/': {
'target': 'http://localhost:10266/'
},
'/dee-model/': {
'target': 'http://localhost:10265/'
},
'/dee-config/': {
'target': 'http://localhost:10251/'
},
'/dee-doc/': {
'target': 'http://localhost:10252/'
},
'/dee-message/': {
'target': 'http://localhost:10253/'
},
'/dee-lifecycle/': {
'target': 'http://localhost:10254/'
},
'/dee-pdc/': {
'target': 'http://localhost:10255/'
},
'/dee-context/': {
'target': 'http://localhost:10256/'
},
'/dee-task-center/': {
'target': 'http://localhost:10257/'
},
'/dee-ui/': {
'target': 'http://localhost:10258/'
},
'/dee-cmt/': {
'target': 'http://localhost:10259/'
},
'/dee-craft/': {
'target': 'http://localhost:10260/'
},
'/dee-resource/': {
'target': 'http://localhost:10261/'
},
'/dee-audit/': {
'target': 'http://localhost:10262/'
},
'/dee-project/': {
'target': 'http://localhost:10263/'
},
'/dee-storage/': {
'target': 'http://localhost:10267/'
},
'/dee-production/': {
'target': 'http://localhost:10274/'
},
'/dee-quality/': {
'target': 'http://localhost:10284/'
},
'/dee-equipment/': {
'target': 'http://localhost:10295/'
},
'/dee-performance/': {
'target': 'http://localhost:10808/'
},
'/dee-plan/': {
'target': 'http://localhost:10303/'
},
'/dee-archives/': {
'target': 'http://localhost:10296/'
}
// '/': {
// target: `http://192.168.1.148:9002`,
// ws: false, // 处理 vue-cli搭建的框架,用了proxy之后,一直打印failed: Invalid frame headerd的问题
// changeOrigin: true
// }
},
'modules': [
'./dee-workflow/main.js',
'./dee-user/main.js',
'./dee-dashboard/main.js',
'./dee-perm/main.js',
'./dee-dic/main.js',
'./dee-es/main.js',
'./dee-file/main.js',
'./dee-model/main.js',
'./dee-message/main.js',
'./dee-config/main.js',
'./dee-doc/main.js',
'./dee-pdc/main.js',
'./dee-context/main.js',
'./dee-lifecycle/main.js',
'./dee-task-center/main.js',
'./dee-ui/dee_ui.js',
'./dee-cmt/main.js',
'./dee-resource/main.js',
'./dee-craft/main.js',
'./dee-project/main.js',
'/dee-storage/main.js',
'./dee-production/main.js',
'./dee-plan/main.js',
'./dee-archives/main.js'
]
}
export default {
props: {},
layoutConfigData: [
{
title: '高级组件配置',
data: [
{
key: 'linkageAttr',
title: '联动属性(父级)',
component: {
defaultValue: '',
name: 'el-input'
}
},
{
key: 'requestMethod',
title: '请求方式',
width: 1,
component: {
name: 'el-select',
isLabelTop: true,
options: [
{
label: 'get',
value: 'get'
},
{
label: 'post',
value: 'post'
}
]
}
},
{
key: 'requestURL',
title: '请求url',
width: 1,
component: {
isLabelTop: true,
defaultValue: 'requestURL=""',
name: 'btnCodeEdit',
remindText: `requestURL为接口地址变量,直接给赋值,该变量必须有值`
}
},
{
key: 'requestParameters',
title: '请求参数',
width: 1,
component: {
isLabelTop: true,
defaultValue: 'requestParameters = {}',
name: 'btnCodeEdit',
remindText: `requestParameters为请求参数变量,直接给赋值,该变量必须有值`
}
},
{
key: 'formateResponse',
title: '接口返回数据格式化',
width: 1,
component: {
isLabelTop: true,
defaultValue: `responseData = res.items.content.map(row => {
return {
value: row.id,
label: row.name
}
})`,
name: 'btnCodeEdit',
remindText: `responseData为接口返回数据`
}
},
{
key: 'multipleVal',
title: '多选值',
width: 1,
component: {
isLabelTop: true,
name: 'el-switch',
defaultValue: false
}
}
]
}
],
data() {
return {
}
},
created() {
},
computed: {
},
methods: {
}
}
<template>
<div class="generalLinkageSelect-select">
<el-select ref="selectCom" v-model="selVal" placeholder="请选择" :multiple="isMultiple" size="mini" :disabled="disabledVal" @change="changeVal">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</template>
<script>
import http from '@/utils/http'
import config from './config'
import _get from 'lodash.get'
export default {
componentName: '通用联动属性选择器',
name: 'GeneralLinkageSelect', // name写在组件的最前方,自定义组件为必填
components: {},
mixins: [config],
props: {
item: {
type: Object,
default: () => {
return {}
}
},
form: {
type: Object,
default: () => {}
},
middleForm: {
type: Object,
default: () => {}
},
value: {
type: [Number, String, Object, Array],
default: () => ''
}
},
data() {
return {
options: [],
selVal: '',
disabledVal: false,
linkageValue: ''
}
},
computed: {
isMultiple() {
return this.item.multipleVal || this.$utils._get(this.item, 'multipleVal') || false
}
},
watch: {
form: {
immediate: true,
deep: true,
handler(val) {
if (val) {
if (!this.item.linkageAttr) {
return
}
const _val = _get(this.form, this.item.linkageAttr)
if (_val !== this.linkageValue) {
this.options = []
this.selVal = ''
this.linkageValue = _val
this.getData(_val)
}
}
}
},
item: {
immediate: true,
deep: true,
handler(v) {
if (v.component.hasOwnProperty('disabled')) {
this.disabledVal = v.component.disabled
}
}
},
value: {
immediate: true,
deep: true,
handler(v) {
if (v) {
this.selVal = this.value
}
}
}
},
created() {
// 初始化数据
},
methods: {
getData(val) {
var requestURL = ''
var requestParameters = {}
if (this.item.requestURL) {
try {
let fun
eval(`fun = function (obtainedParams, functionParams){${this.item.requestURL}}`) // eslint-disable-line
fun.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
}
if (this.item.requestParameters) {
try {
let fun1
eval(`fun1 = function (obtainedParams, functionParams){${this.item.requestParameters}}`) // eslint-disable-line
fun1.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
}
http[this.item.requestMethod](requestURL, requestParameters).then(res => {
let responseData = []
if (this.item.formateResponse) {
try {
let fun2
eval(`fun2 = function (obtainedParams, functionParams){${this.item.formateResponse}}`) // eslint-disable-line
fun2.apply(this)// eslint-disable-line
} catch (error) {
console.error(error)
}
} else {
responseData = res.items.content.map(row => {
return {
value: row.id,
label: row.name
}
})
}
this.options = responseData
})
},
changeVal() {
this.$emit('input', this.selVal)
}
}
}
</script>
<style lang='scss'>
</style>
......@@ -13,6 +13,7 @@ import contextSelect from './components/contextSelect'
import orgLazyLoadSelect from './components/orgLazyLoadSelect'
import AssociationFormAddMVM from './components/AssociationFormAddMVM'
import GeneralUserSelect from './components/GeneralUserSelect'
import GeneralLinkageSelect from './components/GeneralLinkageSelect'
import DxDocumentFolderSelect from './components/DxDocumentFolderSelect/DxDocumentFolderSelect'
import LazyLoadTreeSelect from './components/LazyLoadTreeSelect'
import RelatedECN from './components/RelatedECN'
......@@ -58,6 +59,7 @@ Vue.component(ExtendsDxContextTeam.name, ExtendsDxContextTeam) // eslint-disabl
Vue.component(contextSelect.name, contextSelect) // eslint-disable-line
Vue.component(AssociationFormAddMVM.name, AssociationFormAddMVM) // eslint-disable-line
Vue.component(GeneralUserSelect.name, GeneralUserSelect) // eslint-disable-line
Vue.component(GeneralLinkageSelect.name, GeneralLinkageSelect) // eslint-disable-line
Vue.component(LazyLoadTreeSelect.name, LazyLoadTreeSelect) // eslint-disable-line
Vue.component(SymbolOfTolerance.name, SymbolOfTolerance) // eslint-disable-line
Vue.component(StateSelect.name, StateSelect) // eslint-disable-line
......
......@@ -26,7 +26,8 @@ const formListComponents = [ // form组件
'BatchSubmitReview',
'DeeBarCode',
'DeeQrcode',
'DeeFolderInfo'
'DeeFolderInfo',
'GeneralLinkageSelect'
]
const tabComponents = [ // 组合组件
'DeeInjectionRuleTemp',
......
/**
* @Description:
* @author gjn
* @date 2024/10/28
*/
<template>
<div class="dee-search-tree-group dee-border-top">
<el-tree
:data="treeData"
default-expand-all
:expand-on-click-node="false"
:render-content="renderContent"
@node-click="nodeClick"
/>
</div>
</template>
<script>
import { getSubTypeName } from '@/api/docCenter/center.js'
import { getSubTypeDocs } from '../../api/searchCom.js'
import Event from './Event'
export default {
name: 'DeeSearchTreeGroup',
components: {},
mixins: [
Event
],
props: {
typeName: {
type: [Number, String],
default: () => {}
},
config: {
type: Object,
default: () => {}
},
pageData: {
type: Object,
default: () => {}
},
base: {
type: Object,
default: () => {}
}
},
data() {
return {
activeIndex: null,
type: 'DxDocument',
keyWord: '',
filter: null,
groupList: [
],
subTypeList: [],
typeCounts: [],
flag: false
}
},
computed: {
params() {
if (!this.base || !this.base.params) {
return []
}
return this.base.params
},
initData() {
return null
},
treeData() {
if (!this.typeCounts || this.typeCounts.length === 0) {
return []
}
if (!this.subTypeList || this.subTypeList.length === 0) {
return []
}
return this.initTree(this.subTypeList, this.typeCounts)
}
},
watch: {
inputEvent(val) {
if (val && val.load) {
this.getSubTypeDocs(val)
}
}
},
created() {
this.getSubTypeName(true)
},
mounted() {
},
methods: {
nodeClick(node) {
const types = [node.value]
for (const a in node.count) {
types.push(a)
}
const data = { keyWord: this.keyWord, ...this.filter }
this.$set(data, this.params[0].key || 'subTypeName', {
fieldName: 'subTypeName',
operator: 'IN',
value: types
})
if (this.outputEvent.length > 0) {
const Event = this.outputEvent.filter(r => r.outputEvent === 'rowClick')
if (Event.length) {
this.outEvent(Event, data)
}
} else {
this.$emit('groupSearchEvent', data)
}
},
renderContent(h, { node, data, store }) {
let count = 0
for (const a in data.count) {
count += data.count[a]
}
return (
<span class='custom-tree-node subtype-tree'>
<span>{node.label}</span>
<span>
({count})
</span>
</span>)
},
initTree(lists, counts) {
const nodes = []
lists.forEach(r => {
let num = 0
const item = counts.find(t => t.subTypeName === r.name)
if (item) {
num = item.count
}
const count = {}
num && (count[r.name] = num)
nodes.push({
parentId: r.parentId,
label: r.displayName,
value: r.name,
icoUrl: r.icoUrl,
num: num,
count: count,
path: r.parentId || '',
id: r.id
})
})
nodes.forEach(node => {
this.recallCount(node.parentId, node, nodes)
})
// nodes = nodes.filter(node => (node.count && Object.keys(node.count).length > 0) || node.num)
return this.data2tree(nodes)
},
data2tree(data) {
const result = []
if (!Array.isArray(data)) {
return result
}
data.forEach(item => {
delete item.children
})
const map = {}
data.forEach(item => {
map[item.id] = item
})
data.forEach(item => {
const parent = map[item.parentId]
if (parent) {
(parent.children || (parent.children = [])).push(item)
} else {
result.push(item)
}
})
return result
},
recallCount(parentId, node, tree) {
const parentNode = tree.find(n => n.id === parentId)
if (parentNode) {
parentNode.count[node.value] = node.num
this.recallCount(parentNode.parentId, node, tree)
}
},
getSubTypeDocs(val) {
const initData = val.load
const { keyWord, ...filter } = val.load
this.keyWord = keyWord
this.filter = { ...filter }
const params = {
'pageFrom': 1,
'pageSize': 100,
'openProps': [{
'name': 'creator'
}],
'aggregationSearchParam': {
'groupBys': [
{
'ascOrder': true,
'customerLabel': 'subTypeName',
'fieldName': 'subTypeName',
'typeName': '.TermsAggregationGroupBy'
}
],
'metrics': [
{
'customerLabel': 'count',
'fieldName': 'masterId',
'metricsType': 'CARDINALITY'
}
]
},
'indices': [this.type],
'keyWord': initData && initData.keyWord
// 'seriesFlag': false
}
if (this.filter) {
params.searchItems = {
items: [],
operator: 'AND',
children: [{
children: [],
operator: 'AND',
items: []
}, {
children: [],
operator: 'AND',
items: this.filter.items || []
}]
}
// for (const a in this.filter) {
// if (this.filter[a]) {
// if (typeof (this.filter[a]) === 'object') {
// if (Object.keys(this.filter[a]).length) { // fixbug Object is empty {}
// params.searchItems.children[1].items.push(this.filter[a])
// }
// } else {
// params.searchItems.children[1].items.push({
// 'fieldName': a,
// 'operator': 'EQ',
// 'value': this.filter[a]
// })
// }
// }
// }
}
params.searchItems.children[0].items.push({
'fieldName': 'id',
'operator': 'NEQ',
'value': 0
})
params.searchItems.children[0].items.push({
'fieldName': 'checkOuted',
'operator': 'NEQ',
'value': true
})
params.searchItems.children[0].items.push({
'fieldName': 'latest',
'operator': 'EQ',
'value': true
})
this.groupList = []
getSubTypeDocs(params).then(res => {
this.groupList = []
if (res.items && res.items.data) {
let count = 0
this.typeCounts = res.items.data.map(row => {
if (!row.count) {
row.count = row.masterIdCardinality
}
return row
})
res.items.data.forEach(row => {
const name = this.$utils.getParamsFromLists(this.subTypeList, 'name', row.subTypeName, 'displayName')
count += parseInt(row.count)
if (name) {
this.groupList.push({
id: row.subTypeName,
num: parseInt(row.count),
name: this.$utils.getParamsFromLists(this.subTypeList, 'name', row.subTypeName, 'displayName')
})
}
})
this.groupList.unshift({
id: this.groupList.length === 1 ? this.groupList[0].id : '',
num: count,
name: '所有类型'
})
}
val.load = null
})
},
checkData(row) {
const attrName = this.params[0].key
if (this.filter[attrName]) {
return row[attrName] === this.filter[attrName]
}
return this.subTypeList.find(r => r.name === row[attrName])
},
getSubTypeName(flag) {
if (this.typeName === null || this.typeName === '') {
return
}
getSubTypeName('', this.typeName).then(res => {
if (res.items) {
this.subTypeList = res.items
if (flag) {
this.getSubTypeDocs({ load: { keyWord: '' }})
}
}
})
},
selGroup(item, index) {
this.activeIndex = index
const data = { keyWord: this.keyWord, ...this.filter }
if (item.id) {
this.$set(data, this.params[0].key || 'subTypeName', {
fieldName: 'subTypeName',
operator: 'EQ',
value: item.id
})
}
if (this.outputEvent.length > 0) {
const Event = this.outputEvent.filter(r => r.outputEvent === 'rowClick')
if (Event.length) {
this.outEvent(Event, data)
}
} else {
this.$emit('groupSearchEvent', data)
}
}
}
}
</script>
<style lang='scss'>
.dee-search-tree-group {
padding-top: 10px;
height: calc(100% - 10px);
overflow-y: auto;
.d-s-g-item{
padding: 0 12px;
display: flex;
height: 40px;
line-height: 40px;
justify-content: space-between
}
.el-tree-node__content{
height: 36px;
}
.custom-tree-node {
&.subtype-tree{
font-weight: 400;
color:#000;
height: 32px;
line-height: 32px;
font-size:16px;
display: inline-flex;
width: 100%;
justify-content: space-between;
}
}
}
</style>
......@@ -11,6 +11,7 @@ import modelTypeSelect from '@/components/DeeBusinessCom/modelTypeSelect.vue'
import dictionaryOptions from '@/components/DeeBusinessCom/dictionaryOptions.vue'
import businessTab from '@/components/DeeBusinessCom/businessTab'
import DeeSearchGroup from './DeeBusinessCom/DeeSearchGroup'
import DeeSearchTreeGroup from './DeeBusinessCom/DeeSearchTreeGroup'
import DxUserSelect from '@/components/DxUser/DxUserSelect'
......@@ -50,6 +51,7 @@ Vue.component('DeeTab', DeeTab) // eslint-disable-line
Vue.component('DeeSearchList', DeeSearchList) // eslint-disable-line
Vue.component('deeSearchBox', deeSearchBox) // eslint-disable-line
Vue.component('DeeSearchGroup', DeeSearchGroup) // eslint-disable-line
Vue.component('DeeSearchTreeGroup', DeeSearchTreeGroup) // eslint-disable-line
Vue.component('DeePane', DeePane) // eslint-disable-line
Vue.component('DeeDynamicCom', DeeDynamicCom) // eslint-disable-line
......
<template>
<div class="" />
</template>
<script>
export default {
name: '',
components: {},
props: {},
data() {
return {}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {}
}
</script>
<style lang='scss'>
</style>
<template>
<div style="height: 100%;" class="CAQuery-com">
<dee-as-com
:lay-config="{
typeName: 'DxDocument',
layKey: 'CAQuery'
}"
@searchEvent="searchEvent"
/>
<div>
<dee-search-tree-group class="search-group" type-name="DxDocument" :page-data="pageData" :config="{name: 'searchGroup'}" v-bind="configDetails" @groupSearchEvent="groupSearchEvent" />
</div>
</div>
</template>
<script>
export default {
name: 'CAQuery',
components: {},
componentName: '档案综合查询',
props: {},
data() {
return {
activeObj: null,
groupList: [],
subTypeObj: null,
filterData: {},
evenList: [
{
even: 'searchEvent',
name: '条件点击查询事件'
}
],
configDetails: {
// 'onlyBtn': true,
// 'formData': [{ 'title': '', 'split': 3, 'data': [] }],
// 'rules': {},
// 'formButtons': [],
// 'tableObj': { 'tableColumns': [], 'header': { 'seachForm': [], 'toolList': [], 'serPosition': 'top' }},
// 'tableConfig': { 'serverUrl': '', 'pageShow': true, 'pageDefs': { 'currentPage': 1, 'pageSize': 20, 'pageSizes': [10, 20, 50, 100, 200], 'total': 0 }},
// 'layType': 'grouping',
'base': { 'Summary': true, 'params': [{ 'key': 'subTypeName', 'title': '动态类型' }] }
// 'openProps': 'objFileLinks',
// 'componentsData': [],
// 'tableFilter': []
},
pageData: {
'searchGroup': { 'load': null },
'table': { 'load': {}}
}
}
},
computed: {},
watch: {},
created() {
},
mounted() {
this.searchEvent()
},
activated() {
},
// 方法集合
methods: {
searchEvent(data) {
this.pageData = {
searchGroup: {
load: data
},
table: {
load: data
}
}
this.filterData = data
this.$emit('searchEvent', data)
},
groupSearchEvent(data) {
const resData = {
'items': [
data.subTypeName
],
'operator': 'AND'
}
if (this.filterData && Array.isArray(this.filterData.items)) {
resData.items = [...resData.items, ...this.filterData.items]
}
this.pageData = {
table: {
load: resData
}
}
this.$emit('searchEvent', resData)
}
}
}
</script>
<style lang='scss'>
.CAQuery-com{
overflow: auto;
}
</style>
<template>
<div class="" />
</template>
<script>
export default {
name: '',
components: {},
props: {},
data() {
return {}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {}
}
</script>
<style lang='scss'>
</style>
<template>
<div class="" />
</template>
<script>
export default {
name: '',
components: {},
props: {},
data() {
return {}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {}
}
</script>
<style lang='scss'>
</style>
<template>
<div class="" />
</template>
<script>
export default {
name: '',
components: {},
props: {},
data() {
return {}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {}
}
</script>
<style lang='scss'>
</style>
File deleted
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment