Commit b0a6da6e by li_hongchao

逻辑分库功能

parent 4eddd7b7
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="8px" viewBox="0 0 14 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>路径</title>
<defs>
<radialGradient cx="0%" cy="50%" fx="0%" fy="50%" r="175%" gradientTransform="translate(0.000000,0.500000),scale(0.571429,1.000000),translate(-0.000000,-0.500000)" id="radialGradient-1">
<stop stop-color="#7ED7FF" offset="0%"></stop>
<stop stop-color="#49AFFF" offset="100%"></stop>
</radialGradient>
</defs>
<g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="人员工作流设置-串行交互备份" transform="translate(-768.000000, -455.000000)" fill="url(#radialGradient-1)" fill-rule="nonzero">
<path d="M776.783882,457.342107 L776.180818,455.550752 C776.006385,455.033803 776.229028,454.841214 776.684832,455.14438 L781.660116,458.450645 C782.110661,458.750126 782.115921,459.24496 781.660116,459.548126 L776.684832,462.855313 C776.234287,463.154794 776.002879,462.975105 776.180818,462.44802 L776.783882,460.656665 L768.783634,459.315914 C767.739666,459.140833 767.737912,458.857939 768.783634,458.682858 L776.783882,457.342107 Z" id="路径"></path>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="19px" viewBox="0 0 16 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>形状备份 10</title>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#7ED7FF" offset="0%"></stop>
<stop stop-color="#48AEFF" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="人员工作流设置-串行交互备份" transform="translate(-662.000000, -443.000000)" fill="url(#linearGradient-1)" fill-rule="nonzero">
<g id="编组-4备份-3" transform="translate(662.000000, 443.000000)">
<path d="M15.5312,0.491054722 C15.2402967,0.180089589 14.8303435,0.00212861766 14.4,0 L1.60000001,0 C1.16965651,0.00212861766 0.759703314,0.180089589 0.468800006,0.491054722 C0.168,0.804827718 0,1.23155899 0,1.67554776 L0,17.1476939 C0,17.7517069 0.310400006,18.3086539 0.811199999,18.6067383 C1.30854526,18.9035297 1.93525277,18.8949948 2.424,18.5847742 L7.17760001,15.5976553 C7.67779148,15.2792707 8.32220852,15.2792707 8.82239999,15.5976553 L13.576,18.5847742 C14.0647472,18.8949948 14.6914547,18.9035297 15.1888,18.6067383 C15.6896,18.3086539 16,17.7517069 16,17.1476939 L16,1.67554776 C16,1.23155899 15.832,0.804827718 15.5312,0.491054722 Z" id="形状备份-10"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
import addrType from '../../netmgr/NetAddressType'
/**
* Description: 逻辑分库相关接口类
* @author: li_hongchao
* @date: 2022/1/5 11:33
*/
const _path = {
ryfkgl: addrType.api + '/logic/person/',
ajfkgl: addrType.api + '/logic/case/'
ajfkgl: addrType.api + '/logic/case/',
ljkyh: addrType.security + '/r-user-user-group/',
gzl: addrType.api + '/workflow/'
}
export default {
/**
* Description: 获取人员逻辑库列表信息
* @author: li_hongchao
* @date: 2022/1/5 11:32
*/
ryList(_parameter) {// 获取人员逻辑库
return fHttp.postJson(_path.ryfkgl + 'queryAll', _parameter)
},
/**
* Description: 获取案件逻辑库列表信息
* @author: li_hongchao
* @date: 2022/1/5 11:32
*/
ajList(_parameter) {// 获取案件逻辑库
return fHttp.postJson(_path.ajfkgl + 'queryAll', _parameter)
},
/**
* Description: 获取用户、用户组列表信息,用于选择逻辑库用户选择控件
* @author: li_hongchao
* @date: 2022/1/5 11:31
*/
yhList() {
return fHttp.get(_path.ljkyh + 'getUserAndUserGroup', {})
},
/**
* Description: 更新逻辑分库信息
* @author: li_hongchao
* @date: 2022/1/5 11:31
*/
updateLjfkxx(_parameter, isPerson = true) {
let path = isPerson ? _path.ryfkgl : _path.ajfkgl
return fHttp.postJson(path + 'insert', _parameter)
},
saveGzl(_parameter) {
return fHttp.postJson(_path.gzl + 'save', _parameter)
},
queryGzl(_parameter) {
return fHttp.post(_path.gzl + 'queryByLogicIdAndType', _parameter,{
"Content-Type": 'application/x-www-form-urlencoded'
})
},
}
import axios from 'axios'
import { Message, MessageBox } from 'element-ui'
import {Message, MessageBox} from 'element-ui'
import qs from 'qs'
import { ACCESS_TOKEN } from '../store/mutation-types'
import {ACCESS_TOKEN} from '../store/mutation-types'
import router from '../router'
import { showLoading, hideLoading } from '@/utils/requestLoading'
import {showLoading, hideLoading} from '@/utils/requestLoading'
// debugger
axios.defaults.timeout = 0
......@@ -46,7 +46,7 @@ let initConfig = (config) => {
if (!window._axiosPromiseArr) {
window._axiosPromiseArr = []
}
window._axiosPromiseArr.push({ cancel })
window._axiosPromiseArr.push({cancel})
})
// 判断当前请求是否设置了不显示Loading,默认显示
if (config.loading !== false) {
......@@ -108,11 +108,11 @@ let onResponse = (response) => {
let message = response.data.message
if (status === 0) {
// return response.data
} else if (status === '200') {
} else if (status === '200' || status === 200) {
response.data.code = 0
} else if (status === 401) {
response.data.message = message === '未登录' ? '登超时,请重新登录!' : message
$(".tzdDrawing").css('z-index', '1')
response.data.message = message === '未登录' ? '登超时,请重新登录!' : message
$('.tzdDrawing').css('z-index', '1')
} else {
response.data.message = '未知异常:' + message
}
......@@ -126,7 +126,6 @@ let onResponse = (response) => {
// request 请求拦截器
common.interceptors.request.use(
config => {
config.headers['Content-Type'] = 'application/json'
config = initConfig(config)
return config
}, onError)
......@@ -201,11 +200,11 @@ export default {
/**
* 封装get方法
*/
get (url, params) {
get(url, data) {
return new Promise((resolve, reject) => {
common
.get(url, {
params: params
params: data
})
.then(response => {
logger.net(data, url, response)
......@@ -220,9 +219,9 @@ export default {
/**
* 封装post请求
*/
post (url, params, config) {
post(url, data, config) {
return new Promise((resolve, reject) => {
common.post(url, qs.stringify(params), config)
common.post(url, qs.stringify(data), {headers: config})
.then(response => {
logger.net(data, url, response)
parseResponse(resolve, reject, response)
......@@ -236,9 +235,9 @@ export default {
/**
* 封装post请求 multipart/form-data
*/
postform (url, data, config) {
postform(url, data, config) {
return new Promise((resolve, reject) => {
instance.post(url, data, config).then(response => {
instance.post(url, data, {headers: config}).then(response => {
logger.net(data, url, response)
parseResponse(resolve, reject, response)
})
......@@ -250,9 +249,9 @@ export default {
/**
* 封装post请求 文件下载
*/
postdown (url, data, config) {
postdown(url, data, config) {
return new Promise((resolve, reject) => {
down.post(url, data, config).then(response => {
down.post(url, data, {headers: config}).then(response => {
logger.net(data, url, response)
parseResponse(resolve, reject, response)
})
......@@ -265,9 +264,9 @@ export default {
/**
* 封装post请求 json格式
*/
postJson (url, data, config) {
postJson(url, data, config) {
return new Promise((resolve, reject) => {
json.post(url, data, config).then(response => {
json.post(url, data, {headers: config}).then(response => {
logger.net(data, url, response)
parseResponse(resolve, reject, response)
})
......@@ -276,7 +275,7 @@ export default {
})
},
cancel () {// 取消当前网络请求
cancel() {// 取消当前网络请求
if (window._axiosPromiseArr) {
window._axiosPromiseArr.forEach((ele, index) => {// 切换路由时,关闭当前页面请求
if (ele) {
......
......@@ -7,9 +7,10 @@
style="width: 100%"
ref="multipleTable"
:data="tableDate"
:row-key="getRowKeys"
class="table">
<el-table-column prop="logicName" label="分库名称" :width="width1"></el-table-column>
<el-table-column prop="logicName" label="分库名称" :width="width1" show-overflow-tooltip></el-table-column>
<el-table-column prop="sjkyh" label="数据库用户组/用户" :width="width2">
<template slot-scope="scope">
<div class="tagsBox">
......@@ -117,7 +118,7 @@
content="编辑"
placement="top"
:open-delay="500">
<svg class="icon" aria-hidden="true" @click.stop="goBj"
<svg class="icon" aria-hidden="true" @click.stop="goBj(scope.row)"
style="width: 1.125rem;height: 1.125rem; margin-right: 1.125rem;cursor: pointer;">
<use xlink:href="#icon-bianji" />
</svg>
......@@ -129,7 +130,7 @@
placement="top"
:open-delay="500">
<svg class="icon" aria-hidden="true" @click.stop="goGzl"
<svg class="icon" aria-hidden="true" @click.stop="goGzl(scope.row)"
style="width: 1.125rem;height: 1.125rem; margin-right: 1.125rem;cursor: pointer;">
<use xlink:href="#icon-gongzuoliu" />
</svg>
......@@ -208,6 +209,9 @@ export default {
// this.getList()
},
methods: {
getRowKeys(row) {
return row.logicId
},
loadData() {
this.getList()
},
......@@ -254,13 +258,13 @@ export default {
return yhs
},
goBj() {
goBj(info) {
//TODO...编辑.
this.$emit('openBj')
this.$emit('openBj', info)
},
goGzl() {
goGzl(info) {
//TODO.... 工作流
this.$emit('openGzl')
this.$emit('openGzl', info)
},
goSjgl() {
//TODO....数据管理
......
/**
* Description: _DL_TYPES 队列类型 _CXDL_TYPES 队列中查询队列类型
* <pre>
* 1 处理队列
* 2 编辑队列
* 3 检查队列
* 4 查询队列(串査)
* 5 查询队列(倒查)
* 6 查询队列(正查)
* 7 查询队列(查重)
* </pre
* @author: li_hongchao
* @date: 2022/1/6 11:12
*/
const _DL_TYPES = {
CLDL: {type: 1, name: '处理队列'}, // 处理队列
BJDL: {type: 2, name: '编辑队列'}, // 编辑队列
JCDL: {type: 3, name: '检查队列'}, // 检查队列
CXDL: {type: 99, name: '查询队列'}// 用于页面逻辑构建,与业务无关
}
const _CXDL_TYPES = {// 案件:正查 串查 人员:倒查 查重
ChuanC: {type: 4, name: '串査'}, // 查询队列(串査)
DaoC: {type: 5, name: '倒查'}, // 查询队列(倒查)
ZhengC: {type: 6, name: '正查'}, // 查询队列(正查)
ChaC: {type: 7, name: '查重'} // 查询队列(查重)
}
/**
* Description:
* 案件: 处理队列(不可选择) 编辑队列 查询队列(正查、串查)*
* 人员: 处理队列(不可选择) 编辑队列 检查队列 查询队列(倒查、查重)
* @author: li_hongchao
* @date: 2022/1/6 19:23
*/
const _DLMC = function (isRy) {
return isRy ? ['1', '2', '3', '5', '7'] : ['1', '2', '4', '6']
}
const isDlcxItem = function (val) {
return val > 3
}
/**
* Description: 工作流类 用于处理工作流数据逻辑
* @author: li_hongchao
* @date: 2022/1/7 0:00
*/
class Gzlzz {
static _PARAMS_TYPE = {
GZDL: 'gzdlArr',
GZDL_CXDL: 'gzdlCxdlArr',
DLMC: 'dlmcArr',
DLMC_CXDL: 'dlmcCxdlArr',
DL_COUNT: '_DL_COUNT'
}
static _CXDL_TYPE = _DL_TYPES.CXDL.type
gzdlArr = []
gzdlCxdlArr = []
dlmcArr = []
dlmcCxdlArr = []
_DL_COUNT = 0
isRy = false
getDl(type) {
switch (type) {
case '1':
return _DL_TYPES.CLDL
case '2':
return _DL_TYPES.BJDL
case '3':
return _DL_TYPES.JCDL
case '4':
return _CXDL_TYPES.ChuanC
case '5':
return _CXDL_TYPES.DaoC
case '6':
return _CXDL_TYPES.ZhengC
case '7':
return _CXDL_TYPES.ChaC
}
}
/**
* Description: 新增逻辑库时,初始化队列信息
* <pre>
* 队列说明:
* 案件: 处理队列(不可选择) 编辑队列 查询队列(正查、串查)*
* 人员: 处理队列(不可选择) 编辑队列 检查队列 查询队列(倒查、查重)
*</pre>
* @author: li_hongchao
* @date: 2021/12/28 13:57
*/
init(isRy) {
this.isRy = isRy
this.clear()
if (this.isRy) {
this.dlmcArr.push(_DL_TYPES.BJDL)
this.dlmcArr.push(_DL_TYPES.JCDL)
this.dlmcArr.push(_DL_TYPES.CXDL)
this.dlmcCxdlArr.push(_CXDL_TYPES.DaoC)
this.dlmcCxdlArr.push(_CXDL_TYPES.ChaC)
this.gzdlArr.push(_DL_TYPES.CLDL)
} else {
this.dlmcArr.push(_DL_TYPES.BJDL)
this.dlmcArr.push(_DL_TYPES.CXDL)
this.dlmcCxdlArr.push(_CXDL_TYPES.ZhengC)
this.dlmcCxdlArr.push(_CXDL_TYPES.ChuanC)
this.gzdlArr.push(_DL_TYPES.CLDL)
}
this._DL_COUNT = this.dlmcArr.length
}
initByVal(val) {
this.clear()
let resDl = _DLMC(this.isRy)
let desDl = val.split(',')
let index = -1
let isAddCxdl = false
desDl.forEach(item => {
if (item && item !== '') {
index = resDl.indexOf(item)
if (index >= 0) {
resDl.splice(index, 1)
}
if (isDlcxItem(item)) {
if (!isAddCxdl) {
this.gzdlArr.push(_DL_TYPES.CXDL)
isAddCxdl = true
}
this.gzdlCxdlArr.push(this.getDl(item))
} else {
this.gzdlArr.push(this.getDl(item))
}
}
})
logger.info('resDl', resDl)
isAddCxdl = false
resDl.forEach(item => {
if (isDlcxItem(item)) {
if (!isAddCxdl) {
this.dlmcArr.push(_DL_TYPES.CXDL)
isAddCxdl = true
}
this.dlmcCxdlArr.push(this.getDl(item))
} else {
this.dlmcArr.push(this.getDl(item))
}
})
}
result() {
let result = ''
if (this.gzdlArr && this.gzdlArr.length > 0) {
this.gzdlArr.forEach(i => {
if (i.type === _DL_TYPES.CXDL.type) {
if (this.gzdlCxdlArr && this.gzdlCxdlArr.length > 0) {
this.gzdlCxdlArr.forEach(j => {
if (result === '') {
result += j.type
} else {
result += ',' + j.type
}
})
}
} else {
if (result === '') {
result += i.type
} else {
result += ',' + i.type
}
}
})
}
return result
}
clear() {
this.gzdlArr = []
this.gzdlCxdlArr = []
this.dlmcArr = []
this.dlmcCxdlArr = []
}
updateCxdl(group, groupIndex, child, childIndex, isAdd = false) {// 点击查询队列子项处理逻辑
if (isAdd) {
if (this.dlmcCxdlArr.length !== 2) {
this.dlmcArr.splice(groupIndex, 1)
}
this.dlmcCxdlArr.splice(childIndex, 1)
if (this.gzdlCxdlArr.length === 0) {
this.gzdlArr.push(group)
}
this.gzdlCxdlArr.push(child)
} else {
if (this.gzdlCxdlArr.length !== 2) {
this.gzdlArr.splice(groupIndex, 1)
}
this.gzdlCxdlArr.splice(childIndex, 1)
if (this.dlmcCxdlArr.length === 0) {
this.dlmcArr.push(group)
}
this.dlmcCxdlArr.push(child)
}
}
updateGzdl(clickItem, index, isAdd = false) {// 处理队列添加、取消逻辑
if (isAdd) {
this.dlmcArr.splice(index, 1)
if (clickItem.type === _DL_TYPES.CXDL.type) {
if (this.dlmcCxdlArr.length === 2) {
this.gzdlArr.push(_DL_TYPES.CXDL)
}
this.gzdlCxdlArr = this.gzdlCxdlArr.concat(this.dlmcCxdlArr)
this.dlmcCxdlArr = []
} else {
this.gzdlArr.push(clickItem)
}
} else {
this.gzdlArr.splice(index, 1)
if (clickItem.type === _DL_TYPES.CXDL.type) {
if (this.gzdlCxdlArr.length === 2) {
this.dlmcArr.push(_DL_TYPES.CXDL)
}
this.dlmcCxdlArr = this.dlmcCxdlArr.concat(this.gzdlCxdlArr)
this.gzdlCxdlArr = []
} else {
this.dlmcArr.push(clickItem)
}
}
}
}
module.exports = Gzlzz
/**
* Description: 工作流队列相关代码
* @author: li_hongchao
* @date: 2021/12/28 21:07
*/
<template>
<div style="background: #F7F9FB; padding: 30px 0px;">
<el-row style="margin-bottom: 20px;">
<el-col :span="24">
<el-form-item class="dui-lie-ming-cheng-layout" label="队列名称:" prop="dlmc">
<div style="margin-left: 40px;">
<div
class="dui-lie-ming-cheng"
v-for="(item,index) in dlmcArr"
v-show="dlmcArr && dlmcArr.length > 0">
<i class="el-icon-circle-plus icon" style="color: #055fe7"
@click="addDl(item,index)" />
<div>
{{ item.name || '-'}}
<div v-if="item.type === 3">
<span class="line" />
<span v-if="isRy">
<span v-show="item.search === 3 || item.search === 1"
class="tag">倒查</span>
<span v-show="item.search === 3 || item.search === 2"
class="tag">查重</span>
</span>
<span v-else>
<span v-show="item.search === 3 || item.search === 1"
class="tag">正查</span>
<span v-show="item.search === 3 || item.search === 2"
class="tag">串查</span>
</span>
</div>
</div>
</div>
</div>
<div
v-show="!dlmcArr || dlmcArr.length <= 0"
v-for="(item, index) in getDlCount()"
:key="index + 'l'"
class="kong"
></div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item class="gong-zuo-dui-lie-layout" label="工作队列:" prop="gzdl">
<div v-if="gzdlArr && gzdlArr.length > 1">
<!-- 串行模式;-->
<div v-if="ruleForm.gzms === 0"
class="gong-zuo-dui-lie-chuanxing"
v-for="(item,index) in gzdlArr">
<div v-if="index === 0" class="chu-li-dui-lie"
style="margin-left: 0px;">处理队列
</div>
<i v-if="index !== 0" class="el-icon-remove icon"
style="color: #055fe7"
@click="deledeDl(item,index)" />
<div v-if="index !== 0">
{{ item.name || '-'}}
<div v-if="item.type === 3">
<span class="gzdl-line" />
<span v-if="isRy">
<span v-show="item.search === 3 || item.search === 2"
class="gztl-tag chachong">查重</span>
<span v-show="item.search === 3 || item.search === 1"
class="gztl-tag daocha">倒查</span>
</span>
<span v-else>
<span v-show="item.search === 3 || item.search === 1"
class="gztl-tag zhengcha">正查</span>
<span v-show="item.search === 3 || item.search === 2"
class="gztl-tag chuancha">串查</span>
</span>
</div>
</div>
</div>
<!-- 并行模式;-->
<div
v-if="ruleForm.gzms === 1"
v-for="(item,index) in gzdlArr"
:class="{'gong-zuo-dui-lie-bingxing-item':true, kk:index !== 0}">
<div class="gong-zuo-dui-lie-bingxing-item-left">
<div :class="{verLine:true,verLineTrans: index === 0}" />
<div :class="{verLine:true,verLineTrans: index === gzdlArr.length -1}" />
</div>
<div class="gong-zuo-dui-lie-bingxing-item-right">
<span class="mid-line" />
<span class="mid-circle" />
<div v-if="index === 0" class="chu-li-dui-lie"
style="margin-left: 8px;">处理队列
</div>
<div v-else class="gong-zuo-dui-lie-bingxing">
<i class="el-icon-remove icon" @click="deledeDl(item,index)"
style="color: #055fe7" />
<div>
{{ item.name || '-'}}
<div v-if="item.type === 3">
<span class="gzdl-line" />
<span v-if="isRy">
<span v-show="item.search === 3 || item.search === 2"
class="gztl-tag chachong">查重</span>
<span v-show="item.search === 3 || item.search === 1"
class="gztl-tag daocha">倒查</span>
</span>
<span v-else>
<span v-show="item.search === 3 || item.search === 1"
class="gztl-tag zhengcha">正查</span>
<span v-show="item.search === 3 || item.search === 2"
class="gztl-tag chuancha">串查</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else>
<div class="chu-li-dui-lie">处理队列</div>
</div>
</el-form-item>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: 'GzlDlView'
}
</script>
<style scoped>
</style>
......@@ -7,14 +7,14 @@
style="width: 100%"
ref="multipleTable"
:data="tableDate"
:row-key="getRowKeys"
class="table">
<el-table-column prop="logicName" label="分库名称" :width="width1"></el-table-column>
<el-table-column prop="logicName" label="分库名称" :width="width1" show-overflow-tooltip />
<el-table-column prop="sjkyh" label="数据库用户组/用户" :width="width2">
<template slot-scope="scope">
<div class="tagsBox">
<div
v-for="item in strArr(scope.row.groups)"
<div v-for="item in strArr(scope.row.groups)"
:class="{ tags: true, tagszu: item.type === 1 }"
:key="item.logicId"
v-show="item !== ''">
......@@ -46,8 +46,8 @@
effect="dark"
placement="right"
style="width: auto !important"
v-if="scope.row.groups && scope.row.groups.length > 4"
>
v-if="scope.row.groups && scope.row.groups.length > 4">
<span style="margin-left: 5px">...</span>
<div slot="content" class="tooTipBtn">
<div
......@@ -82,7 +82,6 @@
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" :width="width3"></el-table-column>
<el-table-column prop="qyzt" label="启用状态" :width="width4">
......@@ -118,7 +117,7 @@
content="编辑"
placement="top"
:open-delay="500">
<svg class="icon" aria-hidden="true" @click.stop="goBj"
<svg class="icon" aria-hidden="true" @click.stop="goBj(scope.row)"
style="width: 1.125rem;height: 1.125rem; margin-right: 1.125rem;cursor: pointer;">
<use xlink:href="#icon-bianji" />
</svg>
......@@ -130,7 +129,7 @@
placement="top"
:open-delay="500">
<svg class="icon" aria-hidden="true" @click.stop="goGzl"
<svg class="icon" aria-hidden="true" @click.stop="goGzl(scope.row)"
style="width: 1.125rem;height: 1.125rem; margin-right: 1.125rem;cursor: pointer;">
<use xlink:href="#icon-gongzuoliu" />
</svg>
......@@ -211,6 +210,9 @@ export default {
this.getList()
},
methods: {
getRowKeys(row) {
return row.logicId
},
loadData() {
this.getList()
},
......@@ -258,13 +260,13 @@ export default {
},
goBj() {
goBj(info) {
//TODO...编辑.
this.$emit('openBj')
this.$emit('openBj', info)
},
goGzl() {
goGzl(info) {
//TODO.... 工作流
this.$emit('openGzl')
this.$emit('openGzl', info)
},
goSjgl() {
//TODO....数据管理
......
......@@ -9,37 +9,46 @@
<div style="float: left;" class="opt-select">
<div class="select-left">{{selValue}}</div>
<div :class="isShowing?'select-right-focus':'select-right-normal'">
<svg class="icon opt-select-right-svg" aria-hidden="true">
<use xlink:href="#icon-shenhe" />
</svg>
</div>
<!-- <div :class="isShowing?'select-right-focus':'select-right-normal'">-->
<!-- <svg class="icon opt-select-right-svg" aria-hidden="true">-->
<!-- <use xlink:href="#icon-shenhe" />-->
<!-- </svg>-->
<!-- </div>-->
</div>
<el-dropdown-menu slot="dropdown" class="select-list-content">
<div class="select-list-content-left">
<div class="list-item">用户</div>
<div class="list-item">用户组</div>
<div :class="{'list-item':true,'list-item-focus':isYh}" @click="toggleYh(true)">用户</div>
<div :class="{'list-item':true,'list-item-focus':!isYh}" @click="toggleYh(false)">用户组</div>
</div>
<div class="select-list-content-right">
<div class="top-div">
<div v-for="item in curOpt" class="top-item">{{item.name}}</div>
<div v-for="(item,index) in getItemArr()" class="top-item" @click="selectItem(item)"
:key="index">
<span v-if='item.name.length > 6'>
<el-tooltip effect="dark" :content="item.name" placement="top">
<div class="span-name">
{{ item.name.slice(0,6) + '...'}}
</div>
</el-tooltip>
</span>
<span v-else>
{{ item.name}}
</span>
<div v-show="isSelect(item)" class="look" style="float: right;margin-right: 17px;">
<i class="iconfont icon-duihao"></i>
</div>
</div>
</div>
<div class="bottom-div">
<div class="queding">确定</div>
<div class="quxiao">取消</div>
<div class="queding" @click="commit()">确定</div>
<div class="quxiao" @click="cancel()">取消</div>
</div>
</div>
<!-- <div v-for="item in curOpt" :key="item.icon" class="select-list-content-item">-->
<!-- <svg class="icon opt-select-right-svg" aria-hidden="true"-->
<!-- style="margin-right: 5px;width: 20px;height: 20px;">-->
<!-- <use :xlink:href="item.icon" />-->
<!-- </svg>-->
<!-- {{item.name}}-->
<!-- </div>-->
</el-dropdown-menu>
</el-dropdown>
......@@ -50,6 +59,11 @@
<script>
export default {
name: 'SjkyhSelect',
props: {
params: {
type: Array
}
},
data() {
return {
isShowing: false,
......@@ -62,13 +76,132 @@ export default {
{name: '审核4', value: '4', icon: '#icon-shenhe'},
{name: '审核5', value: '5', icon: '#icon-shenhe'},
],
userGroupArr: [],
userArr: [],
userGroupSelectSet: [],
userSelectSet: [],
isYh: true,
}
},
created() {
this.userGroupSelectSet = new Set()
this.userSelectSet = new Set()
this.doQuery()
},
methods: {
isSelect(item) {
if (this.isYh) {
return this.userSelectSet.has(item.id)
} else {
return this.userGroupSelectSet.has(item.id)
}
},
selectItem(item) {
if (this.isYh) {
if (this.userSelectSet.has(item.id)) {
this.userSelectSet.delete(item.id)
} else {
this.userSelectSet.add(item.id)
}
} else {
if (this.userGroupSelectSet.has(item.id)) {
this.userGroupSelectSet.delete(item.id)
} else {
this.userGroupSelectSet.add(item.id)
}
}
this.$forceUpdate()
},
visibleChange(val) {
let _that = this
_that.isShowing = val
this.isYh = true
this.updateSelectSet()
},
updateSelectSet() {
this.userSelectSet.clear()
this.userGroupSelectSet.clear()
this.params.forEach(item => {
if (item.type === 0) {
this.userSelectSet.add(item.id)
} else {
this.userGroupSelectSet.add(item.id)
}
})
},
toggleYh(isyh) {
this.isYh = isyh
},
getItemArr() {
if (this.isYh) {
return this.userArr
} else {
return this.userGroupArr
}
},
commit() {
let userSize = this.userSelectSet.size
let groupSize = this.userGroupSelectSet.size
// logger.info('size', size)
if (userSize > 0 || groupSize > 0) {
let result = []
if (userSize > 0) {
this.userArr.forEach(item => {
if (this.userSelectSet.has(item.id)) {
result.push({
id: item.id,
name: item.name,
type: 0
})
}
})
}
if (groupSize > 0) {
this.userGroupArr.forEach(item => {
if (this.userGroupSelectSet.has(item.id)) {
result.push({
id: item.id,
name: item.name,
type: 1
})
}
})
}
if (this.$refs.dropdown) {
this.$refs.dropdown.visible = false
}
this.$emit('select', result)
} else {
this.$message({
type: 'info',
message: '请先选择用户',
})
}
},
cancel() {
if (this.$refs.dropdown) {
this.$refs.dropdown.visible = false
}
// this.userSelectSet.clear()
// this.userGroupSelectSet.clear()
},
doQuery() {
NetUtil.xtfkgl
.yhList()
.then(res => {
logger.info(res)
if (res && res.code === 0 && res.detail) {
this.userGroupArr = res.detail.userGroups
this.userArr = res.detail.users
}
})
}
},
watch: {
params() {
this.updateSelectSet()
}
}
}
</script>
......@@ -183,6 +316,9 @@ export default {
/*height: 40px;*/
background: #FFFFFF;
border: 1px none #EEEEEE;
border-right-style: solid;
.list-item {
width: 100%;
height: 40px;
......@@ -191,12 +327,23 @@ export default {
color: #333333;
line-height: 19px;
padding: 0px 0px 0px 15px;
padding: 0px 0px 0px 13px;
display: flex;
align-items: center;
justify-content: left;
border: 2px none white;
border-left-style: solid;
}
.list-item-focus {
border: 2px none #055FE7;
border-left-style: solid;
color: #055FE7;
}
}
.select-list-content-right {
......@@ -217,7 +364,18 @@ export default {
font-size: 14px;
font-family: HarmonyOS_Sans_SC;
color: #333333;
line-height: 19px;
line-height: 40px;
padding-left: 16px;
}
.top-item:hover {
background: #F5F5F7;
}
.span-name {
overflow: hidden;
float: left;
}
}
......@@ -331,6 +489,7 @@ export default {
width: 6px; // 横向滚动条
height: 6px; // 纵向滚动条 必写
}
// 滚动条的滑块
/deep/ .top-div::-webkit-scrollbar-thumb {
background-color: #dadde0;
......
......@@ -42,29 +42,25 @@
@openGzl="openGzl"
@openSjgl="openSjgl" />
<!-- 新增分库页面-->
<add-xtfk-view ref="addXtfk" :is-ry="isPerson" v-show="isAddFk" @close="closeXtfkView" />
<gzl-view ref="gzlView" v-show="isShowGzl" @close="closeGzlView" />
<!-- 逻辑分库、工作流 新增、编辑页面 -->
<xtfk-and-gzl-view ref="addXtfk" :is-ry="isPerson" v-show="isAddFk" @close="closeXtfkView" />
</el-container>
</template>
<script>
import RyXtljfkView from '../xtfkgl/RyXtljfkView.vue'
import AjXtljfkView from '../xtfkgl/AjXtljfkView.vue'
import AddXtfkView from '../xtfkgl/AddXtfkView.vue'
import GzlView from '../xtfkgl/GzlView.vue'
import XtfkAndGzlView from '../xtfkgl/XtfkAndGzlView.vue'
export default {
name: 'XtfkglMain',
components: {
GzlView,
RyXtljfkView,
AjXtljfkView,
AddXtfkView
XtfkAndGzlView
},
data() {
return {
isShowGzl: false,
isAddFk: false,
isPerson: true,
}
......@@ -85,29 +81,28 @@ export default {
this.$refs.addXtfk.showAll()
},
openBj() { // 人员/案件编辑
openBj(info) { // 人员/案件编辑
this.isAddFk = true
this.$refs.addXtfk.showLjfk()
this.$refs.addXtfk.showLjfk(info)
},
openGzl() {// 人员/案件工作流
openGzl(info) {// 人员/案件工作流
this.isAddFk = true
this.$refs.addXtfk.showGzl()
this.$refs.addXtfk.showGzl(info)
},
openSjgl() { // 人员/案件数据管理
if (this.isPerson) {
} else {
}
},
closeXtfkView() {
closeXtfkView(isSuccess) {
this.isAddFk = false
if (isSuccess && isRefresh) {
if (this.isPerson) {
this.$refs.ryXtfk.loadData()
} else {
this.$refs.ajXtfk.loadData()
}
}
},
closeGzlView() {
this.isShowGzl = false
}
},
}
......
......@@ -53,7 +53,7 @@
.title {
display: flex;
padding: 30px 0 20px 0px;
padding: 20px 0px 0px 0px;
div {
font-size: 16px;
......@@ -115,10 +115,10 @@
}
.radio-info {
margin-top: 10px;
margin-top: 2px;
width: 204px;
height: 35px;
height: 40px;
}
.el-input__inner {
......@@ -177,7 +177,7 @@
//box-shadow: 4px 4px 4px 0px rgba(193, 216, 251, 0.8), -4px -4px 4px 0px #ffffff;
position: relative;
text-align: center;
margin-right: 25px;
margin-right: 5px;
//margin-top: 7px;
> div {
......@@ -236,7 +236,8 @@
border: 1px dashed #aeb5c2 !important;
position: relative !important;
display: inline-block;
margin-right: 25px;
margin-right: 5px;
margin-left: 20px;
border-radius: 4px;
}
......@@ -247,6 +248,20 @@
}
}
.dui-lie-ming-cheng-bx { // 并行,查询队列布局
border: 0px solid #AEB5C2;
background: #F6F8FA;
box-shadow: 4px 4px 4px 0px rgba(193, 216, 251, 0.8), -4px -4px 4px 0px #FFFFFF;
border-radius: 4px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #999999;
line-height: 22px;
}
.chu-li-dui-lie {
width: 96px;
height: 32px;
......@@ -363,7 +378,7 @@
position: relative;
text-align: center;
margin-left: 30px;
margin-left: 8px;
> div {
line-height: 32px;
......@@ -391,7 +406,6 @@
margin-left: 73px;
}
.gong-zuo-dui-lie-bingxing-item {
height: 52px;
......@@ -554,6 +568,18 @@
}
}
.slide-fade-leave-active,
.slide-fade-enter-active {
transition: all 0.8s;
}
.slide-fade-enter,
.slide-fade-leave-to {
transform: translateY(230px);
opacity: 0;
}
.dialog /deep/ {
.el-form-item__content {
margin-left: 20px !important;
......@@ -671,6 +697,7 @@
width: 6px; // 横向滚动条
height: 6px; // 纵向滚动条 必写
}
// 滚动条的滑块
/deep/ .fix-height::-webkit-scrollbar-thumb {
background-color: #dadde0;
......
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