Compare commits

..

No commits in common. "huyt" and "caor" have entirely different histories.
huyt ... caor

270 changed files with 2348 additions and 62963 deletions

View File

@ -1,14 +1,13 @@
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
},
"compact": false
}
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
}
}

BIN
dist.zip

Binary file not shown.

View File

@ -39,9 +39,7 @@
"-": "^0.0.1",
"@babel/parser": "^7.7.4",
"@riophae/vue-treeselect": "0.4.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^1.0.2",
"axios": "^0.24.0",
"axios": "0.24.0",
"babel-polyfill": "^6.26.0",
"clipboard": "2.0.8",
"crypto-js": "^4.1.1",
@ -91,7 +89,6 @@
"connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
"html-webpack-plugin": "^5.6.0",
"lint-staged": "10.5.3",
"runjs": "4.4.2",
"sass": "1.32.13",

View File

@ -13,42 +13,41 @@
</template>
<script>
import { setTheme } from '@/utils/setTheme'
import { setTheme } from "@/utils/setTheme";
export default {
name: 'App',
name: "App",
data() {
return {
chalk: '', // content of theme-chalk css
theme: '',
routerAlive: true
}
chalk: "", // content of theme-chalk css
theme: "",
routerAlive: true,
};
},
provide() {
return {
routerRefresh: this.routerRefresh
}
routerRefresh: this.routerRefresh,
};
},
mounted() {
setTheme(this.$store.state.settings.theme)
setTheme(this.$store.state.settings.theme);
window.addEventListener(
'hashchange',
"hashchange",
() => {
let currentPath = window.location.hash.slice(1)
let currentPath = window.location.hash.slice(1);
if (this.$route.path !== currentPath) {
this.$router.push(currentPath)
this.$router.push(currentPath);
}
},
false
)
);
},
methods: {
routerRefresh() {
this.routerAlive = false
this.routerAlive = false;
this.$nextTick(() => {
this.routerAlive = true
})
}
this.routerAlive = true;
});
},
},
metaInfo() {
return {
@ -58,27 +57,26 @@ export default {
titleTemplate: (title) => {
return title
? `${title} - ${process.env.VUE_APP_TITLE}`
: process.env.VUE_APP_TITLE
}
}
: process.env.VUE_APP_TITLE;
},
};
},
activated() {
// 使 Vue.nextTick
this.$nextTick(() => {
})
});
},
deactivated() {
// 使 Vue.nextTick
this.$nextTick(() => {
})
}
}
});
},
};
</script>
<style lang="scss">
.loadingclass {
.loadingclass {
z-index: 9999999 !important;
}
}
//
::-webkit-scrollbar {
width: 5px;
@ -107,94 +105,27 @@ export default {
}
</style>
<style lang="scss">
//
.settingBtn {
cursor: pointer;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 14px !important;
height: 14px !important;
}
}
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 14px !important;
height: 14px !important;
}
}
//
.cell{
font-size: 14px !important;
}
.el-form-item__content {
display: block !important;
}
//
.el-button--primary.is-plain {
color: #fff !important;
}
//dialog线
.el-dialog__header {
border-bottom: 1px solid #ebebeb;
}
/* 定义滚动条样式 */
.scrollable-box {
overflow: auto;
box-sizing: border-box;
}
.scrollable-box:hover {
overflow: auto;
}
.el-table__header-wrapper {
background: #f7f7f7 !important;
}
.el-button--primary {
.el-button--primary{
background-color: #3877f5 !important;
}
.el-table {
width: 100%;
&::before {
display: none;
}
//
thead th {
font-size: 14px;
color: #575757;
&:nth-last-child(2) {
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
border-radius: 0 5px 5px 0;
right: 1px;
}
}
thead th,
.el-table__row td {
font-family: PingFangSC-Regular, PingFang SC;
@ -202,29 +133,24 @@ export default {
padding: 10px 0;
border-top: 0px solid rgba(0, 0, 0, 0.1) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
background: #fff;
background: #fff;
&:first-child {
border-left: 0px solid rgba(0, 0, 0, 0.1) !important;
// border-radius: 5px 0 0 5px;
}
}
.el-table__row > td {
font-size: 12px;
color: #333333;
&:last-child {
border-right: 0px solid rgba(0, 0, 0, 0.1) !important;
// border-radius: 0 5px 5px 0;
right: 1px;
}
}
.el-table__body tr:hover > td.el-table__cell {
background-color: rgba(0, 110, 255, 0.05);
}
.el-table__fixed::before {
display: none;
}

View File

@ -1,65 +0,0 @@
import request from '@/utils/request'
// 表格数据获取
export function confTempSaveAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/save",
method: 'post',
data,
})
}
export function queryVoucherTypeAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryVoucherType",
method: 'post',
data,
})
}export function tempupdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/update",
method: 'post',
data,
})
}export function tempqueryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/queryAll",
method: 'post',
data,
})
}
export function tempdeleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/delete",
method: 'post',
data,
})
}export function tempcheckAbstractAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/checkAbstract",
method: 'post',
data,
})
}export function tempQueryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/type/queryAll",
method: 'post',
data,
})
}export function typeSaveAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/type/save",
method: 'post',
data,
})
}export function typeUpdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/type/update",
method: 'post',
data,
})
}export function typeDeleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/temp/type/delete",
method: 'post',
data,
})
}

View File

@ -1,80 +0,0 @@
//会计科技
import request from "@/utils/request";
//业务模块
//新增模块
export function subjectContrastQueryAll(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/queryAll",
method: "post",
data,
});
}export function queryOrgBookVOAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryOrgBookVO",
method: "post",
data,
});
}export function queryBdinfoListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryBdinfoList",
method: "post",
data,
});
}export function subjectContrastSaveAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/save",
method: "post",
data,
});
}export function subjectContrastqueryAll(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/queryAll",
method: "post",
data,
});
}export function subjectContrastdeleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/delete",
method: "post",
data,
});
}export function subjectContrastupdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/update",
method: "post",
data,
});
}export function queryDataByMapAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryDataByMap",
method: "post",
data,
});
}export function queryDataPagedByMapAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryDataPagedByMap",
method: "post",
data,
});
}export function queryAccSubjByOrgBookIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryAccSubjByOrgBookId",
method: "post",
data,
});
}export function subjectContrastBDelete(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrastB/delete",
method: "post",
data,
});
}export function queryGlsubrelationAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryGlsubrelation",
method: "post",
data,
});
}

View File

@ -1,47 +0,0 @@
import request from "@/utils/request";
export function logqueryBillAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryBill",
method: "post",
data,
});
}
// 生成
export function coreGenerateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/core/generate",
method: "post",
data,
});
}
// 凭证明细查询
export function queryDetailsByBillCodeAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryDetailsByBillCode",
method: "post",
data,
});
}
export function queryBillFiledsAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryBillFileds",
method: "post",
data,
});
}
export function queryBillPagedAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryBillPaged",
method: "post",
data,
});
}
export function queryDetailsByBillCodeAndMdmIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryDetailsByBillCodeAndMdmId",
method: "post",
data,
});
}

View File

@ -1,56 +0,0 @@
//会计科技
import request from "@/utils/request";
//业务模块
//新增模块
export function queryOrgVOAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryOrgVO",
method: "post",
data,
});
}export function queryOrgBookVOAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryOrgBookVO",
method: "post",
data,
});
}export function subjectClassificationqueryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectClassification/queryAll",
method: "post",
data,
});
}export function subjectClassificationSaveAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectClassification/save",
method: "post",
data,
});
}export function subjectClassificationUpdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectClassification/update",
method: "post",
data,
});
}export function queryByInfluenceIdsAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectContrast/queryByInfluenceIds",
method: "post",
data,
});
}export function subjectClassificationDeleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/subjectClassification/delete",
method: "post",
data,
});
}export function queryBdInfoAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryBdInfo",
method: "post",
data,
});
}

View File

@ -1,138 +0,0 @@
import request from "@/utils/request";
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue'
export default {
components: { basePage, baseTree }
}
//业务模块
//新增模块
export function queryByIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModule/save",
method: "post",
data,
});
}export function queryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModule/queryAll",
method: "post",
data,
});
}export function businessModuledeleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModule/delete",
method: "post",
data,
});
}export function businessModuleUpdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModule/update",
method: "post",
data,
});
}export function queryMdmsByModuleIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModuleMdm/queryMdmsByModuleId",
method: "post",
data,
});
}export function businessModulequeryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/mdm/queryAll",
method: "post",
data,
});
}export function businessModuleMdmSaveListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModuleMdm/saveList",
method: "post",
data,
});
}export function businessModuleMdmupdateListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModuleMdm/updateList",
method: "post",
data,
});
}export function businessModuleMdmdeleteListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModuleMdm/deleteList",
method: "post",
data,
});
}export function influenceFactorqueryAllAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactor/queryAll",
method: "post",
data,
});
}export function influenceFactorsaveAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactor/save",
method: "post",
data,
});
}export function influenceFactorupdateAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactor/update",
method: "post",
data,
});
}export function deleteAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactor/delete",
method: "post",
data,
});
}export function queryByMdmIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactorCorrelation/queryByMdmId",
method: "post",
data,
});
}export function queryMdmAndFiledsByMdmIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/mdm/queryMdmAndFiledsByMdmId",
method: "post",
data,
});
}export function influenceFactorCorrelationsaveListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactorCorrelation/saveList",
method: "post",
data,
});
}export function influenceFactorCorrelationupdateListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactorCorrelation/updateList",
method: "post",
data,
});
}export function influenceFactorCorrelationdeleteListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/influenceFactorCorrelation/deleteList",
method: "post",
data,
});
}export function queryBdinfoListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryBdinfoList",
method: "post",
data,
});
}export function queryCashFlowMapAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/bd/queryCashFlowMap",
method: "post",
data,
});
}export function queryMdmAndFiledssByMdmIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/mdmfile/queryMdmAndFiledssByMdmId",
method: "post",
data,
});
}

View File

@ -1,11 +0,0 @@
import request from "@/utils/request";
//影响因素关联
//新增模块
export function queryModuleIncludeMdmListAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/conf/businessModuleMdm/queryModuleIncludeMdmList",
method: "post",
data,
});
}

View File

@ -566,7 +566,7 @@ body {
background: #FFFFFF;
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 1.4285em;
/* color: rgba(0, 0, 0, 0.87); */
color: #58657d;
font-smoothing: antialiased;
@ -629,6 +629,10 @@ h5:last-child {
Text
*******************************/
p {
margin: 0em 0em 1em;
line-height: 1.4285em;
}
p:first-child {
margin-top: 0em;
@ -25193,7 +25197,7 @@ Floated Menu / Item
margin: 1em 0em;
background: #F8F8F9;
padding: 1em 1.5em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
transition: opacity 0.1s ease, color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
border-radius: 0.28571429rem;
@ -28794,7 +28798,7 @@ a.ui.card:hover,
border-left: none;
font-size: 1em;
max-width: 500px;
line-height: 1.4285em;
}
/*--------------
@ -29074,7 +29078,7 @@ a.ui.card:hover,
margin-top: 0.6em;
max-width: auto;
font-size: 1em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
}
@ -33736,7 +33740,7 @@ a.ui.nag {
min-width: min-content;
z-index: 1900;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: 250px;
background: #FFFFFF;
padding: 0.833em 1em;
@ -33810,7 +33814,7 @@ a.ui.nag {
white-space: nowrap;
font-size: 1rem;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: none;
background: #FFFFFF;
padding: 0.833em 1em;

View File

@ -566,7 +566,7 @@ body {
background: #FFFFFF;
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 1.4285em;
/* color: rgba(0, 0, 0, 0.87); */
color: #58657d;
font-smoothing: antialiased;
@ -631,7 +631,7 @@ h5:last-child {
p {
margin: 0em 0em 1em;
line-height: 1.4285em;
}
p:first-child {
@ -25197,7 +25197,7 @@ Floated Menu / Item
margin: 1em 0em;
background: #F8F8F9;
padding: 1em 1.5em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
transition: opacity 0.1s ease, color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
border-radius: 0.28571429rem;
@ -28798,7 +28798,7 @@ a.ui.card:hover,
border-left: none;
font-size: 1em;
max-width: 500px;
line-height: 1.4285em;
}
/*--------------
@ -29078,7 +29078,7 @@ a.ui.card:hover,
margin-top: 0.6em;
max-width: auto;
font-size: 1em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
}
@ -33740,7 +33740,7 @@ a.ui.nag {
min-width: min-content;
z-index: 1900;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: 250px;
background: #FFFFFF;
padding: 0.833em 1em;
@ -33814,7 +33814,7 @@ a.ui.nag {
white-space: nowrap;
font-size: 1rem;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: none;
background: #FFFFFF;
padding: 0.833em 1em;
@ -38773,4 +38773,4 @@ body.pushable > .pusher {
/*******************************
Site Overrides
*******************************/
*******************************/

View File

@ -652,7 +652,7 @@ body {
background: #FFFFFF;
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 1.4285em;
/* color: rgba(0, 0, 0, 0.87); */
color: #58657d;
font-smoothing: antialiased;
@ -717,7 +717,7 @@ h5:last-child {
p {
margin: 0em 0em 1em;
line-height: 1.4285em;
}
p:first-child {
@ -25283,7 +25283,7 @@ Floated Menu / Item
margin: 1em 0em;
background: #F8F8F9;
padding: 1em 1.5em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
transition: opacity 0.1s ease, color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
border-radius: 0.28571429rem;
@ -28884,7 +28884,7 @@ a.ui.card:hover,
border-left: none;
font-size: 1em;
max-width: 500px;
line-height: 1.4285em;
}
/*--------------
@ -29164,7 +29164,7 @@ a.ui.card:hover,
margin-top: 0.6em;
max-width: auto;
font-size: 1em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
}
@ -33826,7 +33826,7 @@ a.ui.nag {
min-width: min-content;
z-index: 1900;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: 250px;
background: #FFFFFF;
padding: 0.833em 1em;
@ -33900,7 +33900,7 @@ a.ui.nag {
white-space: nowrap;
font-size: 1rem;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: none;
background: #FFFFFF;
padding: 0.833em 1em;
@ -46970,7 +46970,7 @@ body {
background: #FFFFFF;
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 1.4285em;
/* color: rgba(0, 0, 0, 0.87); */
color: #58657d;
font-smoothing: antialiased;
@ -47035,7 +47035,7 @@ h5:last-child {
p {
margin: 0em 0em 1em;
line-height: 1.4285em;
}
p:first-child {
@ -71601,7 +71601,7 @@ Floated Menu / Item
margin: 1em 0em;
background: #F8F8F9;
padding: 1em 1.5em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
transition: opacity 0.1s ease, color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
border-radius: 0.28571429rem;
@ -75202,7 +75202,7 @@ a.ui.card:hover,
border-left: none;
font-size: 1em;
max-width: 500px;
line-height: 1.4285em;
}
/*--------------
@ -75482,7 +75482,7 @@ a.ui.card:hover,
margin-top: 0.6em;
max-width: auto;
font-size: 1em;
line-height: 1.4285em;
color: rgba(0, 0, 0, 0.87);
}
@ -80144,7 +80144,7 @@ a.ui.nag {
min-width: min-content;
z-index: 1900;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: 250px;
background: #FFFFFF;
padding: 0.833em 1em;
@ -80218,7 +80218,7 @@ a.ui.nag {
white-space: nowrap;
font-size: 1rem;
border: 1px solid #D4D4D5;
line-height: 1.4285em;
max-width: none;
background: #FFFFFF;
padding: 0.833em 1em;
@ -86574,7 +86574,7 @@ div[is="ui-button"] {
border: 0;
}
.ui-button:hover,
.ui-button:hover,
[is="ui-button"]:hover {
color: var(--ui-white, #fff);
text-decoration: none;
@ -86846,7 +86846,7 @@ input[data-type="normal"].loading {
padding: 0;
vertical-align: middle;
border: 0;
border-radius: var(--ui-radius, 4px);
border-radius: var(--ui-radius, 4px);
background-color: rgba(25, 28, 34, 0.2);
outline: none;
cursor: pointer;
@ -86881,7 +86881,7 @@ _::-moz-color-swatch {
position: absolute;
width: 241px;
padding: 10px 12px;
border-radius: var(--ui-radius, 4px);
border-radius: var(--ui-radius, 4px);
background-color: var(--ui-light, #f7f9fa);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
font-size: var(--ui-font, 14px);
@ -86929,7 +86929,7 @@ _::-moz-color-swatch {
border-radius: 50%;
}
.ui-color-switch[data-mode="more"]::before {
background: radial-gradient(closest-side, white, transparent),
background: radial-gradient(closest-side, white, transparent),
conic-gradient(red, magenta, blue, aqua, lime, yellow, red);
border-radius: 50%;
}
@ -87150,7 +87150,7 @@ _::-moz-color-swatch {
padding-top: 8px;
padding-bottom: 8px;
margin-left: 15px;
border-radius: var(--ui-radius, 4px);
border-radius: var(--ui-radius, 4px);
text-align: center;
font-size: var(--ui-font, 14px);
font-family: inherit;
@ -87448,7 +87448,7 @@ datalist {
}
/* for Safari */
@supports not (text-align-last: auto) {
[is="ui-datetime"][type="time"] {
[is="ui-datetime"][type="time"] {
max-width: 125px;
}
}
@ -88288,7 +88288,7 @@ a:hover .ui-droplist-arrow:empty,
}
.ui-dropanel-close:hover::before {
background-color: var(--ui-dark, #4c5161);
background-color: var(--ui-dark, #4c5161);
}
.ui-dropanel-content {
@ -88957,7 +88957,7 @@ ui-pagination:not(:defined),
* @author zhangxinxu
* @create 19-10-18
* @editor gandaochuan
* @edit 20-04-10
* @edit 20-04-10
*
**/
@ -89288,7 +89288,7 @@ input[data-tips][reverse]:not([data-tips*="$"]):active::after {
--mask-url: url("data:image/svg+xml,%3Csvg width='12' height='11' viewBox='0 0 12 11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 0l1.693 3.67 4.013.476L8.74 6.89l.788 3.964L6 8.88l-3.527 1.974.788-3.964L.294 4.146l4.013-.476L6 0z'/%3E%3C/svg%3E");
--mask: var(--mask-url) repeat-x left / 2em 100%;
}
[is="ui-rate"]::-webkit-slider-runnable-track {
background: var(--ui-orange, #f59b00);
height: 2em;
@ -90779,7 +90779,7 @@ textarea:disabled {
display: inline-block;
zoom: 1;
white-space: nowrap;
}
.selectize-input>.item{
width: calc(100% - 10px);

View File

@ -3342,6 +3342,7 @@
.custom-theme .el-radio-group {
display: inline-block;
line-height: 1;
vertical-align: middle;
font-size: 0
}
@ -3354,6 +3355,7 @@
.custom-theme .el-radio-button__inner {
display: inline-block;
line-height: 1;
white-space: nowrap;
vertical-align: middle;
background: #fff;

View File

@ -1,9 +1 @@
<svg t="1720579857492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3356"
width="200" height="200">
<path
d="M252.442947 766.005895l3.449264 1.778526 262.844631 151.767579a13.473684 13.473684 0 0 0 11.317895 0.997053l2.155789-0.997053 254.679579-147.051789a40.421053 40.421053 0 0 1 43.708632 67.907368l-3.287579 2.101895-254.679579 147.051789a94.315789 94.315789 0 0 1-89.088 2.802526l-5.22779-2.802526-262.844631-151.767579a40.421053 40.421053 0 0 1 33.414737-73.216l3.557052 1.428211z m401.731369-657.51579l249.613473 144.114527a94.315789 94.315789 0 0 1 46.996211 75.749052l0.161684 5.928421v76.90779a40.421053 40.421053 0 0 1-80.653473 3.880421l-0.188632-3.880421v-76.90779a13.473684 13.473684 0 0 0-6.736842-11.66821l-249.613474-144.114527a40.421053 40.421053 0 0 1 40.421053-70.009263z m-201.027369 14.120421a40.421053 40.421053 0 0 1-14.821052 55.215158l-250.745263 144.788211a13.473684 13.473684 0 0 0-6.548211 9.296842l-0.188632 2.371368v72.677053a40.421053 40.421053 0 0 1-80.680421 3.880421l-0.161684-3.880421v-72.677053a94.315789 94.315789 0 0 1 47.157895-81.677473L397.931789 107.789474a40.421053 40.421053 0 0 1 55.215158 14.794105z"
p-id="3357"></path>
<path
d="M525.473684 0a121.263158 121.263158 0 1 1 0 242.526316 121.263158 121.263158 0 0 1 0-242.526316z m0 80.842105a40.421053 40.421053 0 1 0 0 80.842106 40.421053 40.421053 0 0 0 0-80.842106zM148.210526 485.052632a121.263158 121.263158 0 1 1 0 242.526315 121.263158 121.263158 0 0 1 0-242.526315z m0 80.842105a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105zM902.736842 485.052632a121.263158 121.263158 0 1 1 0 242.526315 121.263158 121.263158 0 0 1 0-242.526315z m0 80.842105a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105z"
p-id="3358"></path>
</svg>
<svg t="1698635429898" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13525" width="200" height="200"><path d="M383.977281 638.040122C248.113773 629.720642 131.961033 595.162802 63.99728 546.909818V639.960002c0 63.420036 138.359353 116.088744 319.980001 126.200113v63.868008c-135.863509-8.31948-252.016249-42.813324-319.980001-91.130304V831.948003H0.00128V223.986001C0.00128 100.281732 200.564745 0 447.973282 0s447.972002 100.281732 447.972001 223.986001v202.099369h-63.996V339.434785C753.554183 404.454722 610.907098 447.972002 447.973282 447.972002s-305.580901-43.51728-383.976002-108.537217V447.972002c0 63.420036 138.359353 116.088744 319.980001 126.200112v63.868008zM447.973282 1023.936004c-247.408537 0-447.972002-85.946628-447.972002-191.988001h63.996c0 70.71558 171.893257 127.992 383.976002 127.992001v63.996zM447.973282 383.976001c212.082745 0 383.976001-71.67552 383.976001-159.99S660.056027 63.996 447.973282 63.996 63.99728 135.671521 63.99728 223.986001 235.890537 383.976001 447.973282 383.976001z m556.893194 419.813762l-44.541216-25.91838c2.495844-13.631148 4.095744-27.51828 4.095744-41.91738a231.665521 231.665521 0 0 0-4.095744-41.91738l44.541216-25.982376a38.589588 38.589588 0 0 0 13.951128-52.476721l-38.07762-66.491844a37.885632 37.885632 0 0 0-52.028748-14.07912l-45.053185 26.23836a227.825761 227.825761 0 0 0-71.547528-42.23736V486.369602c0-21.182676-17.022936-38.3976-38.07762-38.3976h-76.15524a38.269608 38.269608 0 0 0-38.07762 38.3976v32.63796a227.825761 227.825761 0 0 0-71.547529 42.23736l-45.053184-26.23836a37.885632 37.885632 0 0 0-52.028748 14.07912L453.092962 615.641522a38.589588 38.589588 0 0 0 13.951128 52.476721l44.541216 25.91838a231.665521 231.665521 0 0 0-4.095744 41.91738c0 14.3991 1.5999 28.286232 4.095744 41.91738l-44.541216 25.982376a38.589588 38.589588 0 0 0-13.951128 52.47672l38.07762 66.491845a37.885632 37.885632 0 0 0 52.028748 14.07912l45.053184-26.23836c21.054684 18.046872 44.925192 32.765952 71.547529 42.23736v32.63796c0 21.182676 17.022936 38.3976 38.07762 38.3976h76.15524a38.269608 38.269608 0 0 0 38.07762-38.3976v-32.63796a227.825761 227.825761 0 0 0 71.547528-42.23736l45.053185 26.23836a37.949628 37.949628 0 0 0 52.028748-14.07912l38.07762-66.555841a38.589588 38.589588 0 0 0-13.951128-52.47672z m-47.293044 37.821636l-17.534904 29.886132a17.726892 17.726892 0 0 1-23.9985 6.271608l-48.764953-27.646272a175.989001 175.989001 0 0 1-96.185988 54.652585v37.949628c0 9.471408-7.871508 17.214924-17.5989 17.214924h-35.069808a17.406912 17.406912 0 0 1-17.5989-17.27892v-37.885632a175.989001 175.989001 0 0 1-96.185989-54.652585l-48.764952 27.646272a17.726892 17.726892 0 0 1-23.9985-6.271608l-17.534904-29.886132a17.022936 17.022936 0 0 1 6.3996-23.486532l48.95694-27.774264a168.245485 168.245485 0 0 1-9.27942-54.3966c0-19.070808 3.455784-37.245672 9.343416-54.3966l-49.020936-27.774264a17.022936 17.022936 0 0 1-6.3996-23.486533l17.534904-29.886132a17.726892 17.726892 0 0 1 23.9985-6.271608l48.764952 27.646272a175.989001 175.989001 0 0 1 96.185989-54.652584v-37.949628c0-9.535404 7.871508-17.214924 17.5989-17.214924h35.069808c9.727392 0 17.5989 7.67952 17.5989 17.27892v37.885632a175.989001 175.989001 0 0 1 96.185988 54.652584l48.764953-27.646272a17.726892 17.726892 0 0 1 23.9985 6.271608l17.534904 29.886132a17.022936 17.022936 0 0 1-6.3996 23.486533l-48.95694 27.774264c5.75964 17.150928 9.27942 35.325792 9.27942 54.3966 0 19.070808-3.455784 37.245672-9.27942 54.3966l48.95694 27.774264a17.022936 17.022936 0 0 1 6.3996 23.486532zM735.955283 639.960002a95.994 95.994 0 1 0 0 191.988001 95.994 95.994 0 0 0 0-191.988001z m0 127.992001a31.998 31.998 0 1 1 0-63.996 31.998 31.998 0 0 1 0 63.996z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,21 +1 @@
<svg t="1720579955400" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3512"
width="200" height="200">
<path
d="M215.578947 889.263158m40.421053 0l538.947368 0q40.421053 0 40.421053 40.421053l0 0q0 40.421053-40.421053 40.421052l-538.947368 0q-40.421053 0-40.421053-40.421052l0 0q0-40.421053 40.421053-40.421053Z"
p-id="3513"></path>
<path
d="M215.578947 242.526316m40.421053 0l538.947368 0q40.421053 0 40.421053 40.421052l0 0q0 40.421053-40.421053 40.421053l-538.947368 0q-40.421053 0-40.421053-40.421053l0 0q0-40.421053 40.421053-40.421052Z"
p-id="3514"></path>
<path
d="M215.578947 377.263158m40.421053 0l538.947368 0q40.421053 0 40.421053 40.421053l0 0q0 40.421053-40.421053 40.421052l-538.947368 0q-40.421053 0-40.421053-40.421052l0 0q0-40.421053 40.421053-40.421053Z"
p-id="3515"></path>
<path
d="M215.578947 512m40.421053 0l242.526316 0q40.421053 0 40.421052 40.421053l0 0q0 40.421053-40.421052 40.421052l-242.526316 0q-40.421053 0-40.421053-40.421052l0 0q0-40.421053 40.421053-40.421053Z"
p-id="3516"></path>
<path
d="M889.263158 80.842105a107.789474 107.789474 0 0 1 107.789474 107.789474v485.052632a107.789474 107.789474 0 0 1-107.789474 107.789473H134.736842a107.789474 107.789474 0 0 1-107.789474-107.789473V188.631579a107.789474 107.789474 0 0 1 107.789474-107.789474h754.526316z m0 80.842106H134.736842a26.947368 26.947368 0 0 0-26.758737 23.794526L107.789474 188.631579v485.052632a26.947368 26.947368 0 0 0 23.794526 26.758736L134.736842 700.631579h754.526316a26.947368 26.947368 0 0 0 26.758737-23.794526L916.210526 673.684211V188.631579a26.947368 26.947368 0 0 0-23.794526-26.758737L889.263158 161.684211z"
p-id="3517"></path>
<path
d="M673.684211 700.631579v269.473684H377.263158V700.631579h296.421053z m-80.842106 80.842105h-134.736842v107.789474h134.736842v-107.789474z"
p-id="3518"></path>
</svg>
<svg t="1698634142296" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7826" width="200" height="200"><path d="M960 80H64c-35.3 0-64 28.6-64 64v576c0 35.3 28.7 64 64 64h312c4.4 0 8 3.6 8 8v84c0 2.2-1.8 4-4 4h-60c-17.7 0-32 14.3-32 32v32h448v-32c0-17.7-14.3-32-32-32h-60c-2.2 0-4-1.8-4-4v-84c0-4.4 3.6-8 8-8h312c35.3 0 64-28.7 64-64V144c0-35.4-28.7-64-64-64zM576 876c0 2.2-1.8 4-4 4H452c-2.2 0-4-1.8-4-4v-52c0-4.4 3.6-8 8-8h112c4.4 0 8 3.6 8 8v52z m384-172c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-44c0-2.2 1.8-4 4-4h888c2.2 0 4 1.8 4 4v44z m-4-112H68c-2.2 0-4-1.8-4-4V160c0-8.8 7.2-16 16-16h864c8.8 0 16 7.2 16 16v428c0 2.2-1.8 4-4 4z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 696 B

View File

@ -1 +1 @@
<svg t="1720580017201" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3672" width="200" height="200"><path d="M808.9 536.4v-347h-4c-5.5-38.2-43.4-70-110.6-92.5-62.1-20.7-144.5-32.1-232.1-32.1S292.1 76.3 230 97c-72.8 24.3-111.3 59.6-111.3 102.2v524.7c0 42.6 38.5 77.9 111.3 102.2 62.1 20.7 144.5 32.1 232.1 32.1 18.3 0 36.4-0.5 53.8-1.5l177.4 102.4 211.9-122.3V592.1l-96.3-55.7z m-261.3 94l145.8-84.1 145.7 84.1v168.2l-145.7 84.1-145.8-84.1V630.4z m188.6-346.1v89.6c-5.3 6.3-21.3 20.5-64.7 34.5-55.4 18.1-129.7 28-209.2 28-102.8 0-171-15.5-210.1-28.5-51.3-17.1-67.2-35-67.2-39.6l-0.1-85.6c29 15 67.6 27.3 112.7 36 50 9.7 106.9 14.8 164.6 14.8 111 0 211.6-18.2 274-49.2z m-0.1-90.9v11.2c-5.3 6.3-21.3 20.5-64.7 34.5-55.3 18-129.6 28-209.2 28-102.8 0-171-15.5-210.1-28.5-51-17-67-34.8-67.2-39.6 0.5-4 13.4-22.2 68.1-40 55.4-18 129.7-28 209.2-28 79.4 0 153.7 9.9 209.2 28 40.6 13.3 58.2 26.7 64.7 34.4zM184.9 647.6c29 15 67.6 27.3 112.7 36.1 50 9.7 106.9 14.8 164.6 14.8 6.3 0 12.8 0 19.3-0.1v93.5c-6.3 0.1-12.8 0.2-19.3 0.2-102.8 0-171-15.5-210.1-28.5-51.3-17.1-67.2-35-67.2-39.6v-76.4z m296.5-55.5v39.8c-7.1 0.2-13.4 0.3-19.3 0.3-102.8 0-171-15.5-210.1-28.5-51.3-17.1-67.2-35-67.2-39.6V451.6c29 15 67.6 27.3 112.7 36.1 50 9.7 106.9 14.8 164.6 14.8 86.7 0 167-11.1 227.7-30.7L481.4 592.1z m254.8-138.8v41l-41.6-24c15.2-5.2 29.2-10.9 41.6-17z" p-id="3673"></path><path d="M797.5 684.1h-129l33.9-33.9c4.4-4.4 4.4-11.6 0-16L682 613.9c-4.4-4.4-11.6-4.4-16 0L591.9 688c-12.1 12.1-12.1 31.8 0 43.8l74.1 74.1c2.2 2.2 5.1 3.3 8 3.3 2.9 0 5.8-1.1 8-3.3l20.4-20.4c2.1-2.1 3.3-5 3.3-8s-1.2-5.9-3.3-8l-33.9-33.8h129c6.2 0 11.3-5.1 11.3-11.3v-28.9c0.1-6.3-5-11.4-11.3-11.4z" p-id="3674"></path></svg>
<svg t="1698634166079" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8825" width="200" height="200"><path d="M544.033302 516.000776V96.000564c0-17.672051-14.478655-31.998984-32.150706-31.998984s-32.150706 14.326933-32.150707 31.998984v420.061624c-54.909072 14.251072-95.809105 64.333925-95.809105 123.935554 0 59.691941 40.82056 109.836206 96.090876 124.000579a32.298816 32.298816 0 0 0-0.281771 4.006195v159.99492c0 17.672051 14.478655 31.998984 32.150707 31.998984s32.150706-14.326933 32.150706-31.998984V768.004516a32.280754 32.280754 0 0 0-0.317894-3.941171c55.389526-14.088512 96.397933-64.301413 96.397932-124.058378 0.010837-59.691941-40.809723-109.832593-96.080038-124.004191z m13.221527 169.249989a64.00158 64.00158 0 1 1 18.744945-45.256635 63.578925 63.578925 0 0 1-18.744945 45.260247zM223.678606 196.003711a32.287979 32.287979 0 0 0 0.292607-4.002582V96.000564a31.970084 31.970084 0 1 0-63.940169 0V192.001129a32.371065 32.371065 0 0 0 0.180622 4.060381c-55.270316 14.160761-96.173962 64.301413-96.173961 124.000579s40.910871 109.818143 96.181186 123.996966a32.360228 32.360228 0 0 0-0.184234 3.937558V927.999436a31.970084 31.970084 0 1 0 63.940169 0V448.000226a32.287979 32.287979 0 0 0-0.278158-3.883372c55.385914-14.088512 96.350971-64.301413 96.350971-124.054765S279.071744 210.084998 223.678606 196.003711z m13.575545 169.315013A64.00158 64.00158 0 1 1 255.999097 320.062089a63.578925 63.578925 0 0 1-18.744946 45.256635zM959.99842 320.062089c0-59.775027-41.048144-109.977091-96.45212-124.058378a32.360228 32.360228 0 0 0 0.173397-4.002582V96.000564a31.970084 31.970084 0 1 0-63.940169 0V192.001129a32.291592 32.291592 0 0 0 0.299833 4.060381c-55.270316 14.160761-96.116162 64.301413-96.116163 124.000579s40.82056 109.836206 96.090876 124.000578a32.298816 32.298816 0 0 0-0.281771 3.99897V927.999436a31.970084 31.970084 0 1 0 63.940169 0V448.061637a32.381903 32.381903 0 0 0-0.166172-3.941171c55.407588-14.084899 96.452119-64.286963 96.45212-124.058377z m-82.746526 45.253022a63.997968 63.997968 0 1 1 18.748558-45.253022 63.578925 63.578925 0 0 1-18.748558 45.253022z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,9 +1 @@
<svg t="1720580039910" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3828"
width="200" height="200">
<path
d="M498.526316 323.368421a202.105263 202.105263 0 1 1 0 404.210526 202.105263 202.105263 0 0 1 0-404.210526z m0 80.842105a121.263158 121.263158 0 1 0 0 242.526316 121.263158 121.263158 0 0 0 0-242.526316zM821.894737 80.842105a121.263158 121.263158 0 1 1 0 242.526316 121.263158 121.263158 0 0 1 0-242.526316z m0 80.842106a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105zM875.789474 727.578947a121.263158 121.263158 0 1 1 0 242.526316 121.263158 121.263158 0 0 1 0-242.526316z m0 80.842106a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105zM202.105263 700.631579a121.263158 121.263158 0 1 1 0 242.526316 121.263158 121.263158 0 0 1 0-242.526316z m0 80.842105a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105zM175.157895 80.842105a121.263158 121.263158 0 1 1 0 242.526316 121.263158 121.263158 0 0 1 0-242.526316z m0 80.842106a40.421053 40.421053 0 1 0 0 80.842105 40.421053 40.421053 0 0 0 0-80.842105z"
p-id="3829"></path>
<path
d="M242.202947 220.052211l190.544842 190.544842-57.155368 57.182315-190.544842-190.571789zM779.776 220.052211l-190.544842 190.544842 57.155368 57.182315 190.544842-190.571789zM375.565474 597.315368L223.124211 749.756632l57.182315 57.155368 152.414316-152.441263zM646.413474 597.315368l190.544842 190.544843-57.155369 57.182315-190.544842-190.571789z"
p-id="3830"></path>
</svg>
<svg t="1698634431255" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12479" width="200" height="200"><path d="M249.381471 284.474073c-78.441032 0-142.247703-63.806671-142.247703-142.247703S170.940439-0.021333 249.381471-0.021333s142.247703 63.806671 142.247703 142.247703-63.806671 142.247703-142.247703 142.247703z m0-241.829628c-54.910856 0-99.581925 44.671069-99.581925 99.581925s44.671069 99.581925 99.581925 99.581926 99.581925-44.671069 99.581926-99.581926-44.671069-99.581925-99.581926-99.581925z" p-id="12480"></path><path d="M249.360138 496.800317H0v-21.332889c0-166.73786 130.045291-261.77588 135.591842-265.722464a21.332889 21.332889 0 1 1 24.831483 34.687277c-1.087977 0.789317-106.323118 78.270369-116.904232 209.702298h205.841045a21.332889 21.332889 0 0 1 0 42.665778z" p-id="12481"></path><path d="M498.74161 496.800317h-249.381472a21.332889 21.332889 0 0 1 0-42.665778h205.862378c-10.581113-131.453261-115.816254-208.912981-116.925564-209.723631a21.332889 21.332889 0 0 1 24.852816-34.665944c5.546551 3.967917 135.591842 98.984604 135.591842 265.722464v21.332889zM774.618529 811.631091c-78.441032 0-142.247703-63.806671-142.247703-142.22637s63.806671-142.22637 142.247703-142.226371c78.4197 0 142.205037 63.806671 142.205037 142.226371s-63.806671 142.22637-142.205037 142.22637z m0-241.786963c-54.910856 0-99.581925 44.671069-99.581926 99.560593s44.671069 99.560592 99.581926 99.560592c54.889523 0 99.53926-44.671069 99.539259-99.560592s-44.649736-99.560592-99.539259-99.560593z" p-id="12482"></path><path d="M774.618529 1023.978667H525.215725v-21.332889c0-166.780525 130.066624-261.77588 135.591842-265.722464a21.354222 21.354222 0 0 1 24.852815 34.70861c-1.087977 0.767984-106.323118 78.206371-116.904231 209.680965h205.862378a21.332889 21.332889 0 1 1 0 42.665778z" p-id="12483"></path><path d="M1023.978667 1023.978667H774.618529a21.332889 21.332889 0 1 1 0-42.665778h205.841045c-10.581113-131.474594-115.816254-208.912981-116.904231-209.702298a21.332889 21.332889 0 1 1 24.852815-34.687277C893.933376 740.869899 1023.978667 835.865253 1023.978667 1002.645778v21.332889z" p-id="12484"></path><path d="M852.248911 479.286015a21.332889 21.332889 0 0 1-21.332888-21.332889c0-175.889669-143.079686-318.990688-318.926689-318.990688a21.332889 21.332889 0 0 1 0-42.665778c199.398513 0 361.592467 162.23662 361.592466 361.656466a21.332889 21.332889 0 0 1-21.332889 21.332889z" p-id="12485"></path><path d="M855.555509 499.082936l-102.739193-78.995688a21.332889 21.332889 0 1 1 25.983459-33.833962l70.121206 53.908211 60.222745-72.723819a21.332889 21.332889 0 0 1 32.873982 27.220767l-86.462199 104.424491z" p-id="12486"></path><path d="M477.430054 948.289577c-199.398513 0-361.635133-162.215287-361.635133-361.613799a21.332889 21.332889 0 1 1 42.665778 0c0 175.868336 143.101019 318.948022 318.969355 318.948022a21.332889 21.332889 0 1 1 0 42.665777z" p-id="12487"></path><path d="M61.801379 684.295077a21.332889 21.332889 0 0 1-16.426324-34.921939l86.440866-104.445824 102.760525 78.995688a21.332889 21.332889 0 0 1-25.983458 33.833961L138.450449 603.848753l-60.201413 72.723818a21.247557 21.247557 0 0 1-16.447657 7.722506z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,15 +1,15 @@
/**
$base-menu-color:hsla(0,0%,100%,.65);
$base-menu-color-active:#fff;
$base-menu-background:#001529;
$base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70);
$base-menu-light-background:#ffffff;
$base-logo-light-title-color: #001529;
$base-sub-menu-background:#000c17;
$base-sub-menu-hover:#001528;
/**
$base-menu-color:hsla(0,0%,100%,.65);
$base-menu-color-active:#fff;
$base-menu-background:#001529;
$base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70);
$base-menu-light-background:#ffffff;
$base-logo-light-title-color: #001529;
$base-sub-menu-background:#000c17;
$base-sub-menu-hover:#001528;
*/
:export {
menuColor: #bfcbd9;
@ -187,8 +187,7 @@ $base-sub-menu-hover:#001528;
}
#app .sidebar-container .horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out,
0s padding-right ease-in-out;
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
#app .sidebar-container .scrollbar-wrapper {
@ -348,18 +347,18 @@ $base-sub-menu-hover:#001528;
background: #d3dce6;
}
/**
$base-menu-color:hsla(0,0%,100%,.65);
$base-menu-color-active:#fff;
$base-menu-background:#001529;
$base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70);
$base-menu-light-background:#ffffff;
$base-logo-light-title-color: #001529;
$base-sub-menu-background:#000c17;
$base-sub-menu-hover:#001528;
/**
$base-menu-color:hsla(0,0%,100%,.65);
$base-menu-color-active:#fff;
$base-menu-background:#001529;
$base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70);
$base-menu-light-background:#ffffff;
$base-logo-light-title-color: #001529;
$base-sub-menu-background:#000c17;
$base-sub-menu-hover:#001528;
*/
:export {
menuColor: #bfcbd9;
@ -526,8 +525,7 @@ body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
html {
@ -615,8 +613,7 @@ aside {
display: block;
line-height: 32px;
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@ -715,4 +712,5 @@ aside a:hover {
}
.el-form-item__error {
top: unset !important;
}

View File

@ -214,4 +214,5 @@ aside {
right: 10px !important;
}
.el-form-item__error {
top: unset !important;
}

View File

@ -6,101 +6,20 @@
<template>
<!-- 权限设置弹框 -->
<!-- :style="{'margin':isCenter?'auto':''}"> -->
<div style="height: 100%">
<div flex="cross:center" v-if="filterShow" style="margin-bottom: 5px">
<el-input
placeholder="输入关键字进行过滤"
v-model="filterText"
style="margin-right: 13px"
></el-input>
<el-button
icon="el-icon-plus"
style="height: 32px; line-height: 32px; padding: 0 13px !important"
@click="add"
v-if="filterButtonShow"
>
</el-button>
<div v-loading="treeLoading" flex style="margin:auto;height: 100%;">
<div class="menu-i" flex="cross:center main:center">
<div class="menu-i-t" flex="cross:top main:justify">
<el-tree :data="menuData" :check-strictly="true" :default-checked-keys="selectData"
@node-click="handleNodeClick" :expand-on-click-node="false" :default-expand-all="expandAll"
:key="new Date().getTime()" :props="treeProps" style="width: 100%;background-color:white;height: 100%;"
@check-change="checkChange" node-key="id" ref="elTree" :show-checkbox="showCheckbox">
</el-tree>
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
</div>
</div>
<div
flex="dir:top cross:center main:center"
style="margin: auto; height: calc(100% - 22px); overflow: auto"
class="treeBodyHeight"
>
<div class="menu-i" flex="cross:center main:center">
<div class="menu-i-t" flex="cross:top main:justify">
<el-tree
:data="menuData"
:check-strictly="true"
:default-checked-keys="selectData"
v-loading="treeLoading"
@node-click="handleNodeClick"
:expand-on-click-node="false"
:default-expand-all="expandAll"
:filter-node-method="filterNode"
:props="treeProps"
style="width: 100%; background-color: transparent"
@check-change="checkChange"
node-key="id"
ref="elTree"
:show-checkbox="showCheckbox"
>
<div
flex="cross:center main:justify"
class="treeItem"
style="width: calc(100% - 31px)"
slot-scope="{ node, data }"
>
<p
class="nowrap"
style="
flex: 1;
font-size: 14px;
height: 32px;
line-height: 32px;
"
@dblclick="dbTree(node, data)"
>
{{ nodeLabel == "" ? node.label : node.label[nodeLabel] }}
</p>
<div style="width: 60px" v-if="treeButton" class="treeItemBtn">
<el-button
type="text"
size="mini"
icon="el-icon-plus"
v-if="appendButton"
@click.stop="() => append(node, data)"
style="color: #333"
>
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-if="reviseButton && data.id != 80"
@click.stop="() => revise(node, data)"
style="color: #333"
>
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
v-if="removeButton && data.id != 80"
@click.stop="() => remove(node, data)"
style="color: #ff3b30"
>
</el-button>
</div>
</div>
</el-tree>
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
</div>
</div>
<div flex="cross:center main:center" style="width: 100%" v-if="isSaveBtn">
<el-button style="width: 40%" type="primary" @click="saveMenuUser"
>保存
</el-button>
</div>
<div flex="cross:center main:center" style="width:100%" v-if="isSaveBtn">
<el-button style="width:40%" type="primary" @click="saveMenuUser">保存</el-button>
</div>
</div>
</template>
@ -111,103 +30,45 @@ export default {
//
expandAll: {
type: Boolean,
default: true,
},
//
treeButton: {
type: Boolean,
default: false,
},
//
filterButtonShow: {
type: Boolean,
default: false,
default: true
},
//
isSaveBtn: {
type: Boolean,
default: false,
default: false
},
//
Allshow: {
type: Boolean,
default: false,
default: false
},
//
showCheckbox: {
type: Boolean,
default: false,
default: false
},
//
isCenter: {
type: Boolean,
default: true,
},
//
filterShow: {
type: Boolean,
default: false,
default: true
},
menuData: {
type: Array,
default: () => {
return [];
},
return []
}
},
setting: {
type: Boolean,
default: false,
},
treeLoading: {
type: Boolean,
default: false,
},
appendButton: {
type: Boolean,
default: true,
},
reviseButton: {
type: Boolean,
default: true,
},
removeButton: {
type: Boolean,
default: true,
},
nodeLabel: {
type: String,
default: "",
},
treeProps: {
type: Object,
default() {
return {
children: "children",
label: "label",
};
},
},
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val;
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
},
immediate: true,
},
filterText(val) {
this.$refs.elTree.filter(val);
default: false
},
},
data() {
return {
filterText: "",
theme: "",
theme: '',
powerDlog: false,
//
// menuData: [],
// ids
selectData: [],
//
@ -215,75 +76,52 @@ export default {
// label: 'menuName',
// children: 'id',
// },
// treeProps: {
// children: 'children',
// label: 'label'
// },
treeProps: {
children: 'children',
label: 'label'
},
// PC
checkedAllPc: false,
//
outing: false,
};
treeLoading: false,
}
},
created() { },
mounted() {
},
created() {},
mounted() {},
computed: {
defaultTheme() {
return this.$store.state.settings.theme;
return this.$store.state.settings.theme
},
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
},
immediate: true,
},
},
methods: {
//
clickFirst() {
document.querySelectorAll(".is-focusable")[0].click();
},
setCurrentKey(selectId) {
this.$nextTick(() => {
this.$refs.elTree.setCurrentKey(selectId);
});
},
dbTree(node, data) {
console.log(node, data, "node");
this.setCurrentKey(null);
},
//
append(node, data) {
this.$emit("append", data, node);
},
//
revise(node, data) {
this.$emit("revise", data, node);
},
//
remove(node, data) {
this.$emit("remove", data, node);
},
add() {
this.$emit("add");
},
filterNode(value, data, node) {
if (!value) return true;
let nodeData =
this.nodeLabel == ""
? data[this.treeProps.label]
: data[this.treeProps.label][this.nodeLabel];
return nodeData.indexOf(value) !== -1;
},
buttonL(el) {
el.active = !el.active;
this.$forceUpdate();
el.active = !el.active
this.$forceUpdate()
},
setData(id) {
this.selectData.push(id);
this.selectData.push(id)
},
saveMenuUser() {
let allKeys = this.getKey();
this.$emit("onSaveMenu", allKeys);
this.$emit('onSaveMenu', allKeys);
},
// key
getKey() {
return this.$refs.elTree.getCheckedKeys();
return this.$refs.elTree.getCheckedKeys()
},
//
initData() {
@ -295,15 +133,15 @@ export default {
},
//
handleClose() {
this.powerDlog = false;
this.initData();
this.powerDlog = false
this.initData()
},
//
changePcAll() {
this.checkedAllPc = !this.checkedAllPc;
let selectData = [];
if (this.checkedAllPc) {
selectData = this.cycleData(this.menuData);
selectData = this.cycleData(this.menuData)
}
this.selectData = selectData;
},
@ -319,42 +157,39 @@ export default {
function cycle(data) {
if (!data || data.length == 0) {
return false;
return false
} else {
for (var i = 0, len = data.length; i < len; i++) {
let item = data[i];
let item = data[i]
if (isSelect && item.selected == 1) {
newData.push(item.id);
newData.push(item.id)
}
if (!isSelect) {
newData.push(item.id);
newData.push(item.id)
}
cycle(item.id);
cycle(item.id)
}
}
}
cycle(outData);
return newData;
cycle(outData)
return newData
},
getData(childIds) {
let newData = [];
function cycle(data) {
data.forEach((el) => {
childIds.forEach((item) => {
data.forEach(el => {
childIds.forEach(item => {
if (el.id == item) {
newData.push(el);
newData.push(el)
}
});
})
if (el.children != null && el.children && el.children.length) {
cycle(el.children, childIds);
cycle(el.children, childIds)
}
});
})
}
cycle(this.menuData, childIds);
return newData;
cycle(this.menuData, childIds)
return newData
},
/**
* @description 节点选中状态发生变化时的回调
@ -364,54 +199,48 @@ export default {
* @param { Boolean } checked 当前节点是否选中
*/
checkChange(nodeDode, checked) {
let getHalfCheckedKeys = this.$refs.elTree
.getCheckedKeys()
.concat(this.$refs.elTree.getHalfCheckedKeys());
let getHalfCheckedKeys = this.$refs.elTree.getCheckedKeys().concat(this.$refs.elTree.getHalfCheckedKeys())
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
let childIds =
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
let checkdata = this.getData(childIds);
this.$emit("checkChange", childIds, checkdata);
return;
let childIds = getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData
let checkdata = this.getData(childIds)
this.$emit('checkChange', childIds, checkdata)
return
let id = nodeDode.id;
// let childIds = this.cycleData(id)
console.log(id)
//
childIds.forEach((item) => {
this.$refs.elTree.setChecked(item, checked);
});
childIds.forEach(item => {
this.$refs.elTree.setChecked(item, checked)
})
},
//
handleNodeClick(data, b, c) {
this.$emit("handleNodeClick", data, b, c);
handleNodeClick(data) {
this.$emit('handleNodeClick', data);
},
},
};
}
}
</script>
<style lang="scss">
// $activeColor:val(--activeColor, "#00aaff");
.nowrap {
/*让长段文本不换行*/
white-space: nowrap;
/*设置文本超出元素宽度部分隐藏*/
overflow-x: hidden;
/*设置文本超出部分用省略号显示*/
text-overflow: ellipsis;
}
.el-tree-node__content {
height: 32px !important;
}
.el-tree-node__label {
// font-size: 16px !important;
font-size: 14px !important;
margin-left: 4px;
}
.el-tree-node__content > label.el-checkbox {
.el-tree-node__content>label.el-checkbox {
transform: scale(1.3);
}
.el-tree-node__content > .el-tree-node__expand-icon {
.el-tree-node__content>.el-tree-node__expand-icon {
font-size: 18px;
}
@ -424,31 +253,9 @@ export default {
}
</style>
<style lang="scss" scoped>
.treeItem {
.treeItemBtn {
display: none;
margin-right: 10px;
}
&:hover {
.treeItemBtn {
display: block;
}
}
}
::v-deep .el-button--mini {
padding: 0 !important;
margin: 4px !important;
}
.el-tree-node.is-current > .el-tree-node__content .el-button--text {
}
.menu-i {
width: 100%;
// margin-bottom: 24px;
height: 100%;
&-f {
color: #52575a;
@ -459,10 +266,10 @@ export default {
&-t {
width: 100%;
height: 100%;
// height: 450px;
// border: 1px solid #d8d8d8;
// overflow-y: auto;
overflow-y: auto;
height: 100%;
}
}
@ -482,7 +289,7 @@ export default {
transition: all 0.3s ease-in-out;
&:hover {
color: #ecf5ff;
color: #4570fc;
}
}
</style>

View File

@ -9,7 +9,7 @@
<el-button type="primary" @click="handleReset" v-if="resetButton"> </el-button>
<el-button @click="handleClose"> </el-button>
<!-- <el-button v-if="orderCenter" @click="handleCancel">取消下单</el-button> -->
<el-button type="primary" v-if="submitButton" @click="handleConfirmClick"> </el-button>
<el-button type="primary" @click="handleConfirmClick"> </el-button>
</span>
</el-dialog>
</div>
@ -87,11 +87,6 @@ export default {
type: String,
default: '30%',
},
//
submitButton: {
type: Boolean,
default: true,
},
},
data() {
return {

View File

@ -1,232 +1,210 @@
<template>
<div flex>
<div class="treeBody" v-if="menuData.length > 0">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:menuData="menuData" @handleNodeClick="handleNodeClick"
>
</base-tree>
</div>
<div flex>
<div class="treeBody" v-if="menuData.length > 0">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:menuData="menuData" @handleNodeClick="handleNodeClick">
</base-tree>
</div>
<div style="overflow: hidden;padding: 10px;flex: 1;">
<div flex="cross:center" style="margin-bottom: 10px;" v-if="showSearch">
<el-input v-model="write" :placeholder="placeholder" style="width: 200px;margin-right: 10px;">
</el-input>
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
</div>
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading" :slotrow="true"
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell"
:tableHeight="tableHeightLog"
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange"
>
<!-- 单选 -->
<template v-slot:option="{row}">
<el-radio v-model="radio" :label="row.$index"></el-radio>
</template>
</base-table>
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList="[10 , 20, 80, 100, 150]"
v-if="pageShow"
></base-page>
</div>
</div>
<div style="overflow: hidden;padding: 10px;flex: 1;">
<!-- <div flex="cross:center" style="margin-bottom: 10px;">
<el-input v-model="write" :placeholder="placeholder" style="width: 200px;margin-right: 10px;">
</el-input>
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
</div> -->
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading" :slotrow="true"
:tableData="tableData" :tableColumn="tableColumn" :funData="[]" @onCellClick="getCell" :tableHeight="tableHeightLog"
@onSelectionChange="getSelect" :highlightCurrent="true" @radioChange="radioChange">
<!-- 单选 -->
<template v-slot:option="{row}">
<el-radio v-model="radio" :label="row.$index" ></el-radio>
</template>
</base-table>
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange" :pageSizesList='[10 , 20, 80, 100, 150]'></base-page>
</div>
</div>
</template>
<script>
import baseTable from '@/components/base/baseTable'
import baseLayout from '@/components/base/baseLayout'
import baseJurisdiction from '@/components/base/baseJurisdiction/index.vue'
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage'
import configData from './configData'
import baseTable from "@/components/base/baseTable";
import baseLayout from "@/components/base/baseLayout";
import baseJurisdiction from "@/components/base/baseJurisdiction/index.vue";
import baseTree from "@/components/base/BaseMenuTree/index.vue";
import basePage from '@/components/base/basePage'
import configData from "./configData";
export default {
name: "review",
components: {
baseLayout,
baseTable,
baseTree,
baseJurisdiction,
basePage
},
props: {
//
placeholder: {
type: String,
default: '请输入内容'
},
choiceDialog: {
type: Boolean,
default: false
},
tableColumn: {
type: Array,
default () {
return []
},
},
menuData: {
type: Array,
default () {
return []
},
},
tableData: {
type: Array,
default () {
return []
},
},
},
watch: {
choiceDialog: {
deep: true, // true
handler: function(newV, oldV) {
if(this.choiceDialog){
this.reset()
}
}
},
},
data() {
return {
radio: false,
optionData: '',
//
pageModel: {
total: 0,
page: 1,
limit: 10,
},
write: '',
nowBtns: [{
'routeUrl': 'button_jurisdiction',
'menuName': '权限设置'
}],
tabLoading: false,
selectTable: [], //
settingsDialog: false,
settingCenter: "left",
tableHeightLog: "calc(100vh - 416px)",
}
},
computed: {
//
// tableColumn() {
// return configData.tableColumnJson
// },
},
mounted() {
// this.$refs.customtable.clearRadioIndex()
},
methods: {
//
getQuery(model) {
console.log(model)
},
//
getCell(row, label) {
},
// type: 1 2
goInfo(type = 1, id) {
export default {
name: 'review',
components: {
baseLayout,
baseTable,
baseTree,
baseJurisdiction,
basePage
},
props: {
//
placeholder: {
type: String,
default: '请输入内容'
},
choiceDialog: {
type: Boolean,
default: false
},
tableColumn: {
type: Array,
default() {
return []
}
},
menuData: {
type: Array,
default() {
return []
}
},
tableData: {
type: Array,
default() {
return []
}
},
pageShow: {
type: Boolean,
default: true
},
showSearch: {
type: Boolean,
default: false
},
},
getElSelect(event, index, indexItem, param) {},
//
getFuncBtn(btnEven) {
console.log(btnEven)
if (btnEven.routeUrl == 'button_jurisdiction') {
this.settingsDialog = true
}
},
//
getSelect(selectTable) {
this.selectTable = selectTable
},
//
handleNodeClick(data) {
this.organizationForm = {
o_OrganCode: data.o_OrganCode,
ParentOrganName: data.label,
}
this.propvalue = data.label
this.optionData = ''
this.$refs.customtable.clearRadioIndex()
this.$emit('handleNodeClick', data)
},
//
pageChange() {
this.$emit('onQuery', this.mergeParam())
},
mergeParam(state) {
if (state) {
this.pageModel.page = 1;
}
let page = {
page: this.pageModel.page,
limit: this.pageModel.limit,
}
for (let i in this.model) {
if (!this.model[i]) {
this.model[i] = null;
}
}
let search = Object.assign({}, page, this.model)
return Object.assign({}, page, this.model)
},
// total
setPageTotal(total) {
this.$set(this.pageModel, 'total', total)
},
//
search() {
this.$emit('getTableList', this.write);
},
radioChange(val) {
this.optionData = val
this.radio = val.index
},
reset() {
this.write = ''
this.radio = false
}
},
mounted() {
// this.$refs.choice.reset()
},
},
watch: {
choiceDialog: {
deep: true, // true
handler: function(newV, oldV) {
if (this.choiceDialog) {
this.reset()
}
}
}
},
data() {
return {
radio: false,
optionData: '',
//
pageModel: {
total: 0,
page: 1,
limit: 10
},
write: '',
nowBtns: [{
'routeUrl': 'button_jurisdiction',
'menuName': '权限设置'
}],
tabLoading: false,
selectTable: [], //
settingsDialog: false,
settingCenter: 'left',
tableHeightLog: 'calc(100vh - 416px)'
}
},
computed: {
//
// tableColumn() {
// return configData.tableColumnJson
// },
},
mounted() {
// this.$refs.customtable.clearRadioIndex()
},
methods: {
//
getQuery(model) {
console.log(model)
},
//
getCell(row, label) {
},
// type: 1 2
goInfo(type = 1, id) {
},
getElSelect(event, index, indexItem, param) {
},
//
getFuncBtn(btnEven) {
console.log(btnEven)
if (btnEven.routeUrl == 'button_jurisdiction') {
this.settingsDialog = true
}
},
//
getSelect(selectTable) {
this.selectTable = selectTable
},
//
handleNodeClick(data) {
this.organizationForm = {
o_OrganCode: data.o_OrganCode,
ParentOrganName: data.label
}
this.propvalue = data.label
this.optionData = ''
this.$refs.customtable.clearRadioIndex()
this.$emit('handleNodeClick', data)
},
//
pageChange() {
let pageModel ={
page: this.pageModel.pageIndex ? this.pageModel.pageIndex : 1,
limit: this.pageModel.pageSize? this.pageModel.pageSize : 10
}
this.$emit('onQuery', this.mergeParam(), pageModel)
},
mergeParam(state) {
if (state) {
this.pageModel.page = 1
}
let page = {
page: this.pageModel.page,
limit: this.pageModel.limit
}
for (let i in this.model) {
if (!this.model[i]) {
this.model[i] = null
}
}
let search = Object.assign({}, page, this.model)
return Object.assign({}, page, this.model)
},
// total
setPageTotal(total) {
this.$set(this.pageModel, 'total', total)
},
//
search() {
this.$emit('getTableList', this.write)
},
radioChange(val) {
this.optionData = val
this.radio = val.index
},
reset() {
this.write = ''
this.radio = false
}
},
mounted() {
// this.$refs.choice.reset()
}
}
}
</script>
<style scoped>
.treeBody {
background-color: #f2f3f4;
width: 25%;
margin-top: 10px;
height: calc(100vh - 360px);
overflow-y: auto;
}
.treeBody {
background-color: #f2f3f4;
width: 25%;
margin-top: 10px;
height: calc(100vh - 360px);
overflow-y: auto;
}
/* >>>.el-table__body-wrapper {
height: 300px !important;
} */
/* >>>.el-table__body-wrapper {
height: 300px !important;
} */
.app-container {
height: calc(100% - 52px);
}
.app-container {
height: calc(100% - 52px);
}
</style>

View File

@ -72,16 +72,6 @@
<!-- 搜索 -->
<div v-show="queryShow" style="padding: 16px;" flex="cross:center" ref="serchRefs" class="searchContainer">
<div v-for="(row, indexRow) in searchList" class="searchBox" :key="indexRow">
<el-cascader v-model="ruleForm[row.prop]"
:options="row.options"
:show-all-levels="false"
@change="(value)=>handleSelectChange(row,value)"
:props="{emitPath:false}"
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag==='elCascader'"
clearable>
</el-cascader>
<el-input v-model="ruleForm[row.prop]" clearable :type="row.type ? row.type : 'text'" style="width: 100%"
:placeholder="!row.placeholder ? '请输入' : row.placeholder" v-if="row.tag === 'elInput'" min="1">
</el-input>
@ -111,10 +101,8 @@
<i class="el-icon-circle-close" v-if="!row.disabled && ruleForm[row.prop]" @click="elDialogClear(row)"
style="margin-left: 10px"></i>
</div>
<el-select v-model="ruleForm[row.prop]" filterable style="width: 100%" :multiple="row.multiple?row.multiple:false"
:collapse-tags="true"
@change="selectChange($event, indexRow, indexRow, row)"
:clearable="row.clearable ? row.clearable : true"
<el-select v-model="ruleForm[row.prop]" filterable style="width: 100%"
@change="selectChange($event, indexRow, indexRow, row)" :clearable="row.clearable ? row.clearable : true"
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag === 'elSelect'">
<el-option v-for="(el, elIndex) in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
@ -366,11 +354,6 @@ export default {
// }
},
methods: {
handleSelectChange(row,value) {
this.ruleForm[row.prop]=value
console.log("Selected value:"+value);
},
watchSize() {
const _this = this;
var erd = elementResizeDetectorMaker();

View File

@ -7,7 +7,7 @@
<el-form validate-on-rule-change :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm"
label-width="100px"
>
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" :style="{marginBottom: isSence ?'0': '17px'}">
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" style="margin-bottom: 17px;">
<el-col v-for="(row, indexRow) in item.elCol" :span="row.span ? row.span : spanNumber" :key="indexRow">
<el-form-item :prop="row.prop" :style="`display: flex;margin-bottom: ${marginBottom}px;`"
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')"
@ -16,7 +16,7 @@
<div class="single label" v-if="row.label" slot="label"
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex
>
<span class="label" :style="{color: isSence ? '#999':'#333',fontSize: isSence ? '14px':'13px'}">{{ row.label }}</span>
<span class="label">{{ row.label }}</span>
</div>
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable
auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin"
@ -89,25 +89,6 @@
<div v-if="row.tag === 'elLook'">
{{ ruleForm[row.prop] }}
</div>
<el-cascader class="w-100" v-if="row.tag === 'elCascader'"
v-model="ruleForm[row.prop]" :options="row.options"
:disabled="row.disabled ? row.disabled : false"
:show-all-levels="row.showAllLevels == false ? false : true"
:clearable="row.clearable ? row.clearable : true" @change="
cascaderChange(ruleForm[row.prop], row.options, row)
" :placeholder="!row.placeholder ? '请选择' : row.placeholder" :props="
row.props
? row.props
: { expandTrigger: 'hover', checkStrictly: true }
" popper-class="search_choose" ref="searchUnit" filterable>
<div slot-scope="{ data }" @click="clickNode" style="z-index: 99999"
v-if="row.props && row.props.label">
{{ data[row.props.label] }}
</div>
<div slot-scope="{ data }" @click="clickNode" style="z-index: 99999" v-else>
{{ data.label }}
</div>
</el-cascader>
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
@change="selectChange($event, index, indexRow, row.options,row)"
:disabled="row.disabled?row.disabled:false"
@ -123,10 +104,7 @@
</el-select>
<el-select class="w-100" v-model="ruleForm[row.prop]" multiple :disabled="row.disabled?row.disabled:false"
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
@change="selectChange($event, index, indexRow, row.options, row)"
v-if="row.tag === 'elMultiple'"
filterable
:multiple-limit="row.limit ? row.limit :0"
>
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
@ -204,10 +182,6 @@ export default {
type: Boolean,
default: true
},
isSence: {
type: Boolean,
default: false
},
formdata: {
type: Object
},
@ -242,51 +216,6 @@ export default {
},
computed: {},
methods: {
cascaderChange(val, options, row) {
console.log(row,'row')
let valLabel = "";
let obj = {}
function getLabelPath(el, data, path = []) {
for (let i = 0; i < data.length; i++) {
const item = data[i];
path.push(item[row.props.label]);
if (el === item[row.props.value]) {
obj = item
return [...path]; //
}
if (item[row.props.children] && item[row.props.children].length > 0) {
const result = getLabelPath(el, item[row.props.children], path);
if (result) return result;
}
path.pop(); // 退
}
return null;
}
// 🧠 valval
const lastValue = Array.isArray(val) ? val[val.length - 1] : val;
const labelPath = getLabelPath(lastValue, options);
valLabel = labelPath ? labelPath.join('.') : '';
this.$emit("cascaderChange", val, options, row, valLabel,obj);
},
//
clickNode($event) {
console.log(123, "?");
console.log(
$event.target.parentElement.parentElement.firstElementChild,
"$event.target.parentElement.parentElement.firstElementChild"
);
$event.target.parentElement.parentElement.firstElementChild.click();
},
addHandle(){
},
changeRemind() {
this.$emit('changeRemind', this.ruleForm)
},
@ -469,7 +398,7 @@ let obj = {}
obj = item
}
})
this.$emit('onSelect', val, index, indexRow, obj, options, this.ruleForm, row)
this.$emit('onSelect', val, index, indexRow, obj)
if (row.changeRemind) {
this.$emit('changeRemind', this.ruleForm)
}
@ -539,8 +468,6 @@ let obj = {}
}
</script>
<style>
.el-form-item__label {
/* width: 25%; */
line-height: 1.2;
@ -558,7 +485,6 @@ let obj = {}
}
</style>
<style scoped lang="scss">
::v-deep textarea.el-textarea__inner {
min-height: 100px !important;
}
@ -607,7 +533,7 @@ let obj = {}
align-items: center;
justify-content: space-between;
border: 1px solid #DCDFE6;
border-radius: 4px;
border-radius: 8px;
padding: 0 15px;
cursor: pointer;
@ -628,10 +554,6 @@ let obj = {}
}
::v-deep .el-form-item__content {
line-height: 36px !important;
}
.ruleFormClass {
::v-deep .el-input__inner {
border-color: #E6A23C !important
@ -658,4 +580,3 @@ let obj = {}
}
}
</style>

View File

@ -35,14 +35,12 @@ export default {
sizeChange(val) {
let pageModel = this.pageModel
pageModel.pageSize = val
pageModel.limit = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
currentChange(val) {
let pageModel = this.pageModel
pageModel.pageIndex = val
pageModel.page = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
}

View File

@ -15,10 +15,9 @@
>
<div class="rightDialog">
<div flex="cross:center main:justify" class="rightConcat">
<span style="font-size: 16px">{{ title }} <slot name="operateTitle"></slot></span>
<span style="font-size: 16px">{{ title }}</span>
<span v-if="footerShow" flex="main:right">
<el-button @click="handleClose" v-if="closeShow"> </el-button>
<slot name="addButton"></slot>
<el-button
type="primary"
@click="handleConfirmClick"

View File

@ -3,7 +3,7 @@
* @author: Zhangpengcheng
* @date: 2022-08-30
* tabLoading 加载 headerStyle表头格式 tableData数据 border纵向边框 @current-change单选触发 summary-method合计 @cell-click某个单元格点击触发事件 @sort-change触发后台排序
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
* :style="'height:'+ tableHeight + '!important'"
-->
<template>
@ -110,10 +110,6 @@
color: item.color ? item.color : '#333',
cursor: item.isClick ? 'pointer' : 'default',
}"
:title="!item.stateOption
? scope.row[item.prop]
: item.stateOption[scope.row[item.prop]]"
class='multipleLines_one'
>{{
!item.stateOption
? scope.row[item.prop]
@ -183,9 +179,6 @@
</span>
</template>
<script>
import {
v4 as uuidv4
} from 'uuid'
import Sortable from "sortablejs";
export default {
props: {
@ -232,10 +225,6 @@ export default {
type: String,
default: "small",
},
currentType: {
type: String,
default: "",
},
//
bottomPlus: {
type: Boolean,
@ -338,23 +327,7 @@ export default {
watch: {},
methods: {
select(selection, row) {
//
if(this.currentType == "apiCode"){
let flag = selection.some(item => {
if (item.apiCode === row.apiCode) {
return true
}
})
this.$emit("select", selection, row, flag);
}else{
let flag = selection.some(item => {
if (item.id === row.id) {
return true
}
})
this.$emit("select", selection, row, flag);
}
this.$emit("select", selection, row);
},
selectAll(selection) {
this.$emit("selectAll", selection);
@ -406,7 +379,7 @@ export default {
},
// id,row-keykey
getRowKey(row) {
return row.id ? row.id : uuidv4()
return row.id;
},
//
handleSelectionChange(selectTable) {
@ -575,15 +548,6 @@ export default {
::v-deep .el-table--border {
border: none;
}
.multipleLines_one {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
display: -webkit-box !important;
-webkit-box-orient: vertical;
word-break: break-all;
white-space: pre-line;
}
// ::v-deep .el-table .sort-caret.ascending {
// top: 1px
// }

View File

@ -1,357 +1,101 @@
<!--
* @name: 弹窗配置
* @author: zhangpengcheng
* @date: 2022-08-25
-->
<template>
<!-- 权限设置弹框 -->
<!-- :style="{'margin':isCenter?'auto':''}"> -->
<div v-loading="treeLoading" flex style="margin: auto; height: 100%">
<div class="menu-i" flex="cross:center main:center">
<div class="menu-i-t" flex="cross:top main:justify">
<el-tree
:data="menuData"
:check-strictly="true"
:current-node-key="currentNodeKey"
:default-checked-keys="selectData"
@node-click="handleNodeClick"
:expand-on-click-node="false"
:default-expand-all="expandAll"
:key="keyWord ? keyWord :new Date().getTime()"
:props="treeProps"
style="width: 100%; background-color: white; height: 100%"
@check-change="checkChange"
:default-expanded-keys="defaultExpandedKeys"
node-key="pkAccsubj"
ref="elTree"
:show-checkbox="showCheckbox"
>
</el-tree>
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
</div>
</div>
<div flex="cross:center main:center" style="width: 100%" v-if="isSaveBtn">
<el-button style="width: 40%" type="primary" @click="saveMenuUser"
>保存
</el-button
>
</div>
</div>
<div>
<div v-for="(item, index) in parentTreeData" :key="index" class="classifyButtonList">
<div flex="cross:center" flex-wrap style="height: 100%;">
<div class="title">
<!-- <i class="el-icon-caret-bottom" @click="showHidden(item, index)"></i> -->
<i v-if="item.children" :class="item.isShow?'el-icon-caret-top':'el-icon-caret-bottom'"@click="showHidden(item, index)"></i>
<!-- <el-checkbox v-model="item.checked">{{item.label}}</el-checkbox> -->
{{item.label}}
</div>
<div flex flex-wrap="cross:center" style="width: 79%;">
<p class="recordText" v-for="(el,index) in item.buttonList">{{el.NameCN}}</p>
</div>
</div>
<menu-tree v-if="item.isShow && item.children" :parent-tree-data="item.children"></menu-tree>
</div>
</div>
</template>
<script>
// import { queryMenuList, menuListSave } from '@/api/apis/auth'
export default {
props: {
//
expandAll: {
type: Boolean,
default: true,
},
//
isSaveBtn: {
type: Boolean,
default: false,
},
//
Allshow: {
type: Boolean,
default: false,
},
//
showCheckbox: {
type: Boolean,
default: false,
},
//
isCenter: {
type: Boolean,
default: true,
},
currentNodeKey: {
type: [String, Number],
default: '',
},
keyWord: {
type: [String, Number],
default: '',
},
menuData: {
type: Array,
default: () => {
return [];
},
},
defaultExpandedKeys: {
type: Array,
default: () => {
return [];
},
},
defaultCheckedKeys: {
type: Array,
default: () => {
return [];
},
},
setting: {
type: Boolean,
default: false,
},
treeProps: {
type: Object,
default: () => {
return {
children: "children",
label: "label",
value:'id',
};
},
},
},
data() {
return {
theme: "",
powerDlog: false,
//
// menuData: [],
// ids
selectData: [],
//
// treeProps: {
// label: 'menuName',
// children: 'id',
// },
// PC
checkedAllPc: false,
//
outing: false,
treeLoading: false,
};
},
created() {
},
mounted() {
},
computed: {
defaultTheme() {
return this.$store.state.settings.theme;
},
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val;
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
},
immediate: true,
},
},
methods: {
//
clickFirst() {
document.querySelectorAll(".is-focusable")[0].click();
},
buttonL(el) {
el.active = !el.active;
this.$forceUpdate();
},
setData(id) {
this.selectData.push(id);
},
saveMenuUser() {
let allKeys = this.getKey();
this.$emit("onSaveMenu", allKeys);
},
// key
getKey() {
return this.$refs.elTree.getCheckedKeys();
},
clearKey() {
// this.nodeKey = new Date().getTime(); // node-key
this.$refs.elTree.store.nodesMap = {}; // nodesMap
this.$forceUpdate(); // 使
// const nodes = this.$refs.tree.getNodes();
// nodes.forEach(node => {
// node.checked = false;
// });
},
//
initData() {
//
// this.menuData = [];
// ids
this.selectData = [];
},
//
handleClose() {
this.powerDlog = false;
this.initData();
},
//
changePcAll() {
this.checkedAllPc = !this.checkedAllPc;
let selectData = [];
if (this.checkedAllPc) {
selectData = this.cycleData(this.menuData);
}
this.selectData = selectData;
},
/**
* @description 递归获取菜单id树状 多叉树结构
* @author duanyipeng
* @createDate 2020/7/31 20:54
* @param {Array} outData 需要递归的数组
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
*/
cycleData(outData, isSelect) {
let newData = [];
function cycle(data) {
if (!data || data.length == 0) {
return false;
} else {
for (var i = 0, len = data.length; i < len; i++) {
let item = data[i];
if (isSelect && item.selected == 1) {
newData.push(item.id);
}
if (!isSelect) {
newData.push(item.id);
}
cycle(item.id);
}
}
}
cycle(outData);
return newData;
},
getData(childIds) {
let newData = [];
function cycle(data) {
data.forEach((el) => {
childIds.forEach((item) => {
if (el.id == item) {
newData.push(el);
}
});
if (el.children != null && el.children && el.children.length) {
cycle(el.children, childIds);
}
});
}
cycle(this.menuData, childIds);
return newData;
},
/**
* @description 节点选中状态发生变化时的回调
* @author duanyipeng
* @createDate 2020/7/31 20:53
* @param { Object } nodeDode 当前节点对象
* @param { Boolean } checked 当前节点是否选中
*/
checkChange(nodeDode, checked) {
let getHalfCheckedKeys = this.$refs.elTree
.getCheckedKeys()
.concat(this.$refs.elTree.getHalfCheckedKeys());
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
let nodeList = this.$refs.elTree.getCheckedNodes();
let childIds =
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
let checkdata = this.getData(childIds);
this.$emit("checkChange", childIds, checkdata, nodeList);
return;
let id = nodeDode.id;
// let childIds = this.cycleData(id)
console.log(id);
//
childIds.forEach((item) => {
this.$refs.elTree.setChecked(item, checked);
});
},
//
handleNodeClick(data) {
this.$emit("handleNodeClick", data);
},
},
};
export default {
name: "menuTree",
props: {
parentTreeData: {
type: Array,
default: () => {
return []
}
},
},
methods: {
//
showHidden(item, index) {
// this.parentTreeData.forEach(value => {
// // parentTreeData[i]showisShowmenuList[i]false
// if (value.isShow !== this.parentTreeData[index].isShow) {
// value.isShow = false;
// }
// });
item.isShow = !item.isShow;
this.$forceUpdate()
},
setCheck(menuIDs){
this.setButtonName(this.parentTreeData,menuIDs)
// this.$forceUpdate()
},
setButtonName(menuData,data) {
menuData.forEach((el, index) => {
data.forEach(item=>{
if (el.id == item) {
el.checked = true
}
})
if (el.children != null && el.children && el.children.length) {
this.setButtonName(el.children,data)
}
})
},
}
}
</script>
<style lang="scss">
// $activeColor:val(--activeColor, "#00aaff");
$activeColor: var(--bg-color, "#00aaff");
.el-tree-node__content {
height: 32px !important;
}
.el-tree-node__label {
font-size: 14px !important;
margin-left: 4px;
}
.el-tree-node__content > label.el-checkbox {
transform: scale(1.3);
}
.el-tree-node__content > .el-tree-node__expand-icon {
font-size: 18px;
}
.el-checkbox__label {
font-size: 16px;
}
.checkBox .el-checkbox__inner {
transform: scale(1.3);
}
.el-icon-star-on {
/* color: #00aa00; */
color: $activeColor;
}
.recordText {
border: 1px solid #fff;
padding: 3px 10px;
text-align: center;
font-size: 14px;
cursor: pointer;
background: #f2f2f2;
color: #4e4e4e;
margin:5px;
border-radius: 5px;
}
.recordText.active {
background-color: $activeColor;
color: white;
}
</style>
<style lang="scss" scoped>
.menu-i {
width: 100%;
// margin-bottom: 24px;
<style scoped lang="scss">
.tree-div {
&-f {
color: #333;
font-size: 18px;
text-align: center;
margin-bottom: 12px;
}
}
.classifyButtonList{
// margin-bottom: 10px;
padding: 0 0 0 10px;
// cursor: pointer;
line-height: 25px;
.title{
// text-align: right;
// width: 20%;
}
&-t {
width: 100%;
// height: 450px;
// border: 1px solid #d8d8d8;
overflow-y: auto;
height: 100%;
}
}
.checkBox {
margin-top: 6px;
margin-right: 12px;
}
.checkText {
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
color: #333;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease-in-out;
&:hover {
color: #4570fc;
}
}
</style>
}
</style>

View File

@ -44,7 +44,7 @@ export default {
if (!this.showTagsView) {
top = "5px";
} else {
top = "63px";
top = "50px";
}
return top;
},
@ -67,7 +67,6 @@ export default {
margin-left: 136px;
}
.app-main {
border-radius: 8px;
/* 50= navbar 50 */
// padding-top: 104px;
// min-height: calc(100vh - 50px);
@ -76,14 +75,15 @@ export default {
// width: calc(100% - 20px);
// margin:0 10px;
position: relative;
border-radius: 4px;
top: 80px;
margin-left: 10px;
padding: 0 10px;
}
.h-10{
height: calc(100vh - 10px);
}
.h-65{
height: calc(100vh - 73px);
height: calc(100vh - 60px);
}
.fixed-header + .app-main {

View File

@ -11,53 +11,14 @@
</template>
<script>
import InnerLink from "../InnerLink/index";
import { getCompanyId, getMenuNode } from "@/utils/auth";
import InnerLink from "../InnerLink/index"
export default {
components: { InnerLink },
data(){
return{
iframeViews:[]
computed: {
iframeViews() {
return this.$store.state.tagsView.iframeViews
}
},
watch: {
"$store.getters.currentMenuNode": {
deep: true,
immediate: true,
handler(newVal, old) {
this.iframeViews = this.getVisitedViews();
},
},
},
methods:{
getVisitedViews() {
let url = getMenuNode();
let empty = [];
let data = this.$store.state.tagsView.iframeViews;
if (url) {
if (url.includes("Workbench")) {
return data[0];
} else if (url.includes("MasterDataCenter")) {
return data[1];
} else if (url.includes("IntegrationTaskCenter")) {
return data[2];
} else if (url.includes("businessCenter")) {
return data[3];
} else if (url.includes("ApplicationCenter")) {
return data[4];
}else if (url.includes("businessMatter")) {
return data[5];
}else if (url.includes("accountantMatter")) {
return data[6];
}
else {
return empty;
}
} else {
return empty;
}
},
}
};
}
</script>

View File

@ -502,7 +502,6 @@ export default {
.avatar-container {
margin-right: 15px;
background-color: #fff;
.avatar-wrapper {
// margin-top: 5px;

View File

@ -57,14 +57,7 @@
<script>
import { mapGetters } from "vuex";
import Cookies from "js-cookie";
import {
getInfo,
setInfo,
getCompanyId,
setCompanyId,
getMenuNode,
setMenuNode,
} from "@/utils/auth";
import { getInfo, setInfo, getCompanyId, setCompanyId } from "@/utils/auth";
import { PersonDetail } from "@/api/apis/personnelSettings";
import logoImg from "@/assets/logo/tranLogo.png";
import personImg from "@/assets/images/person.png";
@ -90,40 +83,13 @@ export default {
},
},
watch: {
"$store.getters.currentMenuNode": {
deep: true,
immediate: true,
handler(newVal, old) {
let url = getMenuNode();
if (url) {
this.currentPath = url;
} else {
this.currentPath = "/index";
}
},
},
//
$route: {
deep: true,
immediate: true,
handler(to, old) {
let route = { ...to };
if (this.currentPath == to.path) {
if (
this.currentPath.includes("Workbench") ||
this.currentPath.includes("MasterDataCenter") ||
this.currentPath.includes("IntegrationTaskCenter") ||
this.currentPath.includes("businessCenter") ||
this.currentPath.includes("ApplicationCenter")||
this.currentPath.includes("businessMatter") ||
this.currentPath.includes("accountantMatter")
) {
route.meta.affix = true;
this.$store.dispatch("tagsView/addVisitedView", route);
}
}
},
$route(to, form) {
let route = { ...to };
if (this.currentPath == to.path) {
route.meta.affix = true;
this.$store.dispatch("tagsView/updateVisitedView", route);
}
},
},
data() {
@ -142,97 +108,27 @@ export default {
icon: "icon-shouye",
show: true,
},
{
title: "消息",
path: "/message",
icon: "el-icon-chat-dot-square",
show: true,
},
{
title: "工作台",
path: "/Workbench",
icon: "icon-gongzuotai",
show: true,
},
],
permissionsMenu: [
{
title: "主数据中心",
path: "/MasterDataCenter",
icon: "el-icon-coin",
show: false,
},
{
title: "应用管理",
path: "/ApplicationCenter",
icon: "el-icon-menu",
show: false,
},
{
title: "集成任务",
path: "/IntegrationTaskCenter",
icon: "el-icon-data-line",
show: false,
},
{
title: "业务中心",
path: "/businessCenter",
icon: "el-icon-postcard",
show: false,
},
{
title: "会计事项平台",
path: "/businessMatter",
icon: "el-icon-postcard",
show: false,
},
{
title: "财资事项平台",
path: "/accountantMatter",
icon: "el-icon-postcard",
show: false,
},
],
};
},
created() {
let url = getMenuNode();
if (url) {
if (
url.includes("Workbench") ||
url.includes("MasterDataCenter") ||
url.includes("IntegrationTaskCenter") ||
url.includes("businessCenter") ||
url.includes("ApplicationCenter") ||
url.includes("businessMatter") ||
url.includes("accountantMatter")
) {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: true,
});
} else {
//
this.$router
.push({
path: "/index",
})
.then(() => {
this.currentPath = this.$route.path;
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: false,
});
}
// this.$router.push({
// path: url,
// });
} else {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: false,
});
setMenuNode("/index");
this.$store.commit("SET_CURRENT_MENU_NODE", "/index");
// this.$router.push({
// path: "/index",
// });
}
},
mounted() {
// this.GetMessageCount();
@ -261,49 +157,30 @@ export default {
}
return type;
},
//
// 线
DetermineMenuPermission() {
this.menuData = [];
let routeList = localStorage.getItem("routeList")
? localStorage.getItem("routeList")
: null;
this.permissionsMenu.forEach((aItem) => {
if (routeList != null && routeList.includes(aItem.title)) {
aItem.show = true;
}
});
this.menuData = [...this.fixedMenu, ...this.permissionsMenu];
this.menuData = [...this.fixedMenu];
},
//
jumpRoute(item) {
if (item.path == this.currentPath) {
return;
}
if (
item.path.includes("Workbench") ||
item.path.includes("MasterDataCenter") ||
item.path.includes("IntegrationTaskCenter") ||
item.path.includes("businessCenter") ||
item.path.includes("ApplicationCenter") ||
item.path.includes("businessMatter") ||
item.path.includes("accountantMatter")
) {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: true,
this.currentPath = item.path;
this.$tab.closeAllPage();
this.$store.dispatch("tagsView/clearVisted");
this.$router
.push({
path: item.path,
})
.then(() => {
//
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: false,
});
});
} else {
//
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: false,
});
}
setMenuNode(item.path);
this.$store.commit("SET_CURRENT_MENU_NODE", item.path);
this.$router.push({
path: item.path,
});
},
//
async getInfoDetail(id) {
@ -330,8 +207,7 @@ export default {
this.$store.dispatch("tagsView/delAllViews");
this.$store.dispatch("LogOut").then(() => {
Cookies.remove("automaticLogin");
setMenuNode("/index");
this.$store.commit("SET_CURRENT_MENU_NODE", "/index");
this.$router.replace({ path: "/login" });
});
})
@ -502,7 +378,7 @@ export default {
width: 90%;
padding-top: 10px;
border-top: 1px solid #eaeaea;
background: #fff;
background: #f4f5f7;
display: flex;
flex-direction: column;
align-items: center;
@ -530,7 +406,8 @@ export default {
background: #1478f6;
color: #ffffff;
text-align: center;
}
}
}
</style>
</style>

View File

@ -447,23 +447,24 @@ export default {
}
</script>
<style lang="scss" scoped>
<style lang="scss">
$activeColor: var(--bg-color, "#00aaff");
.el-tree-node__content:hover,
.el-upload-list__item:hover {
color: #333;
background-color: #eef5fe !important;
// color: white;
// background-color: $activeColor !important;
background-color: #ecf5ff !important;
}
.el-tree-node:focus > .el-tree-node__content {
color: #333;
background-color: #eef5fe !important;
color: white;
background-color: $activeColor !important;
}
.el-tree-node.is-current > .el-tree-node__content {
color: #333;
background-color: #eef5fe !important;
color: white;
background-color: $activeColor !important;
}
.navbarSearch {

View File

@ -1,5 +1,9 @@
<template>
<div id="tags-view-container" class="tags-view-container">
<div
id="tags-view-container"
class="tags-view-container"
style="top:5px;margin:0 10px;"
>
<scroll-pane
ref="scrollPane"
class="tags-view-wrapper"
@ -21,7 +25,7 @@
class="el-icon-close"
@click.prevent.stop="closeSelectedTag(tag)"
/>
<span v-else class="el-icon-close-else"/>
<span v-else class="el-icon-close-else" />
<span>{{ tag.meta.title ? tag.meta.title : tag.title }}</span>
</router-link>
</scroll-pane>
@ -53,14 +57,14 @@
</template>
<script>
import ScrollPane from './ScrollPane'
import path from 'path'
import { getCompanyId, getMenuNode } from '@/utils/auth'
import { ChangeCompany } from '@/api/apis/auth'
import ScrollPane from "./ScrollPane";
import path from "path";
import { getCompanyId } from "@/utils/auth";
import { ChangeCompany } from "@/api/apis/auth";
export default {
components: {
ScrollPane
ScrollPane,
},
data() {
return {
@ -69,111 +73,79 @@ export default {
left: 0,
selectedTag: {},
affixTags: [],
visitedViews: []
}
};
},
computed: {
visitedViews() {
return this.$store.state.tagsView.visitedViews;
},
routes() {
return this.$store.state.permission.routes
return this.$store.state.permission.routes;
},
theme() {
return this.$store.state.settings.theme
return this.$store.state.settings.theme;
},
companyID() {
return this.$store.state.user.companyID
}
return this.$store.state.user.companyID;
},
},
watch: {
'$store.getters.currentMenuNode': {
deep: true,
immediate: true,
handler(newVal, old) {
this.visitedViews = this.getVisitedViews()
}
},
$route() {
this.addTags()
this.moveToCurrentTag()
this.addTags();
this.moveToCurrentTag();
},
visible(value) {
if (value) {
document.body.addEventListener('click', this.closeMenu)
document.body.addEventListener("click", this.closeMenu);
} else {
document.body.removeEventListener('click', this.closeMenu)
document.body.removeEventListener("click", this.closeMenu);
}
},
companyID: {
deep: true, // true
handler: function(newV, oldV) {
handler: function (newV, oldV) {
if (newV) {
this.ChangeCompany(newV)
this.$vmNews('切换公司成功', 'success')
this.closeAllTags(this.closeAllTags)
this.ChangeCompany(newV);
this.$vmNews("切换公司成功", "success");
this.closeAllTags(this.closeAllTags);
}
}
}
},
},
},
mounted() {
// this.initTags();
// this.addTags();
// if (!this.newVersionSystem) {
// this.initTags();
// }
this.addTags();
},
methods: {
getVisitedViews() {
let url = getMenuNode()
let currentData = []
let data = this.$store.state.tagsView.visitedViews || []
if (url) {
if (url.includes('Workbench')) {
currentData = data[0]
} else if (url.includes('MasterDataCenter')) {
currentData = data[1]
} else if (url.includes('IntegrationTaskCenter')) {
currentData = data[2]
} else if (url.includes('businessCenter')) {
currentData = data[3]
} else if (url.includes('ApplicationCenter')) {
currentData = data[4]
} else if (url.includes('businessMatter')) {
currentData = data[5]
} else if (url.includes('accountantMatter')) {
currentData = data[6]
}
else {
currentData = []
}
} else {
currentData = []
}
return currentData
},
async ChangeCompany(CompanyID) {
let params = {
CompanyID: CompanyID
}
let res = await ChangeCompany(params)
CompanyID: CompanyID,
};
let res = await ChangeCompany(params);
},
isActive(route) {
return route.path === this.$route.path
return route.path === this.$route.path;
},
activeStyle(tag) {
if (!this.isActive(tag)) return {}
if (!this.isActive(tag)) return {};
return {
'background-color': this.theme,
'border-color': this.theme
}
"background-color": this.theme,
"border-color": this.theme,
};
},
isAffix(tag) {
return tag.meta && tag.meta.affix
return tag.meta && tag.meta.affix;
},
isFirstView() {
try {
return (
this.selectedTag.fullPath === this.visitedViews[1].fullPath ||
this.selectedTag.fullPath === '/index'
)
this.selectedTag.fullPath === "/index"
);
} catch (err) {
return false
return false;
}
},
isLastView() {
@ -181,255 +153,154 @@ export default {
return (
this.selectedTag.fullPath ===
this.visitedViews[this.visitedViews.length - 1].fullPath
)
);
} catch (err) {
return false
return false;
}
},
filterAffixTags(routes, basePath = '/') {
let tags = []
filterAffixTags(routes, basePath = "/") {
let tags = [];
routes.forEach((route) => {
if (route.meta && route.meta.affix) {
const tagPath = path.resolve(basePath, route.path)
const tagPath = path.resolve(basePath, route.path);
tags.push({
fullPath: tagPath,
path: tagPath,
name: route.name,
id: route.id ? route.id : 0,
meta: {
...route.meta
}
})
...route.meta,
},
});
}
if (route.children) {
const tempTags = this.filterAffixTags(route.children, route.path)
const tempTags = this.filterAffixTags(route.children, route.path);
if (tempTags.length >= 1) {
tags = [...tags, ...tempTags]
tags = [...tags, ...tempTags];
}
}
})
return tags
});
return tags;
},
initTags() {
const affixTags = (this.affixTags = this.filterAffixTags(this.routes))
console.log(affixTags, 'affixTags')
const affixTags = (this.affixTags = this.filterAffixTags(this.routes));
for (const tag of affixTags) {
// Must have tag name
if (tag.name) {
this.$store.dispatch('tagsView/addVisitedView', tag)
this.$store.dispatch("tagsView/addVisitedView", tag);
}
}
},
addTags() {
const name = this.$route.meta.title
const name = this.$route.meta.title;
// this.$route.meta.noCache = false
if (name) {
this.$store.dispatch('tagsView/addView', this.$route)
if (this.$route.meta && this.$route.meta.link) {
this.$store.dispatch('tagsView/addIframeView', this.$route)
this.$store.dispatch("tagsView/addView", this.$route);
if (this.$route.meta.link) {
this.$store.dispatch("tagsView/addIframeView", this.$route);
}
}
return false
return false;
},
moveToCurrentTag() {
const tags = this.$refs.tag
const tags = this.$refs.tag;
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag)
this.$refs.scrollPane.moveToTarget(tag);
// when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('tagsView/updateVisitedView', this.$route)
this.$store.dispatch("tagsView/updateVisitedView", this.$route);
}
break
break;
}
}
})
});
},
refreshSelectedTag(view) {
this.$tab.refreshPage(view)
if (this.$route.meta && this.$route.meta.link) {
this.$store.dispatch('tagsView/delIframeView', this.$route)
this.$tab.refreshPage(view);
if (this.$route.meta.link) {
this.$store.dispatch("tagsView/delIframeView", this.$route);
}
},
closeSelectedTag(view) {
this.$tab.closePage(view).then(({ visitedViews }) => {
let url = getMenuNode()
let currentData = []
let data = visitedViews
if (url) {
if (url.includes('Workbench')) {
currentData = data[0]
} else if (url.includes('MasterDataCenter')) {
currentData = data[1]
} else if (url.includes('IntegrationTaskCenter')) {
currentData = data[2]
} else if (url.includes('businessCenter')) {
currentData = data[3]
} else if (url.includes('ApplicationCenter')) {
currentData = data[4]
} else if (url.includes('businessMatter')) {
currentData = data[5]
}else if (url.includes('accountantMatter')) {
currentData = data[6]
}
}
if (this.isActive(view)) {
this.toLastView(currentData, view)
this.toLastView(visitedViews, view);
}
})
});
},
closeRightTags() {
this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {
let url = getMenuNode()
let INDEX = null
if (url) {
if (url.includes('Workbench')) {
INDEX = 0
} else if (url.includes('MasterDataCenter')) {
INDEX = 1
} else if (url.includes('IntegrationTaskCenter')) {
INDEX = 2
} else if (url.includes('businessCenter')) {
INDEX = 3
} else if (url.includes('ApplicationCenter')) {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
} else if (url.includes('accountantMatter')) {
INDEX = 6
}
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews);
}
if (INDEX != null) {
if (
!visitedViews[INDEX].find(
(i) => i.fullPath === this.$route.fullPath
)
) {
this.toLastView(visitedViews[INDEX])
}
this.visitedViews = this.getVisitedViews()
}
})
});
},
closeLeftTags() {
this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {
let url = getMenuNode()
let INDEX = null
if (url) {
if (url.includes('Workbench')) {
INDEX = 0
} else if (url.includes('MasterDataCenter')) {
INDEX = 1
} else if (url.includes('IntegrationTaskCenter')) {
INDEX = 2
} else if (url.includes('businessCenter')) {
INDEX = 3
} else if (url.includes('ApplicationCenter')) {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
}else if (url.includes('accountantMatter')) {
INDEX = 6
}
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews);
}
if (INDEX != null) {
if (
!visitedViews[INDEX].find(
(i) => i.fullPath === this.$route.fullPath
)
) {
this.toLastView(visitedViews[INDEX])
}
this.visitedViews = this.getVisitedViews()
}
})
});
},
closeOthersTags() {
this.$router.push(this.selectedTag).catch(() => {
})
this.$router.push(this.selectedTag).catch(() => {});
this.$tab.closeOtherPage(this.selectedTag).then(() => {
this.moveToCurrentTag()
this.visitedViews = this.getVisitedViews()
})
this.moveToCurrentTag();
});
},
closeAllTags(view) {
this.$tab.closeAllPage().then(({ visitedViews }) => {
let url = getMenuNode()
let INDEX = null
if (url) {
if (url.includes('Workbench')) {
INDEX = 0
} else if (url.includes('MasterDataCenter')) {
INDEX = 1
} else if (url.includes('IntegrationTaskCenter')) {
INDEX = 2
} else if (url.includes('businessCenter')) {
INDEX = 3
} else if (url.includes('ApplicationCenter')) {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
} else if (url.includes('accountantMatter')) {
INDEX = 6
}
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
return;
}
if (INDEX != null) {
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
return
}
this.toLastView(visitedViews[INDEX], view)
this.visitedViews = this.getVisitedViews()
}
})
this.toLastView(visitedViews, view);
});
},
toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0]
const latestView = visitedViews.slice(-1)[0];
if (latestView) {
this.$router.push(latestView.fullPath)
this.$router.push(latestView.fullPath);
} else {
// now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs.
if (view.name === 'Dashboard') {
if (view.name === "Dashboard") {
// to reload home page
this.$router.replace({
path: '/redirect' + view.fullPath
})
path: "/redirect" + view.fullPath,
});
} else {
this.$router.push('/')
this.$router.push("/");
}
}
},
openMenu(tag, e) {
const menuMinWidth = 105
const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
const offsetWidth = this.$el.offsetWidth // container width
const maxLeft = offsetWidth - menuMinWidth // left boundary
const left = e.clientX - offsetLeft + 15 // 15: margin right
const menuMinWidth = 105;
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
const offsetWidth = this.$el.offsetWidth; // container width
const maxLeft = offsetWidth - menuMinWidth; // left boundary
const left = e.clientX - offsetLeft + 15; // 15: margin right
if (left > maxLeft) {
this.left = maxLeft
this.left = maxLeft;
} else {
this.left = left
}
if (this.newVersionSystem) {
this.top = e.clientY
} else {
this.top = e.clientY - 40
this.left = left;
}
this.top = e.clientY;
this.visible = true
this.selectedTag = tag
this.visible = true;
this.selectedTag = tag;
},
closeMenu() {
this.visible = false
this.visible = false;
},
handleScroll() {
this.closeMenu()
}
}
}
this.closeMenu();
},
},
};
</script>
<style lang="scss" scoped>
@ -442,16 +313,16 @@ export default {
.tags-view-container {
// height: 34px;
width: calc(100% - 133px);
width: 100%;
// width: calc(100% - 180px);
margin-left: 10px;
background: #fff !important;
background: #f7f7f7;
border-radius: 4px;
padding: 0px 10px;
// border-bottom: 1px solid #d8dce5;
// box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
position: fixed;
top: 10px;
top: 55px;
// margin-top: 60px;
z-index: 1000;
@ -572,7 +443,6 @@ export default {
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transform-origin: 100% 50%;
margin-right: 5px;
&:before {
// transform: scale(0.6);
display: inline-block;
@ -584,7 +454,6 @@ export default {
color: #fff;
}
}
.el-icon-close-else {
width: 16px;
height: 16px;

View File

@ -477,6 +477,15 @@ $activeColor: var(--bg-color, "#00aaff");
background-color: #ecf5ff !important;
}
.el-tree-node:focus > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.el-tree-node.is-current > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.navbarSearch {
// width: 200px !important;

View File

@ -108,7 +108,7 @@ export default {
},
mounted() {
this.initTags();
// this.addTags();
this.addTags();
},
methods: {
isActive(route) {

View File

@ -5,33 +5,33 @@
:style="{ '--current-color': theme }"
>
<div class="newVersionSystem">
<new-menu class="newMenuWidth" :class="{'closeWidth':$route.path.includes('settingMenu')}"/>
<new-menu class="newMenuWidth" />
<div class="newMenuAppMain">
<tags-view v-if="showTagsView"/>
<app-main/>
<tags-view v-if="showTagsView" />
<app-main />
</div>
</div>
</div>
</template>
<script>
import router from '@/router'
import RightPanel from '@/components/RightPanel'
import notFound from '@/views/error/404'
import router from "@/router";
import RightPanel from "@/components/RightPanel";
import notFound from "@/views/error/404";
import {
AppMain,
Navbar,
Settings,
Sidebar,
TagsView,
NewMenu
} from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import variables from '@/assets/styles/variables.scss'
NewMenu,
} from "./components";
import ResizeMixin from "./mixin/ResizeHandler";
import { mapState } from "vuex";
import variables from "@/assets/styles/variables.scss";
export default {
name: 'Layout',
name: "Layout",
components: {
AppMain,
Navbar,
@ -40,7 +40,7 @@ export default {
Sidebar,
TagsView,
NewMenu,
notFound
notFound,
},
mixins: [ResizeMixin],
computed: {
@ -53,34 +53,34 @@ export default {
conciseMenu: (state) => state.settings.conciseMenu,
needTagsView: (state) => state.settings.tagsView,
showTagsView: (state) => state.settings.showTagsView,
fixedHeader: (state) => state.settings.fixedHeader
fixedHeader: (state) => state.settings.fixedHeader,
}),
classObj() {
return {
// hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
mobile: this.device === "mobile",
};
},
variables() {
return variables
}
return variables;
},
},
data() {
return {
childrenType: false,
childrenWidth: '1200px'
}
childrenWidth: "1200px",
};
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
}
}
}
this.$store.dispatch("app/closeSideBar", {
withoutAnimation: false,
});
},
},
};
</script>
<style lang="scss" scoped>
@ -94,37 +94,23 @@ export default {
width: 100%;
// padding: 0 8px;
background: #ffffff;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.newVersionSystem {
display: flex;
height: 100%;
width: 100%;
}
.newMenuWidth {
width: 114px;
background-color: #fff;
transition: all .3s;
opacity: 1;
}
.closeWidth {
width: 0px !important;
opacity: 0;
}
.newMenuAppMain {
flex: 1;
width: calc(100% - 114px);
overflow: hidden;
background-color: #f5f5f5;
}
.drawer-bg {
background: #000;
opacity: 0.3;
@ -134,21 +120,18 @@ export default {
position: absolute;
z-index: 999;
}
.defaultMuneStyle {
width: calc(100% - 160px);
margin-left: 160px;
height: 100%;
// padding:10px;
}
.conciseMenuStyle {
width: calc(100% - 70px);
margin-left: 70px;
padding: 10px;
height: 100%;
}
.fixed-header {
position: fixed;
top: 0;
@ -169,7 +152,6 @@ export default {
.mobile .fixed-header {
width: 100%;
}
.webConcat {
position: fixed;
top: 50px;

View File

@ -3,7 +3,7 @@ import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken, getCompanyId, getMenuNode,setMenuNode } from '@/utils/auth'
import { getToken, getCompanyId } from '@/utils/auth'
import { isRelogin, getButtonLish } from '@/utils/request'
import { authApi } from '@/api/apis/auth'
import { getInfo } from '@/utils/auth'
@ -11,8 +11,7 @@ import { getInfo } from '@/utils/auth'
NProgress.configure({
showSpinner: false
})
//判断是否第一次进入页面
let isFirst = true;
const whiteList = [
'/login',
'/test',
@ -22,38 +21,11 @@ const whiteList = [
'/register',
'/systemInit',
'/databaseLogin',
'/apiLogs',
'/apiLogsError'
'/apiLogs'
]
router.beforeEach((to, from, next) => {
let reloaded = sessionStorage.getItem('reloaded')
//网站第一次进来逻辑 当from为空
if (from.path === '/' && !reloaded && isFirst && !whiteList.includes(to.path)) {
isFirst = false
setMenuNode("/index");
store.commit("SET_CURRENT_MENU_NODE", "/index");
next({
path: '/index',
})
return
}
//网站刷新后逻辑
if (reloaded === 'true' && !whiteList.includes(to.path)) {
sessionStorage.setItem('reloaded', 'false')
let url = getMenuNode();
if (url) {
next({
path: url,
})
} else {
next({
path: '/index',
})
}
return
}
NProgress.start()
if (getToken()) {
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)

View File

@ -16,7 +16,6 @@ All.prototype = {
setCookie(val) { //cookie设置[{key:value}]、获取key、清除['key1','key2']
for (var i = 0, len = val.length; i < len; i++) {
for (var key in val[i]) {
console.log(key,'key123')
document.cookie = key + '=' + encodeURIComponent(val[i][key]) + "; path=/";
}
}
@ -33,9 +32,8 @@ All.prototype = {
},
clearCookie(name) {
var myDate = new Date();
myDate.setTime(-1000); //设置时间
myDate.setTime(-1000); //设置时间
for (var i = 0, len = name.length; i < len; i++) {
console.log(name,'?')
document.cookie = "" + name[i] + "=''; path=/; expires=" + myDate.toGMTString();
}
},
@ -49,7 +47,7 @@ All.prototype = {
},
toChecked(arr, elem, key = 'id') {
// eslint-disable-next-line no-
var isIncludes = this.toggleClass(arr, elem, key);
!isIncludes ? arr.push(elem) : this.removeEle(arr, elem, key);
},
@ -124,7 +122,7 @@ All.prototype = {
})
}
return arr.join("或")
},
},
conditionStr(nodeConfig, index) {
var { conditionList, nodeUserList } = nodeConfig.conditionNodes[index];
if (conditionList.length == 0) {
@ -164,11 +162,11 @@ All.prototype = {
return "发起人自选"
}
}
},
},
toggleStrClass(item, key) {
let a = item.zdy1 ? item.zdy1.split(",") : []
return a.some(item => { return item == key });
},
}
export default new All();
export default new All();

View File

@ -40,170 +40,101 @@ export const constantRoutes = [{
component: () => import('@/views/redirect')
}]
},
{
path: '/apiLogs',
component: () => import('@/views/apiLogs/index.vue'),
hidden: true
},
{
path: '/apiLogsError',
component: () => import('@/views/apiLogsError/index.vue'),
hidden: true
},
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
},
{
path: '/test',
component: () => import('@/views/test'),
hidden: true
},
{
path: '/register',
component: () => import('@/views/register/index'),
hidden: true
},
{
path: '/systemInit',
// name: "databaseIndex",
component: () => import('@/views/systemInit/index'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error/401'),
hidden: true
},
{
path: '/apiLogs',
component: () => import('@/views/apiLogs/index.vue'),
hidden: true
},
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
},
{
path: '/test',
component: () => import('@/views/test'),
hidden: true
},
{
path: '/register',
component: () => import('@/views/register/index'),
hidden: true
},
{
path: '/systemInit',
// name: "databaseIndex",
component: () => import('@/views/systemInit/index'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error/401'),
hidden: true
},
// {
// path: "/contractAssistant",
// component: () => import("@/views/contractAssistant"),
// hidden: true,
// },
{
path: '',
component: Layout,
redirect: 'index',
children: [{
path: 'index',
component: () => import('@/views/index_v2'),
name: 'Index',
meta: {
title: '首页',
icon: 'dashboard',
affix: true
}
},
{
path: 'notFound',
component: () => import('@/views/notFound'),
name: 'notFound',
meta: {
title: '404',
icon: 'dashboard'
// affix: true,
}
},
{
path: 'message',
component: () => import('@/views/newVersionView/message/index'),
name: 'message',
meta: {
title: '消息',
icon: 'dashboard'
}
},
{
path: 'Workbench',
component: () => import('@/views/newVersionView/Workbench/index'),
name: 'Workbench',
meta: {
title: '工作台',
icon: 'dashboard'
}
},
{
path: 'MasterDataCenter',
component: () => import('@/views/newVersionView/MasterDataCenter/index'),
name: 'MasterDataCenter',
meta: {
title: '主数据中心',
icon: 'dashboard'
}
},
{
path: 'ApplicationCenter',
component: () => import('@/views/newVersionView/ApplicationCenter/index'),
name: 'ApplicationCenter',
meta: {
title: '应用管理',
icon: 'dashboard'
}
},
{
path: 'IntegrationTaskCenter',
component: () => import('@/views/newVersionView/IntegrationTaskCenter/index'),
name: 'IntegrationTaskCenter',
meta: {
title: '集成任务',
icon: 'dashboard'
}
},
{
path: 'businessCenter',
component: () => import('@/views/newVersionView/businessCenter/index'),
name: 'businessCenter',
meta: {
title: '业务中心',
icon: 'dashboard'
}
},
{
path: 'businessMatter',
component: () => import('@/views/newVersionView/businessMatter/index'),
name: 'businessMatter',
meta: {
title: '会计事项平台',
icon: 'dashboard'
}
},
{
path: 'accountantMatter',
component: () => import('@/views/newVersionView/accountantMatter/index'),
name: 'accountantMatter',
meta: {
title: '财资事项平台',
icon: 'dashboard'
}
}
]
{
path: '',
component: Layout,
redirect: 'index',
children: [{
path: 'index',
component: () => import('@/views/index_v2'),
name: 'Index',
meta: {
title: '首页',
icon: 'dashboard',
affix: true
}
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'Profile',
children: [{
path: 'Profile',
// component: () => import('@/views/system/user/personalCenter/index'),
component: () =>
import(
'@/views/systemSettings/userSettings/PersonnelSettings/personalCenter/index'
),
name: 'Profile',
meta: {
title: '个人中心',
icon: 'user'
path: 'notFound',
component: () => import('@/views/notFound'),
name: 'notFound',
meta: {
title: '404',
icon: 'dashboard'
// affix: true,
}
},{
path: "Workbench",
component: () => import("@/views/newVersionView/Workbench/index"),
name: "Workbench",
meta: {
title: "工作台",
icon: "dashboard",
},
},
]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'Profile',
children: [{
path: 'Profile',
// component: () => import('@/views/system/user/personalCenter/index'),
component: () =>
import(
'@/views/systemSettings/userSettings/PersonnelSettings/personalCenter/index'
),
name: 'Profile',
meta: {
title: '个人中心',
icon: 'user'
}
}]
}
}
}]
},
// {
// path: "/integrationOption",
// component: Layout,

View File

@ -18,7 +18,6 @@ const getters = {
sidebarRouters: state => state.permission.sidebarRouters,
personInfo: state => state.permission.personInfo,
companyID: state => state.user.companyID,
currentMenuNode: state => state.user.currentMenuNode,
// tableId: state => state.approval.tableId,
// isTried: state => state.approval.isTried,
// flowPermission1: state => state.approval.flowPermission1,
@ -38,6 +37,5 @@ const getters = {
conditionDrawer: state => state.flowPath.conditionDrawer,
conditionsConfig: state => state.flowPath.conditionsConfig,
getButtonPre: (state) => state.perButton.buttonObj,
messageCount: state => state.user.messageCount,
}
export default getters

View File

@ -59,14 +59,6 @@ const permission = {
hidden: true
}
},
{
path: 'accountAdmin',
name: 'accountAdmin',
component: () => import('@/views/applicationList/accountList/accountAdmin'),
meta: {
hidden: true
}
},
{
path: 'inserterAdmin',
name: 'inserterAdmin',

View File

@ -1,571 +1,234 @@
import { getMenuNode } from "@/utils/auth";
const state = {
visitedViews: [
[],
[],
[],
[],
[],
[],
[]
],
cachedViews: [
[],
[],
[],
[],
[],
[],
[]
],
iframeViews: [
[],
[],
[],
[],
[],
[],
[]
],
visitedViews: [],
cachedViews: [],
iframeViews: []
}
const mutations = {
ADD_IFRAME_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
if (state.iframeViews[Index].some(v => v.path === view.path)) return
state.iframeViews[Index].push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
})
)
}
},
ADD_VISITED_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
if (state.visitedViews[Index].some(v => v.path === view.path)) return
if(view.meta.affix){
state.visitedViews[Index].unshift(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
})
)
}else{
state.visitedViews[Index].push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
})
)
}
}
},
ADD_CACHED_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
if (state.cachedViews[Index].includes(view.name)) return
if (view.meta && !view.meta.noCache) {
state.cachedViews[Index].push(view.name)
}
}
},
DEL_VISITED_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
for (const [i, v] of state.visitedViews[Index].entries()) {
if (v.path === view.path) {
state.visitedViews[Index].splice(i, 1)
break
}
}
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path !== view.path)
}
},
DEL_IFRAME_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path !== view.path)
}
},
DEL_CACHED_VIEW: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
const index = state.cachedViews[Index].indexOf(view.name)
index > -1 && state.cachedViews[Index].splice(index, 1)
}
},
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
let url = getMenuNode();
let Index = null
if (url) {
if (url.includes("Workbench")) {
Index = 0
} else if (url.includes("MasterDataCenter")) {
Index = 1
} else if (url.includes("IntegrationTaskCenter")) {
Index = 2
} else if (url.includes("businessCenter")) {
Index = 3
} else if (url.includes("ApplicationCenter")) {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
state.visitedViews[Index] = state.visitedViews[Index].filter(v => {
return v.meta.affix || v.path === view.path
})
state.iframeViews[Index] = state.iframeViews[Index].filter(item => item.path === view.path)
}
},
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
const index = state.cachedViews[INDEX].indexOf(view.name)
if (index > -1) {
state.cachedViews[INDEX] = state.cachedViews[INDEX].slice(index, index + 1)
} else {
state.cachedViews[INDEX] = []
}
}
},
DEL_ALL_VISITED_VIEWS: state => {
// keep affix tags
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
const affixTags = state.visitedViews[INDEX].filter(tag => tag.meta.affix)
state.visitedViews[INDEX] = affixTags
state.iframeViews[INDEX] = []
}
},
DEL_ALL_CACHED_VIEWS: state => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
state.cachedViews[INDEX] = []
}
},
CLEAR_VISTEDVIEWS: state => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
state.visitedViews[INDEX] = []
}
},
UPDATE_VISITED_VIEW: (state, view) => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
for (let v of state.visitedViews[INDEX]) {
if (v.path === view.path) {
v = Object.assign(v, view)
break
}
}
}
},
DEL_RIGHT_VIEWS: (state, view) => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
const index = state.visitedViews[INDEX].findIndex(v => v.path === view.path)
if (index === -1) {
return
}
state.visitedViews[INDEX] = state.visitedViews[INDEX].filter((item, idx) => {
if (idx <= index || (item.meta && item.meta.affix)) {
return true
}
const i = state.cachedViews[INDEX].indexOf(item.name)
if (i > -1) {
state.cachedViews[INDEX].splice(i, 1)
}
if (item.meta && item.meta.link) {
const fi = state.iframeViews[INDEX].findIndex(v => v.path === item.path)
state.iframeViews[INDEX].splice(fi, 1)
}
return false
})
}
},
DEL_LEFT_VIEWS: (state, view) => {
let url = getMenuNode();
let INDEX = null
if (url) {
if (url.includes("Workbench")) {
INDEX = 0
} else if (url.includes("MasterDataCenter")) {
INDEX = 1
} else if (url.includes("IntegrationTaskCenter")) {
INDEX = 2
} else if (url.includes("businessCenter")) {
INDEX = 3
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
const index = state.visitedViews[INDEX].findIndex(v => v.path === view.path)
if (index === -1) {
return
}
state.visitedViews[INDEX] = state.visitedViews[INDEX].filter((item, idx) => {
if (idx >= index || (item.meta && item.meta.affix)) {
return true
}
const i = state.cachedViews[INDEX].indexOf(item.name)
if (i > -1) {
state.cachedViews[INDEX].splice(i, 1)
}
if (item.meta && item.meta.link) {
const fi = state.iframeViews[INDEX].findIndex(v => v.path === item.path)
state.iframeViews[INDEX].splice(fi, 1)
}
return false
})
}
ADD_IFRAME_VIEW: (state, view) => {
if (state.iframeViews.some(v => v.path === view.path)) return
state.iframeViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
})
)
},
ADD_VISITED_VIEW: (state, view) => {
if (state.visitedViews.some(v => v.path === view.path)) return
state.visitedViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
})
)
},
ADD_CACHED_VIEW: (state, view) => {
if (state.cachedViews.includes(view.name)) return
if (view.meta && !view.meta.noCache) {
state.cachedViews.push(view.name)
}
},
DEL_VISITED_VIEW: (state, view) => {
for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) {
state.visitedViews.splice(i, 1)
break
}
}
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
},
DEL_IFRAME_VIEW: (state, view) => {
state.iframeViews = state.iframeViews.filter(item => item.path !== view.path)
},
DEL_CACHED_VIEW: (state, view) => {
const index = state.cachedViews.indexOf(view.name)
index > -1 && state.cachedViews.splice(index, 1)
},
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
state.visitedViews = state.visitedViews.filter(v => {
return v.meta.affix || v.path === view.path
})
state.iframeViews = state.iframeViews.filter(item => item.path === view.path)
},
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
const index = state.cachedViews.indexOf(view.name)
if (index > -1) {
state.cachedViews = state.cachedViews.slice(index, index + 1)
} else {
state.cachedViews = []
}
},
DEL_ALL_VISITED_VIEWS: state => {
// keep affix tags
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
state.visitedViews = affixTags
state.iframeViews = []
},
DEL_ALL_CACHED_VIEWS: state => {
state.cachedViews = []
},
UPDATE_VISITED_VIEW: (state, view) => {
for (let v of state.visitedViews) {
if (v.path === view.path) {
v = Object.assign(v, view)
break
}
}
},
DEL_RIGHT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
if (index === -1) {
return
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx <= index || (item.meta && item.meta.affix)) {
return true
}
const i = state.cachedViews.indexOf(item.name)
if (i > -1) {
state.cachedViews.splice(i, 1)
}
if(item.meta.link) {
const fi = state.iframeViews.findIndex(v => v.path === item.path)
state.iframeViews.splice(fi, 1)
}
return false
})
},
CLEAR_VISTEDVIEWS:state =>{
state.visitedViews = []
},
DEL_LEFT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
if (index === -1) {
return
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx >= index || (item.meta && item.meta.affix)) {
return true
}
const i = state.cachedViews.indexOf(item.name)
if (i > -1) {
state.cachedViews.splice(i, 1)
}
if(item.meta.link) {
const fi = state.iframeViews.findIndex(v => v.path === item.path)
state.iframeViews.splice(fi, 1)
}
return false
})
}
}
const actions = {
addView({ dispatch }, view) {
dispatch('addVisitedView', view)
dispatch('addCachedView', view)
},
clearVisted({ commit }) {
commit('CLEAR_VISTEDVIEWS')
},
addIframeView({ commit }, view) {
commit('ADD_IFRAME_VIEW', view)
},
addVisitedView({ commit }, view) {
commit('ADD_VISITED_VIEW', view)
},
addCachedView({ commit }, view) {
commit('ADD_CACHED_VIEW', view)
},
delView({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delVisitedView', view)
dispatch('delCachedView', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delVisitedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_VISITED_VIEW', view)
resolve([...state.visitedViews])
})
},
delIframeView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_IFRAME_VIEW', view)
resolve([...state.iframeViews])
})
},
delCachedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_CACHED_VIEW', view)
resolve([...state.cachedViews])
})
},
delOthersViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delOthersVisitedViews', view)
dispatch('delOthersCachedViews', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delOthersVisitedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_VISITED_VIEWS', view)
resolve([...state.visitedViews])
})
},
delOthersCachedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_CACHED_VIEWS', view)
resolve([...state.cachedViews])
})
},
delAllViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delAllVisitedViews', view)
dispatch('delAllCachedViews', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delAllVisitedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_VISITED_VIEWS')
resolve([...state.visitedViews])
})
},
delAllCachedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_CACHED_VIEWS')
resolve([...state.cachedViews])
})
},
updateVisitedView({ commit }, view) {
commit('UPDATE_VISITED_VIEW', view)
},
delRightTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_RIGHT_VIEWS', view)
resolve([...state.visitedViews])
})
},
delLeftTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_LEFT_VIEWS', view)
resolve([...state.visitedViews])
})
},
addView({ dispatch }, view) {
dispatch('addVisitedView', view)
dispatch('addCachedView', view)
},
clearVisted({commit}){
commit('CLEAR_VISTEDVIEWS')
},
addIframeView({ commit }, view) {
commit('ADD_IFRAME_VIEW', view)
},
addVisitedView({ commit }, view) {
commit('ADD_VISITED_VIEW', view)
},
addCachedView({ commit }, view) {
commit('ADD_CACHED_VIEW', view)
},
delView({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delVisitedView', view)
dispatch('delCachedView', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delVisitedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_VISITED_VIEW', view)
resolve([...state.visitedViews])
})
},
delIframeView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_IFRAME_VIEW', view)
resolve([...state.iframeViews])
})
},
delCachedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_CACHED_VIEW', view)
resolve([...state.cachedViews])
})
},
delOthersViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delOthersVisitedViews', view)
dispatch('delOthersCachedViews', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delOthersVisitedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_VISITED_VIEWS', view)
resolve([...state.visitedViews])
})
},
delOthersCachedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_CACHED_VIEWS', view)
resolve([...state.cachedViews])
})
},
delAllViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delAllVisitedViews', view)
dispatch('delAllCachedViews', view)
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
},
delAllVisitedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_VISITED_VIEWS')
resolve([...state.visitedViews])
})
},
delAllCachedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_CACHED_VIEWS')
resolve([...state.cachedViews])
})
},
updateVisitedView({ commit }, view) {
commit('UPDATE_VISITED_VIEW', view)
},
delRightTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_RIGHT_VIEWS', view)
resolve([...state.visitedViews])
})
},
delLeftTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_LEFT_VIEWS', view)
resolve([...state.visitedViews])
})
},
}
export default {
namespaced: true,
state,
mutations,
actions
namespaced: true,
state,
mutations,
actions
}

View File

@ -19,8 +19,6 @@ const user = {
info: {},
companyID: "",
companyListAll: [],
messageCount:0,
currentMenuNode:"",//目的是 结合cokkie 实时监听当前导航栏的变化
},
mutations: {
@ -48,12 +46,6 @@ const user = {
SET_COMPANYID_LIST_All: (state, companyListAll) => {
state.companyListAll = companyListAll;
},
SET_MESSAGE_COUNT: (state, messageCount) => {
state.messageCount = messageCount
},
SET_CURRENT_MENU_NODE: (state, currentMenuNode) => {
state.currentMenuNode = currentMenuNode
},
},
actions: {
@ -65,13 +57,15 @@ const user = {
return new Promise((resolve, reject) => {
login(login_name, password)
.then((res) => {
setToken(res.attribute['zt-token']);
setToken(res.attribute.token);
setInfo(JSON.stringify(res.attribute.userInfo));
commit("SET_TOKEN", res.attribute.token);
commit("SET_INFO", res.attribute.userInfo);
resolve();
})
.catch((error) => {
console.log(123)
//
commit("LogOut")
reject(error);

View File

@ -3,7 +3,6 @@ import Cookies from 'js-cookie'
const TokenKey = 'zhongtai-Token'
const InfoKey = 'zhongtai-Info'
const CompanyId = 'Company-Id'
const MenuNode = 'Menu-Node'
export function getToken() {
return Cookies.get(TokenKey)
@ -18,17 +17,17 @@ export function removeToken() {
}
export function getInfo() {
localStorage.getItem(InfoKey)
localStorage.getItem(InfoKey)
return Cookies.get(InfoKey)
}
export function setInfo(info) {
localStorage.setItem(InfoKey, info)
localStorage.setItem(InfoKey,info)
return Cookies.set(InfoKey, info)
}
export function removeInfo() {
localStorage.removeItem(InfoKey)
localStorage.removeItem(InfoKey)
return Cookies.remove(InfoKey)
}
@ -42,16 +41,4 @@ export function setCompanyId(info) {
export function removeCompanyId() {
return Cookies.remove(CompanyId)
}
export function getMenuNode() {
return Cookies.get(MenuNode)
}
export function setMenuNode(info) {
return Cookies.set(MenuNode, info)
}
export function removeMenuNode() {
return Cookies.remove(MenuNode)
}
}

View File

@ -3,7 +3,7 @@ import {
} from 'element-ui'
let appLoading
export function openLoading(loadingName='加载中') {
export function openLoading(loadingName) {
let loadingText
switch (loadingName) {
case 'submit':
@ -21,12 +21,9 @@ export function openLoading(loadingName='加载中') {
case 'del':
loadingText = '删除'
break;
case 'test':
loadingText = '校验数据'
break;
default:
loadingText = loadingName
break;
case 'test':
loadingText = '校验数据'
break;
}
appLoading = Loading.service({
text: "正在" + loadingText + ",请稍候",
@ -36,7 +33,7 @@ export function openLoading(loadingName='加载中') {
})
setTimeout(() => {
appLoading.close();
}, 1000000)
}, 10000)
}
export function closeLoading() {
if (appLoading) {

View File

@ -8,7 +8,6 @@ import {
import store from '@/store'
import {
getToken,
setMenuNode,
setToken,
removeCompanyId,
removeToken,
@ -65,7 +64,7 @@ service.interceptors.request.use(
// if (window.localStorage.userToken) {
let token = getToken()
if (token) {
config.headers['zt-token'] = token
config.headers['token'] = token
}
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
@ -136,8 +135,8 @@ service.interceptors.response.use(
if (code === '500') {
// 判断是否在处理 token 无效情况
if (msg === 'zt-token无效' && isHandlingTokenInvalid) return
if (msg === 'zt-token无效' && !isHandlingTokenInvalid) {
if (msg === 'token无效' && isHandlingTokenInvalid) return
if (msg === 'token无效' && !isHandlingTokenInvalid) {
isHandlingTokenInvalid = true;
MessageBox.confirm('登录失效!请重新登录。', '系统提示', {
confirmButtonText: '确定',
@ -148,10 +147,6 @@ service.interceptors.response.use(
type: 'error'
})
.then(() => {
store.commit("REMOVE_ROUTER");
store.dispatch("tagsView/delAllViews");
setMenuNode("/index");
store.commit("SET_CURRENT_MENU_NODE", "/index");
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
@ -303,7 +298,7 @@ export function download(url, params, filename, config) {
responseType: 'blob',
...config
})
.then(async (data) => {
.then(async(data) => {
const isLogin = await blobValidate(data)
if (isLogin) {
const blob = new Blob([data])

View File

@ -17,14 +17,6 @@ export function getNowTime() {
return nowTime;
}
/**
* 根据数组对象的某个字段去重
* item.name [{name:1}] 根据每条数据的name值来去重
* */
export function unique(arr, val) {
const res = new Map();
return arr.filter(item => !res.has(item[val]) && res.set(item[val], 1))
}
export function getEditHtml(str) {
if (!str) {
return;
@ -769,18 +761,3 @@ export function delTreeChildren(data){
delChilren(data)
return data
}
// 动态宽 boxWidth 最大的div盒子大小,minWidth最小宽度,marginSize间距
export function dynamicWidth(boxWidth, minWidth, marginSize = 0) {
let num = Math.floor(boxWidth / (minWidth + marginSize))
return boxWidth / num - marginSize
}
// 动态高度
export function dynamicHeight(boxWidth, minWidth, marginSize = 0, boxHeight, listHeight, heightMargin = 0) {
let num = Math.floor(boxWidth / (minWidth + marginSize))
// console.log(,'几行')
return Math.ceil(boxHeight / (listHeight + heightMargin)) * num
// return boxWidth / num - marginSize
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,384 +0,0 @@
<template>
<div class="wrap">
<div class="main" v-loading="mainLoading">
<baseTable :tableData="tableData" :tabLoading="tabLoading"
:tableColumn="tableColumn" :border="false"
>
<!-- 来源类型-->
<template #sourceType="{row}">
{{ row.sourceType == 1 ? '插件' : 'api' }}
</template>
<!-- 触发类型-->
<template #triggerType="{row}">
{{ row.triggerType == 0 ? '手动' : '自动' }}
</template>
<!-- 启用/停用-->
<template #enabledState="{row}">
<el-switch
:disabled="true"
v-model="row.enabledState"
active-value="1"
inactive-value="0"
>
</el-switch>
</template>
<!-- 操作-->
<template #operation="{row}">
<div class="btnList">
<div class="settingBtn" @click="sonTableEditHandle(row)">
<img src="./images/设置.png" alt="">
</div>
<div class="deleBtn" @click="activedOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
</template>
</baseTable>
<div class="receiptsAddRow">
<el-link
type="primary"
@click="addRowHandle"
:underline="false"
>+ 添加
</el-link
>
</div>
</div>
<baseRightDialog ref="settingForm"
:footerShow="true"
:dialogVisible.sync="settingFormShow"
title="数据来源"
@handleClose="settingFormShow=false"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="sonTableSaveHandle"
>
<settingForm ref="settingForm" v-if="settingFormShow" @saveSuccessHandle="saveSuccessHandle"></settingForm>
</baseRightDialog>
</div>
</template>
<script>
import settingForm from './settingForm.vue'
import baseRightDialog from '@/components/base/baseRightDialog/index.vue'
import baseNewSelect from '@/views/applicationList/com/baseNewSelect.vue'
import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import { getApiModuleApi } from '@/api/apiChunks'
import { deepClone } from '@/utils/index.js'
import { getUserModuleApi } from '@/api/integrationOption/integrationOption'
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
import { authApi } from '@/api/apis/auth'
export default {
data() {
return {
mainLoading: false,
saveLoading: false,
options: [],
//
roleDist: {},
addSwitch: false,
tabLoading: false,
tableColumn: [
{
title: '来源类型',
id: 'sourceType',
width:150,
},
{
title: '来源应用',
id: 'appName',
width:150,
},
{
title: '触发类型',
id: 'triggerType',
width:120,
},
{
title: '来源编码',
id: 'sourceCodeName',
tooltip: true
},
{
title: '新增接口',
id: 'addName'
},
{
title: '修改接口',
id: 'updateName'
},
{
title: '删除接口',
id: 'deleteName'
},
{
title: '启用/停用',
id: 'enabledState',
width:120,
},
{ title: '操作', id: 'operation',width:120, }
],
tableData: [],
pageModel: {
pageIndex: 1,
total: 10,
limit: 10
},
addRole: '',
settingFormShow: false,
serviceOptions: []
}
},
methods: {
///
saveSuccessHandle() {
this.settingFormShow = false
this.getTableData()
},
//
async initSelect() {
const res = await authApi('sysApplicationService', '', 'queryEntity', '', {})
console.log(res)
this.serviceOptions.options = []
res.attribute.forEach(item => {
this.serviceOptions.push({
id: item.id,
label: item.name
})
})
return true
},
//tableData
async getTableData() {
const res = await authApi('mdmModuleService', '', 'queryMdmSource', '', {
mdmId: this.$route.query.id
})
this.tableData = res.attribute
console.log(this.tableData, 'table')
//
this.tableData.forEach(async(item) => {
console.log('???', this.serviceOptions)
let obj = this.serviceOptions.find(ele => {
return ele.id === item.sourceName
})
this.$set(item, 'appName', obj.label)
let labelDist = {}
let plugInDist = {}
const res2 = await authApi('sysApplicationApiService', '', 'queryEntity', '', {
appId: item.appId
})
res2.attribute.forEach((item) => {
labelDist[item.id] = item.apiName
})
if (item.deleteApi) {
this.$set(item, 'deleteName', labelDist[item.deleteApi])
}
if (item.updateApi) {
this.$set(item, 'updateName', labelDist[item.updateApi])
}
if (item.addApi) {
this.$set(item, 'addName', labelDist[item.addApi])
}
if (item.sourceType == 2 && item.sourceCode) {
this.$set(item, 'sourceCodeName', labelDist[item.sourceCode])
}
//
if (item.sourceType == 1 && item.sourceCode) {
const res = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
appId: item.sourceName
})
res.attribute.forEach((item) => {
plugInDist[item.id] = item.pluginName
})
this.$set(item, 'sourceCodeName', plugInDist[item.sourceCode])
}
})
},
//
sonTableSaveHandle() {
this.$refs.settingForm.$refs.typeOptionForm.submitForm()
},
//
sonTableEditHandle(row) {
this.settingFormShow = true
this.$nextTick(() => {
this.$refs.settingForm.getrowDetails(row.id)
})
},
//
activedOnFunc(row) {
this.$confirm('确定删除?')
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmSource', '', {
id: row.id
})
this.$vmNews('删除成功', 'success')
this.getTableData()
})
.catch((_) => {
})
},
//
addRowHandle() {
this.settingFormShow = true
},
async init() {
this.mainLoading = true
const res = await getApiModuleApi({
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmModuleRule'
}, { id: this.$route.query.id })
res.attribute.forEach(item => {
item.mdmModuleRoleButtonEntities.forEach(ele => {
item[ele.buttonType] = true
})
})
this.mainLoading = false
this.tableData = res.attribute
},
//close
dialogCloseHandle() {
this.addRole = ''
},
//add
addHandle() {
this.addSwitch = true
},
//
currentChangeHandle(pageModel) {
this.pageModel = pageModel
this.$nextTick(() => {
})
}
},
components: {
baseNewForm,
BaseTable,
baseDialog,
baseNewSelect,
basePage,
baseRightDialog,
settingForm
},
created() {
this.initSelect().then(() => {
this.getTableData()
})
this.$emit('flashActive', 3)
}
}
</script>
<style scoped lang="scss">
.receiptsAddRow {
margin-top: 15px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;
}
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
}
.checkChunk {
display: flex;
flex-wrap: wrap;
}
.wrap {
background-color: #fbfbfb;
width: 99.5%;
overflow: auto;
margin-left: 5px;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
margin-top: 10px;
background: #fff;
padding: 20px;
border-radius: 8px;
.btn {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
}
}
}
footer {
margin-top: 20px;
}
.addBox {
> .chunk {
display: flex;
align-items: center;
}
}
.btnList {
display: flex;
align-items: center;
justify-content: center;
.settingBtn {
cursor: pointer;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
}
</style>

View File

@ -1,365 +0,0 @@
<template>
<div class="settingForm">
<baseNewForm
ref="typeOptionForm"
:spanNumber="18"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'top'"
@onSelect="typeSelectChangeHanlde"
@onSubmit="typeOptionOnSubmit"
>
</baseNewForm>
</div>
</template>
<script>
import baseNewForm from '../compoments/baseNewForm'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import { authApi } from '@/api/apis/auth'
import { getApiModuleApi } from '@/api/apiChunks'
import { retrieveRawAttr } from 'echarts/lib/data/helper/dataProvider'
export default {
name: 'settingForm',
data() {
return {
formRow: [
{
elCol: [
{
type: 'select',
title: '来源类型',
id: 'sourceType',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: '插件',
id: '1'
},
{
label: 'api',
id: '2'
}
]
}
]
},
{
elCol: [
{
type: 'select',
title: '来源应用',
id: 'sourceName',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '来源编码',
id: 'sourceCode',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '触发类型',
id: 'triggerType',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: '手动',
id: '0'
},
{
label: '自动',
id: '1'
}
]
}
]
},
{
elCol: [
{
type: 'select',
title: '新增接口',
id: 'addApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '修改接口',
id: 'updateApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '删除接口',
id: 'deleteApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'switch',
title: '启用/停用',
id: 'enabledState',
row: 24,
disabled: false,
required: true,
fontSize: 16,
activeValue: '1',
inactiveValue: '0'
}
]
}
],
ruleForm: {},
tableId: '',//
mainLoading: false,
tabLoading: false,
serviceOptions: [],//
labelOptions: [],//
labelDist: {}//
}
},
methods: {
// filedName
filedIdChangHandle(val, row) {
row.filedName = this.labelDist[val]
},
//
async initSelect() {
//
this.serviceOptions = []
const service = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmService'
}, { remark: '' })
service.attribute.forEach(item => {
console.log(item.dbName, 'item')
this.serviceOptions.push({
id: item.id,
label: item.remark,
dbId: item.id,
mdmId: item.mdmId
})
})
console.log(this.serviceOptions, 'this.serviceOptions')
},
async typeSelectChangeHanlde(val, index, indexRow, row, flag = true) {
if (flag && (row.id === 'sourceName' || row.id === 'sourceType')) {
if (row.id === 'sourceType') {
this.formRow[2].elCol[0].options = []
this.$set(this.ruleForm, 'sourceCode', '')
} else {
this.formRow[2].elCol[0].options = []
this.formRow[4].elCol[0].options = []
this.formRow[5].elCol[0].options = []
this.formRow[6].elCol[0].options = []
this.$set(this.ruleForm, 'addApi', '')
this.$set(this.ruleForm, 'updateApi', '')
this.$set(this.ruleForm, 'deleteApi', '')
this.$set(this.ruleForm, 'sourceCode', '')
}
}
//appidapp
if ((row.id === 'sourceName' || row.id === 'sourceType') && this.ruleForm.sourceName) {
const res = await authApi('sysApplicationApiService', '', 'queryEntity', '', {
appId: this.ruleForm.sourceName
})
res.attribute.forEach((item) => {
this.formRow[4].elCol[0].options.push({
id: item.id,
label: item.apiName
})
this.formRow[5].elCol[0].options.push({
id: item.id,
label: item.apiName
})
this.formRow[6].elCol[0].options.push({
id: item.id,
label: item.apiName
})
if (this.ruleForm.sourceType == 2) {
this.formRow[2].elCol[0].options.push({
id: item.id,
label: item.apiName
})
}
})
//
if (this.ruleForm.sourceType == 1) {
const res = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
appId: this.ruleForm.sourceName
})
res.attribute.forEach((item) => {
this.formRow[2].elCol[0].options.push({
id: item.id,
label: item.pluginName
})
})
}
}
},
//
async typeOptionOnSubmit() {
let params = {
...this.ruleForm,
dbId: this.tableId,
mdmId: this.$route.query.id
}
if (params.id) {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmSource', '', params)
this.$vmNews('保存成功', 'success')
this.$emit('saveSuccessHandle')
} else {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveMdmSource', '', params)
this.$vmNews('保存成功', 'success')
this.$emit('saveSuccessHandle')
}
},
//
async getAppList() {
const res = await authApi('sysApplicationService', '', 'queryEntity', '', {})
this.formRow[1].elCol[0].options = []
res.attribute.forEach(item => {
this.formRow[1].elCol[0].options.push({
id: item.id,
label: item.name
})
})
},
//
async getrowDetails(id) {
const res = await authApi('mdmModuleService', '', 'getMdmSource', '', {
id
})
this.ruleForm = res.attribute
this.typeSelectChangeHanlde(this.ruleForm.appId, 0, 0, { id: 'sourceName' }, false)
}
},
created() {
this.getAppList()
this.initSelect()
},
components: {
BaseTable,
baseNewForm
}
}
</script>
<style scoped lang="scss">
.bigTitle {
border-top: 1px solid #EBEBEB;
padding-top: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 22px;
text-align: left;
font-style: normal;
}
.tableName {
display: flex;
align-items: center;
margin: 30px 0;
.title {
margin-right: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
font-style: normal;
}
}
.receiptsAddRow {
margin-top: 30px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;
}
.btnList {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
}
</style>

View File

@ -1,290 +0,0 @@
<template>
<div>
<template v-if="!lookflag">
<el-select
v-loading="selLoading"
class="w-100"
v-model="selectValue"
:placeholder="placeholder"
:clearable="false"
style="width: 240px"
size="mini"
ref="mySelect"
:reserve-keyword="true"
:disabled="disabled"
filterable
popper-class="sele"
:filter-method="filter"
@change="fun"
@focus="funx"
@blur="funb"
@visible-change="hidden"
clearable
>
<el-option
v-for="(item, index) in options"
:key="item.id"
:label="item.name"
remote
:value="item.id"
placeholder="请输入"
>
</el-option>
<div style="bottom: -10px">
<el-pagination
v-if="pageModel.total > pageModel.limit"
small
@current-change="handleCurrentChange"
:current-page="pageModel.pageIndex"
:page-size="pageModel.limit"
layout="prev, pager,next,total"
:total="pageModel.total"
>
</el-pagination>
</div>
</el-select>
</template>
<template v-else
>
<div v-loading="selLoading">{{ showValue }}</div>
</template
>
</div>
</template>
<style scoped lang="scss">
::v-deep .el-select-dropdown__wrap {
height: 38px;
}
.w-100 {
width: 100% !important;
}
.drop > > > .el-input__inner {
background: #5183ff !important;
color: white;
border: none;
height: 26px;
padding: 10px 22px 10px 10px;
text-align: center;
}
.drop {
width: 250px;
}
.drop > > > .el-select .el-input .el-select__caret {
display: none;
}
</style>
<script>
import debounce from "lodash/debounce";
import {getUserModuleApi} from "@/api/integrationOption/integrationOption.js";
export default {
props: {
searchKey: {
type: String,
default: "",
},
ruleForm: {
type: Object,
default: () => {
return {};
},
},
//
disabled: {
type: Boolean,
default: false,
},
placeholder: String,
value: {
type: [String, Number],
},
itemObj: {
type: Object,
default: () => {
return {};
},
},
lookflag: {
type: Boolean,
default: false,
},
idKey: {
type: [Number, String],
default: 0,
},
journalingType: {
type: [String, Number],
default: "subject",
},
apiInfo: {
type: Object,
},
searchApiInfo: {
type: Object,
},
prop: {
type: Object,
default: () => {
return {
label: "names",
id: "codes",
};
},
},
foucus: {
type: Boolean,
default: true,
},
apiBody: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
pageModel: {
total: 0,
pageIndex: 1,
limit: 10,
},
selLoading: false,
showValue: "",
lookLoading: false,
options: [],
tempObj: {},
};
},
computed: {
selectValue: {
get() {
return this.value;
},
set(val) {
this.$emit("input", val);
},
},
},
created() {
if (this.value) {
this.searchKeyHandle()
}
},
mounted() {
},
methods: {
async searchKeyHandle() {
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getApp"
}, {id: this.value})
if (res.attribute) {
this.options.push({...res.attribute})
}
},
//
handleCurrentChange(val) {
this.pageModel.pageIndex = val;
this.getUserModuleHandle();
},
// select
fun(val) {
let tempObj = this.options.find(item => {
if (val === item.id) {
return item
}
})
this.$emit(`onSelect`, val, tempObj);
this.$nextTick(() => {
this.$emit("blur");
});
},
searchShowValue(val) {
this.options.forEach((item) => {
if (item.codes == val) {
this.showValue = item.names;
this.$nextTick(() => {
this.$emit("showValue", this.showValue, this.itemObj, this.idKey);
});
}
});
},
//
funx() {
if (this.foucus) {
this.getUserModuleHandle();
}
},
clearOptions() {
if (this.options.length) {
this.pageModel.pageIndex = 1;
this.options = [];
this.tempObj = null;
}
},
//
funb() {
// this.$nextTick(() => {
// this.$emit("blur");
// });
},
hidden(val) {
if (!val) {
this.$nextTick(() => {
this.$emit("blur");
});
}
},
//,options
filter: debounce(function (val) {
this.pageModel.pageIndex = 1;
this.getUserModuleHandle(val);
}, 300),
focus() {
this.$refs.mySelect.focus();
},
async getUserModuleHandle(val = null, obj = null) {
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "queryApp"
}, {
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
name: val,
})
console.log(res, 'newselect')
this.pageModel.total = res.attribute.total;
this.options = res.attribute.list
},
async searchCodes(codes) {
},
},
beforeDestroy() {
},
//
watch: {
// value(newv, oldv) {
// if (this.lookflag) {
// this.searchCodes(this.value);
// }
// if (!oldv && newv) {
// this.searchCodes(this.value);
// }
// },
},
};
</script>

View File

@ -1,212 +0,0 @@
<!--
* @name: 自定义级联选择器
* @author: zhangpengcheng
* @date: 2022-08-19
-->
<template>
<div>
<template v-if="!lookflag">
<el-cascader
v-loading="selLoading"
style="width: 100%"
v-model="selectValue"
ref="elCascader"
:clearable="clearable"
:show-all-levels="showAllLevels"
:options="options"
@change="change"
@focus="focus"
:props="selectprops"
:disabled="disabled"
></el-cascader>
</template>
<template v-else="!lookflag">
<div>
{{ showValue }}
</div>
</template>
</div>
</template>
<script>
import { getUserModuleApi } from "@/api/integrationOption/integrationOption.js";
// import { areaGroupby } from "@/api/apis/auth.js";
export default {
name: "customCascader",
components: {},
props: {
value: {
type: String,
},
//
field: {
type: String,
default: "",
},
// 1 2
type: {
type: Number,
default: 1,
},
//
showAllLevels: {
type: Boolean,
default: false,
},
//
clearable: {
type: Boolean,
default: true,
},
//
disabled: {
type: Boolean,
default: false,
},
//
clearState: {
type: Number,
default: 0,
},
//
modelData: {
type: Array,
default: () => {
return [];
},
},
itemObj: {
type: Object,
default: () => {
return {};
},
},
ruleForm: {
type: Object,
default: () => {
return {};
},
},
lookflag: {
type: Boolean,
default: false,
},
},
data() {
return {
selectprops: {
label: this.itemObj.label,
value: this.itemObj.value,
expandTrigger: "hover",
checkStrictly: true,
},
options: [],
showValue: "",
selLoading: false,
};
},
created() {
if (Object.keys(this.ruleForm).length && this.ruleForm[this.itemObj.id]) {
this.getSelectdata(this.ruleForm[this.itemObj.id]);
}
},
mounted() {
this.areaGroupby();
},
watch: {
//
// clearState() {
// this.model = [];
// },
},
computed: {
selectValue: {
get() {
return [this.value];
},
set(val) {
this.$emit("input", val[val.length - 1]);
},
},
},
methods: {
// id
filterid(id, arr) {
let result = arr.find((item) => {
if (item.id === id) {
return item;
} else if (item.children) {
return this.filterid(id, item.children);
}
});
if (result) {
this.options.push(result);
this.showValue = result[this.itemObj.label];
}
},
// id
async getSelectdata(id) {
this.selLoading = true;
const res = await getUserModuleApi(
{
tl: "optionService",
as: "sys_template",
dj: "queryTemplateTreeData",
},
{
service: this.itemObj.service,
upId: this.itemObj.upId,
id: id,
label: this.itemObj.label,
value: this.itemObj.value,
}
);
if (res.status == 200) {
this.filterid(id, res.attribute);
// this.options = res.attribute;
// this.showValue = res.attribute[0][this.itemObj.label];
this.selLoading = false;
}
},
//
async getTreeSelect(obj = {}) {
const res = await getUserModuleApi(
{
tl: "optionService",
as: "sys_template",
dj: "queryTemplateTreeData",
},
{
service: this.itemObj.service,
value: this.itemObj.value,
label: this.itemObj.label,
upId: this.itemObj.upId,
...obj,
}
);
this.options = res.attribute;
},
//
setEchoData(model) {
this.model = model;
},
//
change() {},
//
areaGroupby() {
// areaGroupby().then(res=>{
// let {code ,data} = res;
// if(code === 10000){
// let newData = [data]
// this.options = newData
// }
// })
},
focus() {
this.getTreeSelect();
},
},
};
</script>
<style scoped lang='scss'>
</style>

View File

@ -1,149 +0,0 @@
<template>
<el-date-picker
v-model="dateData"
:type="datePickerType"
align="left"
unlink-panels
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="yyyy-MM-dd"
:disabled="disabled"
:picker-options="
datePickerType === 'date' ? DatePickerOptions : datedateRangePickerOptions
"
>
</el-date-picker>
</template>
<script>
export default {
props: {
disabled: {
type: Boolean,
default: false,
},
datePickerType: {
type: String,
default: "date",
},
itemObj: {
type: Object,
default: () => {
return {};
},
},
value: {},
row: {
type: Object,
default: () => {
return {
test: "2023-07-23",
};
},
},
low: {
type: String,
default: "",
},
up: {
type: String,
default: "",
},
},
data() {
return {
datedateRangePickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
computed: {
dateData: {
get() {
return this.value;
},
set(val) {
this.$emit("input", val);
},
},
DatePickerOptions() {
return {
disabledDate: (time) => {
if (this.low && this.row[this.low]) {
//
if (this.row[this.low].includes("T")) {
return time.getTime() < new Date(this.row[this.low]);
} else {
return (
time.getTime() < new Date(this.row[this.low] + "T00:00:00")
);
}
}
if (this.up && this.row[this.up]) {
//
if (this.row[this.up].includes("T")) {
return time.getTime() > new Date(this.row[this.up]);
} else {
return time.getTime() > new Date(this.row[this.up] + "T00:00:00");
}
}
},
shortcuts: [
{
text: "今天",
onClick(picker) {
picker.$emit("pick", new Date());
},
},
{
text: "昨天",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit("pick", date);
},
},
{
text: "一周前",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", date);
},
},
],
};
},
},
watch: {},
};
</script>

View File

@ -1,48 +0,0 @@
<template>
<div class="block">
<el-date-picker
v-model="value"
type="datetime"
placeholder="选择日期时间"
align="right"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
</template>
<script>
export default {
data() {
return {
pickerOptions: {
shortcuts: [
{
text: "今天",
onClick(picker) {
picker.$emit("pick", new Date());
},
},
{
text: "昨天",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit("pick", date);
},
},
{
text: "一周前",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", date);
},
},
],
},
value: "",
};
},
};
</script>

View File

@ -1,99 +0,0 @@
<template>
<el-dialog
class="base-dialog"
:title="title"
:visible.sync="dialogVisible"
:width="width"
:fullscreen="false"
append-to-body
top="5vh"
:close-on-click-modal="false"
@open="$emit('open')"
@close="$emit('close')"
>
<slot></slot>
<span slot="footer" class="dialog-footer" v-if="footerShow">
<el-button @click="closeHandle"> </el-button>
<el-button v-if="resetting"> </el-button>
<el-button
type="primary"
v-if="!lookFlag"
:loading="loading"
@click="handleConfirmClick"
> </el-button
>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
fullscreen: {
type: Boolean,
default: false,
},
value: Boolean,
title: String,
lookFlag: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
resetting: {
type: Boolean,
default: false,
},
footerShow: {
type: Boolean,
default: true,
},
width: {
type: String,
default: "80%",
},
},
data() {
return {};
},
computed: {
dialogVisible: {
get() {
return this.value;
},
set(val) {
this.$emit("input", val);
},
},
},
methods: {
closeHandle() {
this.dialogVisible = false;
return
this.$confirm("是否关闭表单?", "提示", {
confirmButtonText: "关闭",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.dialogVisible = false;
})
.catch(() => {});
},
handleConfirmClick() {
this.$emit("confirm");
},
},
beforeDestroy() {
console.log(11);
},
};
</script>
<style scoped>
.base-dialog >>> .el-dialog__body {
max-height: 80vh;
overflow: auto;
}
</style>

View File

@ -1,100 +0,0 @@
//
<template>
<el-form ref="form" :model="form" :inline="true">
<el-row
:gutter="0"
v-for="(row, index) in list"
:key="index"
style="margin-bottom: 0px"
label-width="100px"
label-position="top"
>
<el-col
v-for="(item, indexRow) in row.elCol"
:span="item.span ? item.span : 6"
:key="indexRow"
>
<base-form-item :key="item.id">
<!-- 输入框 输入数据绑定item.value -->
<span>{{ item.title }}</span>
<template v-if="item.type === 'input'">
<el-input
:rows="2"
clearable
v-model="item.value"
:placeholder="item.placeholder"
:maxlength="item.maxlength ? item.maxlength * 1 : ''"
></el-input>
</template>
<!-- 下拉框 输入数据绑定item.value-->
<template v-else-if="item.type === 'select'">
<BaseSelect :itemObj="item"></BaseSelect>
</template>
<!-- 单选框 输入数据绑定item.value -->
<template v-else-if="item.type === 'radio'">
<BaseRabio :itemObj="item"></BaseRabio>
</template>
<!-- 日期选择 -->
<template v-else-if="item.type === 'datepick'">
<BaseDatePick :itemObj="item"></BaseDatePick>
</template>
<!-- treeselect -->
<template v-else-if="item.type === 'treeselect'">
<treeselect
v-model="item.value"
:normalizer="item.normalizer"
:options="delTreeChildren(item.options)"
:multiple="item.multiple ? row.multiple : false"
:disabled="item.disabled && !newFlag ? item.disabled : false"
@clear="treeSelectClear"
ref="selectTree"
:placeholder="!item.placeholder ? '请选择' : item.placeholder"
@select="selectTree"
/>
</template>
</base-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import BaseDatePick from "./baseDatePicker.vue";
import BaseRabio from "./baseRadio.vue";
import BaseFormItem from "./baseFormItem.vue";
import BaseSelect from "./baseSelect";
export default {
props: {
//
list: {
type: Array,
default: [],
},
},
data() {
return {
form: {},
};
},
methods: {
selectTree(node, instanceId) {
this.$emit("selectTree", node);
},
treeSelectClear() {
this.$refs.selectTree.clear();
},
},
created() {
console.log(this.list);
},
components: {
BaseFormItem,
BaseSelect,
BaseRabio,
BaseDatePick,
},
};
</script>
<style scoped lang='scss'>
</style>

View File

@ -1,21 +0,0 @@
<template>
<el-form-item :label="label" class="formitem" :style="`display: flex;`">
<slot></slot>
</el-form-item>
</template>
<script>
export default {
props: {
label: {
type: String,
},
},
};
</script>
<style scoped lang="scss">
.formitem {
margin-right: 20px;
}
</style>

View File

@ -1,554 +0,0 @@
<template>
<div class="link" ref="link">
<div class="left">
<div class="title">
<h1>执行动作入参数</h1>
</div>
<template v-for="(item, index) in leftData">
<div class="treebox">
<div class="tree" :key="index">
<span>{{ item.label }}</span>
<span style="font-size: 12px; color: gray; padding-left: 10px">{{
item.type
}}</span>
</div>
<div class="btn">
<el-checkbox-button
v-model="item.value"
@change="(val, $event) => leftCheckBoxHandle(val, item, $event)"
>+</el-checkbox-button
>
</div>
</div>
<template v-if="item.children">
<template v-for="(item01, index01) in item.children">
<div class="treebox">
<div class="tree" style="margin-left: 15px">
<span>{{ item01.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item01.type }}</span
>
</div>
<div class="btn">
<el-checkbox-button
v-model="item01.value"
@change="
(val, $event) => leftCheckBoxHandle(val, item01, $event)
"
>+</el-checkbox-button
>
</div>
</div>
<template v-if="item01.children">
<template v-for="(item02, index02) in item01.children">
<div class="treebox">
<div class="tree" style="margin-left: 30px">
<span>{{ item02.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item02.type }}</span
>
</div>
<div class="btn">
<el-checkbox-button
v-model="item02.value"
@change="
(val, $event) => leftCheckBoxHandle(val, item02, $event)
"
>+</el-checkbox-button
>
</div>
</div>
<template v-if="item02.children">
<template v-for="(item03, index03) in item02.children">
<div class="treebox">
<div class="tree" style="margin-left: 30px">
<span>{{ item03.label }}</span>
<span
style="
font-size: 12px;
color: gray;
padding-left: 10px;
"
>{{ item03.type }}</span
>
</div>
<div class="btn">
<el-checkbox-button
v-model="item03.value"
@change="
(val, $event) =>
leftCheckBoxHandle(val, item03, $event)
"
>+</el-checkbox-button
>
</div>
</div>
</template>
</template>
</template>
</template>
</template>
</template>
</template>
</div>
<div class="svg" :style="{ height: svgHeight }">
<svg
ref="svg"
class="line"
xmlns="http://www.w3.org/2000/svg"
:style="{ height: svgHeight }"
style="position: absolute; z-index: 2; width: 300px"
version="1.1"
>
<line
v-for="item in line"
:key="item.leftid"
:x1="item.x1"
:y1="item.y1"
:x2="item.x2"
:y2="item.y2"
style="stroke: blue; stroke-width: 1; z-index: 999"
/>
</svg>
</div>
<div class="right">
<div class="title">
<h1>API入参</h1>
</div>
<template v-for="(item, index) in rightData">
<div class="treebox">
<div class="btn">
<el-checkbox-button
size="mini"
class="layers-item-selector"
v-model="item.value"
@change="(val, $event) => rightCheckBoxHandle(val, item, $event)"
>+</el-checkbox-button
>
</div>
<div class="tree" :key="index">
<span>{{ item.label }}</span>
<span style="font-size: 12px; color: gray; padding-left: 10px">{{
item.type
}}</span>
</div>
</div>
<template v-if="item.children">
<template v-for="(item01, index01) in item.children">
<div class="treebox">
<div class="btn">
<el-checkbox-button
v-model="item01.value"
@change="
(val, $event) => rightCheckBoxHandle(val, item01, $event)
"
>+</el-checkbox-button
>
</div>
<div class="tree" style="margin-left: 15px">
<span>{{ item01.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item01.type }}</span
>
</div>
</div>
<template v-if="item01.children">
<template v-for="(item02, index02) in item01.children">
<div class="treebox">
<div class="btn">
<el-checkbox-button
v-model="item02.value"
@change="
(val, $event) =>
rightCheckBoxHandle(val, item02, $event)
"
>+</el-checkbox-button
>
</div>
<div class="tree" style="margin-left: 30px">
<span>{{ item02.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item02.type }}</span
>
</div>
</div>
</template>
</template>
</template>
</template>
</template>
</div>
</div>
</template>
<script>
export default {
data() {
return {
leftData: [
{
label: "一级 1",
id: 1,
type: "Object",
children: [
{
label: "二级 1-1",
id: 2,
type: "Object",
children: [
{
id: 3,
label: "三级 1-1-1",
type: "string",
},
],
},
],
},
{
id: 4,
label: "一级 2",
type: "Object",
children: [
{
id: 5,
label: "二级 2-1",
type: "Object",
children: [
{
id: 6,
label: "三级 2-1-1",
type: "String",
},
],
},
{
id: 7,
label: "二级 2-2",
type: "Object",
children: [
{
id: 8,
label: "三级 2-2-1",
type: "String",
},
],
},
],
},
{
id: 9,
label: "一级 3",
type: "Object",
children: [
{
id: 10,
label: "二级 3-1",
type: "Object",
children: [
{
id: 11,
label: "三级 3-1-1",
type: "Object",
},
],
},
{
id: 12,
label: "二级 3-2",
type: "Object",
children: [
{
id: 13,
label: "三级 3-2-1",
type: "Object",
},
],
},
],
},
],
rightData: [
{
label: "一级 1",
id: 1,
type: "Object",
children: [
{
label: "二级 1-1",
id: 2,
type: "Object",
children: [
{
id: 3,
label: "三级 1-1-1",
type: "string",
},
],
},
],
},
{
id: 4,
label: "一级 2",
type: "Object",
children: [
{
id: 5,
label: "二级 2-1",
type: "Object",
children: [
{
id: 6,
label: "三级 2-1-1",
type: "String",
},
],
},
{
id: 7,
label: "二级 2-2",
type: "Object",
children: [
{
id: 8,
label: "三级 2-2-1",
type: "String",
},
],
},
],
},
{
id: 9,
label: "一级 3",
type: "Object",
children: [
{
id: 10,
label: "二级 3-1",
type: "Object",
children: [
{
id: 11,
label: "三级 3-1-1",
type: "Object",
},
],
},
{
id: 12,
label: "二级 3-2",
type: "Object",
children: [
{
id: 13,
label: "三级 3-2-1",
type: "Object",
},
],
},
],
},
],
defaultProps: {
children: "children",
label: "label",
},
leftActive: {},
rightActive: {},
line: [],
leftActiveItem: {},
rightActiveItem: {},
svgHeight: 0,
};
},
methods: {
leftCheckBoxHandle(val, item, e) {
// console.log(val, item.id, e);
if (val) {
let svginfo = this.$refs.svg.getBoundingClientRect();
let info = e.target.getBoundingClientRect();
this.leftActiveItem = item;
this.leftActive["leftid"] = item.id;
this.leftActive["x1"] = svginfo.x - info.x - 25;
this.leftActive["y1"] = info.y - svginfo.y + 10;
if (this.leftActive.leftid && this.rightActive.rightid) {
// let obj = {};
// obj["yOffset"] =
// Math.abs(this.rightActive["y2"] - this.leftActive["y1"]) / 2;
// obj["centerY "] =
// this.rightActive["y2"] < this.leftActive["y1"]
// ? this.rightActive["y2"] + obj["yOffset"]
// : this.rightActive["y2"] - obj["yOffset"];
// obj["xOffset"] =
// Math.abs(this.rightActive["x2"] - this.leftActive["x1"]) / 2;
// obj["centerX"] =
// this.rightActive["x2"] < this.leftActive["x1"]
// ? this.rightActive["x2"] + obj["xOffset"]
// : this.rightActive["x2"] - obj["xOffset"];
this.line.push({ ...this.leftActive, ...this.rightActive });
this.$set(this.leftActiveItem, "isline", true);
this.$set(this.rightActiveItem, "leftid", this.leftActiveItem.id);
this.$set(this.leftActiveItem, "rightid", this.rightActiveItem.id);
this.$set(this.rightActiveItem, "isline", true);
this.leftActive = {};
this.rightActive = {};
}
this.deepSearchBox(this.leftData, item.id);
} else {
if (item.isline) {
console.log(item);
this.line = this.line.filter((ele) => {
return ele.leftid != item.id;
});
this.cloaseBox(this.rightData, item.rightid);
item.isline = false;
} else {
this.leftActive = {};
this.leftActiveItem = {};
}
}
},
rightCheckBoxHandle(val, item, e) {
// console.log(val, item.id, e);
if (val) {
let svginfo = this.$refs.svg.getBoundingClientRect();
let info = e.target.getBoundingClientRect();
this.rightActiveItem = item;
this.rightActive["rightid"] = item.id;
this.rightActive["x2"] = info.x - svginfo.x;
this.rightActive["y2"] = info.y - svginfo.y + 10;
if (this.leftActive.leftid && this.rightActive.rightid) {
this.line.push({ ...this.leftActive, ...this.rightActive });
this.$set(this.leftActiveItem, "isline", true);
this.$set(this.leftActiveItem, "rightid", this.rightActiveItem.id);
this.$set(this.rightActiveItem, "leftid", this.leftActiveItem.id);
this.$set(this.rightActiveItem, "isline", true);
item["isline"] = true;
this.leftActive = {};
this.rightActive = {};
}
this.deepSearchBox(this.rightData, item.id);
} else {
if (item.isline) {
console.log(item);
this.line = this.line.filter((ele) => {
return ele.rightid != item.id;
});
this.cloaseBox(this.leftData, item.leftid);
item.isline = false;
} else {
this.rightActive = {};
this.rightActiveItem = {};
}
}
},
deepSearchBox(arr, id) {
arr.forEach((item) => {
if (item.id != id && item.value && !item.isline) {
item.value = false;
}
if (item.children && item.children.length) {
this.deepSearchBox(item.children, id);
}
});
},
cloaseBox(arr, id) {
arr.some((item) => {
if (item.id == id) {
item.value = false;
item.isline = false;
return true;
} else if (item.children && item.children.length) {
this.cloaseBox(item.children, id);
}
});
},
handleNodeClick(data) {
console.log(data);
},
},
mounted() {},
};
</script>
<style scoped lang="scss">
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
min-width: 700px;
}
.link {
width: 100%;
padding: 20px;
display: flex;
background-color: #fff;
height: auto;
.left {
width: 300px;
.title {
border-bottom: 1px solid #ccc;
padding-bottom: 20px;
}
.treebox {
margin-top: 30px;
display: flex;
align-items: center;
justify-content: space-between;
.btn {
margin-right: 5px;
}
}
}
.right {
width: 300px;
.title {
display: flex;
justify-content: flex-end;
border-bottom: 1px solid #ccc;
padding-bottom: 20px;
}
.treebox {
align-items: center;
margin-top: 30px;
display: flex;
.btn {
margin-right: 60px;
}
}
}
.svg {
width: 300px;
}
svg {
background-color: #fafafa;
}
}
</style>
<style lang="scss">
.el-checkbox-button__inner {
width: 20px;
height: 20px;
line-height: 15px;
background-color: #ffffff;
border: solid 1px #cccccc;
border-radius: 50% !important;
font-size: 12px !important;
cursor: pointer;
padding: 0 !important;
z-index: 3;
}
.layers-item-selector .is-checked {
background-color: skyblue !important;
}
</style>

View File

@ -1,463 +0,0 @@
<!--
* @name: 弹窗配置
* @author: zhangpengcheng
* @date: 2022-08-25
-->
<template>
<!-- 权限设置弹框 -->
<!-- :style="{'margin':isCenter?'auto':''}"> -->
<div style="padding: 16px; height: 100%">
<div flex="cross:center" v-if="filterShow" style="margin-bottom: 5px">
<el-input
placeholder="输入关键字进行过滤"
v-model="filterText"
style="margin-right: 13px"
></el-input>
<el-button
icon="el-icon-plus"
style="height: 32px; line-height: 32px; padding: 0 13px !important"
@click="add"
v-if="filterButtonShow"
>
</el-button>
</div>
<div
flex="dir:top cross:center main:center"
style="margin: auto; height: calc(100% - 22px); overflow: auto"
class="treeBodyHeight"
>
<div class="menu-i" flex="cross:center main:center">
<div class="menu-i-t" flex="cross:top main:justify">
<el-tree
:data="menuData"
:check-strictly="true"
:default-checked-keys="selectData"
v-loading="treeLoading"
@node-click="handleNodeClick"
:expand-on-click-node="false"
:default-expand-all="expandAll"
:filter-node-method="filterNode"
:props="treeProps"
style="width: 100%; background-color: transparent"
@check-change="checkChange"
node-key="id"
ref="elTree"
:show-checkbox="showCheckbox"
>
<div
flex="cross:center main:justify"
style="width: calc(100% - 31px)"
slot-scope="{ node, data }"
>
<p
class="nowrap"
style="
flex: 1;
font-size: 12px;
height: 32px;
line-height: 32px;
"
@dblclick="dbTree(node, data)"
>
{{ nodeLabel == "" ? node.label : node.label[nodeLabel] }}
</p>
<div style="width: 60px" v-if="treeButton">
<el-button
type="text"
size="mini"
icon="el-icon-plus"
v-if="appendButton"
@click.stop="() => append(node, data)"
>
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-if="reviseButton"
@click.stop="() => revise(node, data)"
>
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
v-if="removeButton"
@click.stop="() => remove(node, data)"
>
</el-button>
</div>
</div>
</el-tree>
<div @click="changePcAll" class="checkText" v-if="Allshow">全选</div>
</div>
</div>
<div flex="cross:center main:center" style="width: 100%" v-if="isSaveBtn">
<el-button style="width: 40%" type="primary" @click="saveMenuUser"
>保存</el-button
>
</div>
</div>
</div>
</template>
<script>
// import { queryMenuList, menuListSave } from '@/api/apis/auth'
export default {
props: {
//
expandAll: {
type: Boolean,
default: true,
},
//
treeButton: {
type: Boolean,
default: false,
},
//
filterButtonShow: {
type: Boolean,
default: false,
},
//
isSaveBtn: {
type: Boolean,
default: false,
},
//
Allshow: {
type: Boolean,
default: false,
},
//
showCheckbox: {
type: Boolean,
default: false,
},
//
isCenter: {
type: Boolean,
default: true,
},
//
filterShow: {
type: Boolean,
default: false,
},
menuData: {
type: Array,
default: () => {
return [];
},
},
setting: {
type: Boolean,
default: false,
},
treeLoading: {
type: Boolean,
default: false,
},
appendButton: {
type: Boolean,
default: true,
},
reviseButton: {
type: Boolean,
default: true,
},
removeButton: {
type: Boolean,
default: true,
},
nodeLabel: {
type: String,
default: "",
},
treeProps: {
type: Object,
default() {
return {
children: "children",
label: "label",
};
},
},
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val;
// document.getElementsByTagName('body')[0].style.setProperty('--active', val)
// let arr = document.getElementsByClassName('.el-tree-node:focus>.el-tree-node__content')
// $('.el-tree-node:focus>.el-tree-node__content').css('color',val)
},
immediate: true,
},
filterText(val) {
this.$refs.elTree.filter(val);
},
},
data() {
return {
filterText: "",
theme: "",
powerDlog: false,
// ids
selectData: [],
//
// treeProps: {
// label: 'menuName',
// children: 'id',
// },
// treeProps: {
// children: 'children',
// label: 'label'
// },
// PC
checkedAllPc: false,
//
outing: false,
};
},
created() {},
mounted() {},
computed: {
defaultTheme() {
return this.$store.state.settings.theme;
},
},
methods: {
clickFirst() {
document.querySelectorAll(".is-focusable")[0].click();
},
setCurrentKey(selectId) {
this.$nextTick(() => {
this.$refs.elTree.setCurrentKey(selectId);
});
},
dbTree(node, data) {
this.setCurrentKey(null);
},
//
append(node, data) {
this.$emit("append", data);
},
//
revise(node, data) {
this.$emit("revise", data);
},
//
remove(node, data) {
this.$emit("remove", data);
},
add() {
this.$emit("add");
},
filterNode(value, data, node) {
if (!value) return true;
let nodeData =
this.nodeLabel == ""
? data[this.treeProps.label]
: data[this.treeProps.label][this.nodeLabel];
return nodeData.indexOf(value) !== -1;
},
buttonL(el) {
el.active = !el.active;
this.$forceUpdate();
},
setData(id) {
this.selectData.push(id);
},
saveMenuUser() {
let allKeys = this.getKey();
this.$emit("onSaveMenu", allKeys);
},
// key
getKey() {
return this.$refs.elTree.getCheckedKeys();
},
//
initData() {
//
// this.menuData = [];
// ids
this.selectData = [];
},
//
handleClose() {
this.powerDlog = false;
this.initData();
},
//
changePcAll() {
this.checkedAllPc = !this.checkedAllPc;
let selectData = [];
if (this.checkedAllPc) {
selectData = this.cycleData(this.menuData);
}
this.selectData = selectData;
},
/**
* @description 递归获取菜单id树状 多叉树结构
* @author duanyipeng
* @createDate 2020/7/31 20:54
* @param {Array} outData 需要递归的数组
* @param {Boolean} isSelect: false返回所有id,true返回已选择id
*/
cycleData(outData, isSelect) {
let newData = [];
function cycle(data) {
if (!data || data.length == 0) {
return false;
} else {
for (var i = 0, len = data.length; i < len; i++) {
let item = data[i];
if (isSelect && item.selected == 1) {
newData.push(item.id);
}
if (!isSelect) {
newData.push(item.id);
}
cycle(item.id);
}
}
}
cycle(outData);
return newData;
},
getData(childIds) {
let newData = [];
function cycle(data) {
data.forEach((el) => {
childIds.forEach((item) => {
if (el.id == item) {
newData.push(el);
}
});
if (el.children != null && el.children && el.children.length) {
cycle(el.children, childIds);
}
});
}
cycle(this.menuData, childIds);
return newData;
},
/**
* @description 节点选中状态发生变化时的回调
* @author duanyipeng
* @createDate 2020/7/31 20:53
* @param { Object } nodeDode 当前节点对象
* @param { Boolean } checked 当前节点是否选中
*/
checkChange(nodeDode, checked) {
let getHalfCheckedKeys = this.$refs.elTree
.getCheckedKeys()
.concat(this.$refs.elTree.getHalfCheckedKeys());
// let getHalfCheckedKeys = this.$refs.elTree.getHalfCheckedKeys()
let childIds =
getHalfCheckedKeys.length != 0 ? getHalfCheckedKeys : this.selectData;
let checkdata = this.getData(childIds);
this.$emit("checkChange", childIds, checkdata);
return;
let id = nodeDode.id;
// let childIds = this.cycleData(id)
//
childIds.forEach((item) => {
this.$refs.elTree.setChecked(item, checked);
});
},
//
handleNodeClick(data) {
this.$emit("handleNodeClick", data);
},
},
};
</script>
<style lang="scss">
// $activeColor:val(--activeColor, "#00aaff");
.nowrap {
/*让长段文本不换行*/
white-space: nowrap;
/*设置文本超出元素宽度部分隐藏*/
overflow-x: hidden;
/*设置文本超出部分用省略号显示*/
text-overflow: ellipsis;
}
.el-tree-node__content {
height: 32px !important;
}
.el-tree-node__label {
// font-size: 16px !important;
margin-left: 4px;
}
.el-tree-node__content > label.el-checkbox {
transform: scale(1.3);
}
.el-tree-node__content > .el-tree-node__expand-icon {
font-size: 18px;
}
.el-checkbox__label {
font-size: 16px;
}
.checkBox .el-checkbox__inner {
transform: scale(1.3);
}
</style>
<style lang="scss" scoped>
.el-tree-node.is-current > .el-tree-node__content .el-button--text {
color: white;
}
.menu-i {
width: 100%;
// margin-bottom: 24px;
height: 100%;
&-f {
color: #52575a;
font-size: 18px;
text-align: center;
margin-bottom: 12px;
}
&-t {
width: 100%;
height: 100%;
// height: 450px;
// border: 1px solid #d8d8d8;
// overflow-y: auto;
}
}
.checkBox {
margin-top: 6px;
margin-right: 12px;
}
.checkText {
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
color: #333;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease-in-out;
&:hover {
color: #ecf5ff;
}
}
</style>

View File

@ -1,928 +0,0 @@
<!--
* @name: 自定义表单组件
* @author: zhangpengcheng
* @date: 2022-08-24
-->
<template>
<el-form
validate-on-rule-change
:model="ruleForm"
:rules="rules"
:label-position="labelPosition"
:ref="refName"
:label-width="labelWidth"
>
<el-row
:gutter="0"
v-for="(item, index) in formRow"
:key="index"
style="margin-bottom: 10px"
>
<el-col
v-for="(row, indexRow) in item.elCol"
:span="row.row ? row.row * 1 : spanNumber"
:key="row.id"
>
<el-form-item
:prop="row.id"
:style="`display: flex;margin-bottom: ${marginBottom}px;padding:0 10px`"
v-if="row.show != false"
:class="rules[row.id] ? 'ruleFormClass ' : ''"
:rules="
formRule
? [
{
required: row.required,
message: `${row.title}不能为空`,
trigger: row.type === 'input' ? 'change' : 'blur',
},
...(row.pattern && row.message
? [
{
pattern: row.pattern,
message: row.message,
trigger: 'blur',
},
]
: []),
]
: []
"
>
<div
class="single label"
v-if="row.label || row.title"
slot="label"
:style="`` + `justify-content: ${justifyContent};`"
flex
>
<span
class="label"
:style="`font-size:${
row.fontSize ? row.fontSize + 'px' : '13px'
}`"
>
<span v-if="row.required" style="color: red">*</span>
{{ row.title }}:
</span>
</div>
<template v-if="!lookFlag">
<el-checkbox
v-model="ruleForm[row.id]"
v-if="row.type == 'onecheck'"
:disabled="disabled"
>
</el-checkbox>
<el-input
v-model="ruleForm[row.id]"
clearable
:disabled="disabled || (row.disabledOfId?Boolean(ruleForm.id):row.disabled) "
:rows="row.rows ? row.rows : 2"
:type="row.type ? row.type : 'text'"
:maxlength="row.maxlength ? row.maxlength * 1 : '99'"
:placeholder="!row.placeholder ? '请输入' : row.placeholder"
v-if="
row.tag === 'elInput' || (row.type === 'input' && !lookFlag)
"
@blur="searchByStationName(row.id,ruleForm)"
min="1"
@input="row.rules ? integerNumber(row) : ''"
@dblclick.native="row.double?dblclick(ruleForm[row.id]):''"
@change="$emit('onInput')"
>
</el-input>
<el-input
type="number"
v-if="row.type === 'num'"
v-model="ruleForm[row.id]"
style="width: 100%"
:disabled="(row.disabled && !newFlag ? row.disabled : false) || disabled"
:precision="row.precisionNum ? row.precisionNum : 0"
:placeholder="!row.placeholder ? '请输入' : row.placeholder"
:step="row.stepNum ? row.stepNum : 1"
@change="handleChange"
@input="(val) => limitPhoneNum(val, ruleForm, row.id)"
:maxlength="row.maxlength ? row.maxlength * 1 : 50"
:min="1"
:max="row.max ? row.max : 255"
:label="!row.placeholder ? '描述文字' : row.placeholder"
>
<template slot="append" v-if="row.message">{{ row.message }}</template>
</el-input
>
<el-switch
v-if="row.type === 'switch' && !lookFlag"
v-model="ruleForm[row.id]"
:active-text="row.activeText"
@change="switchChange($event, index, indexRow, row)"
:inactive-text="row.inactiveText"
:active-value="row.activeValue ? row.activeValue : true"
:inactive-value="
row.inactiveValue || row.inactiveValue == 0
? row.inactiveValue
: false
"
>
</el-switch>
<baseDatePicker
class="w-100"
v-model="ruleForm[row.id]"
v-if="
row.tag === 'elDatePicker' ||
(row.type === 'datepick' && !lookFlag)
"
:disabled="row.disabled && !newFlag"
:datePickerType="formRule ? 'date' : 'daterange'"
>
</baseDatePicker>
<baseDatePicker
class="w-100"
v-model="ruleForm[row.id]"
v-if="row.type === 'datetiempick' && !lookFlag"
:disabled="row.disabled && !newFlag"
datePickerType="datetime"
>
</baseDatePicker>
<el-radio-group
v-model="ruleForm[row.id]"
v-if="
row.tag === 'elRadio' || (row.type === 'radio' && !lookFlag)
"
@input="changeRadio($event, index, indexRow, row)"
:disabled="row.disabled && !newFlag ? row.disabled : false"
>
<el-radio v-for="el in row.options" :label="el.id" :key="el.id">{{
el.label
}}
</el-radio>
</el-radio-group>
<el-input
type="textarea"
v-if="row.type === 'textrea' && !lookFlag"
resize="none"
:rows="4"
placeholder="请输入内容"
show-word-limi
v-model="ruleForm[row.id]"
:disabled="row.disabled && !newFlag"
>
</el-input>
<el-select
class="w-100"
v-model="ruleForm[row.id]"
filterable
:multiple="row.multiple"
@change="selectChange($event, index, indexRow, row)"
:disabled="row.disabled || disabled"
:clearable="row.clearable ? row.clearable : true"
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
v-if="
row.tag === 'select' || (row.type === 'select' && !lookFlag)
"
>
<el-option
v-for="(el, index) in row.options"
:key="!row.optionValue ? el['id'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
:value="!row.optionValue ? el['id'] : el[row.optionValue]"
>
</el-option>
</el-select>
<baseNewSelect
:ref="row.refName"
:apiInfo="row.apiInfo"
:searchApiInfo="row.searchApiInfo"
v-if="row.type === 'newSelect'"
v-model="ruleForm[row.id]"
:itemObj="row"
@showValue="showValueHandle"
:idKey="row.id"
:journalingType="row.journalingType"
:prop="row.prop"
:foucus="row.foucus"
:apiBody="row.apiBody"
:searchKey="row.searchKey"
@selectChange="selectChangeHanlde"
>
</baseNewSelect>
<slot
:name="row.slotName"
v-if="row.type === 'elSlot'"
:row="{row,ruleForm}"
></slot>
</template>
<template v-else>
<div
v-if="
row.type !== 'radio' &&
row.type !== 'newSelect' &&
row.type !== 'select' &&
lookFlag
"
>
{{ ruleForm[row.id] }}
</div>
<baseNewSelect
:disabled="true"
:ref="row.refName"
:apiInfo="row.apiInfo"
:searchApiInfo="row.searchApiInfo"
v-if="row.type === 'newSelect'"
v-model="ruleForm[row.id]"
:itemObj="row"
@showValue="showValueHandle"
:idKey="row.id"
:journalingType="row.journalingType"
:prop="row.prop"
:foucus="row.foucus"
:apiBody="row.apiBody"
:searchKey="row.searchKey"
>
</baseNewSelect>
<el-radio-group
v-model="ruleForm[row.id]"
v-if="row.type === 'radio'"
@input="changeRadio($event, index, indexRow, row)"
:disabled="true"
>
<el-radio v-for="el in row.options" :label="el.id" :key="el.id">{{
el.label
}}
</el-radio>
</el-radio-group>
<el-checkbox-group
class="w-100"
v-if="row.type === 'checkbox'"
v-model="ruleForm[row.id]"
>
{{ 123 }}
<el-checkbox
v-for="(el, index) in row.options"
:key="el.id"
:label="el.id"
>{{ el.label }}
</el-checkbox
>
</el-checkbox-group>
<baseCascader
v-if="row.type === 'treeselect'"
v-model="ruleForm[row.id]"
:disabled="row.disabled && !newFlag"
:itemObj="row"
:ruleForm="ruleForm"
:lookflag="lookFlag"
class="w-100"
></baseCascader>
<el-select
class="w-100"
v-model="ruleForm[row.id]"
filterable
@change="selectChange($event, index, indexRow, row)"
:disabled="true"
:clearable="row.clearable ? row.clearable : true"
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
v-if="row.type === 'select' && lookFlag"
>
<el-option
v-for="(el, index) in row.options"
:key="!row.optionValue ? el['id'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
:value="!row.optionValue ? el['id'] : el[row.optionValue]"
>
</el-option>
</el-select>
</template>
<slot :name="row.slotName" v-if="row.tag === 'elSlot'"></slot>
</el-form-item>
</el-col>
</el-row>
<slot name="main"></slot>
<el-form-item v-if="false" style="margin-top: 20px; padding: 0 20px">
<!-- flex="cross:center main:center" -->
<div flex="main:right">
<el-button
v-if="isFunBtn"
class="saveBtn"
type="primary"
:loading="loading"
@click="submitForm(refName)"
>提交
</el-button
>
<el-button v-if="!lookFlag" @click="resetForm(refName)">重置</el-button>
<el-button v-if="isFunBtn" @click="close()">取消</el-button>
</div>
</el-form-item>
</el-form>
</template>
<script>
import baseCascader from './baseCascader/index.vue'
import { deepClone } from '@/utils/index.js'
import baseDatePicker from './baseDatePicker.vue'
import baseNewSelect from './baseNewSelect'
import { checkMobile } from '@/utils/util'
import { BaseSelect } from './baseSelect.vue'
export default {
components: {
// uploadFile,
// customCascader
baseNewSelect,
baseDatePicker,
baseCascader,
BaseSelect
},
props: {
labelWidth: {
type: String,
default: '80px'
},
labelPosition: {
type: String,
default: 'top'
},
// loading
loading: {
type: Boolean,
default: false
},
//
formRule: {
type: Boolean,
default: true
},
refName: {
type: String,
default: 'ruleForm'
},
//
newFlag: {
type: Boolean,
default: false
},
//
lookFlag: {
type: [Boolean, String],
default: false
},
//
spanNumber: {
type: Number,
default: 12
},
spanWidth: {
type: String,
default: '200px'
},
//
rules: {
type: Object,
default: () => {
return {}
}
},
//
formRow: {
type: Array,
default: () => {
return []
}
},
//
disabled: {
type: Boolean,
default: false
},
//
isFunBtn: {
type: Boolean,
default: true
},
formdata: {
type: Object
},
justifyContent: {
type: String,
default: 'flex-end'
},
marginBottom: {
type: String,
default: '0'
},
ruleForm: {
type: Object,
default: () => {
return {}
}
},
tableColumn: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
pickerOptionsSearch: {
shortcuts: [
{
text: '本月',
onClick(picker) {
picker.$emit('pick', [new Date(), new Date()])
}
},
{
text: '今年至今',
onClick(picker) {
const end = new Date()
const start = new Date(new Date().getFullYear(), 0)
picker.$emit('pick', [start, end])
}
},
{
text: '最近六个月',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 6)
picker.$emit('pick', [start, end])
}
}
]
},
//
// ruleForm: {},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
},
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
tempFormData: {}
}
},
watch: {
ruleForm: {
immediate: true, //
deep: true, //
handler(newVal, oldVal) {
this.$emit('dataChanges')
}
}
},
created() {
this.tempFormData = deepClone(this.ruleForm)
},
mounted() {
// this.ruleForm = this.formdata
},
computed: {},
methods: {
dblclick(val) {
this.$emit('dblclick', val)
},
selectChangeHanlde(val, row) {
console.log(val, row, 111)
this.$emit('selectChange', val, row)
},
showValueHandle() {
},
limitPhoneNum(value, data, id) {
if (value.toString().length > 11) {
data[id] = value.toString().slice(0, 11)
}
},
selectShow(row) {
try {
this.$emit('selectFormSearch', row)
} catch (error) {
console.log(this.ruleForm, row, '23232出错了')
}
},
close() {
this.$emit('closeDialog')
},
integerNumber(row) {
// row.rules?(v)=>()):''
// @input="(v)=>(row.row.number=v.replace(/[^\d]/g,''))"
// if(this.ruleForm[row.prop].replace(/[^\d]/g,'')){
// return this.ruleForm[row.prop].replace(/[^\d]/g,'')
//
// integer
if (row.rulesName == 'integer') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '')
}
// decimal
if (row.rulesName == 'decimal') {
this.ruleForm[row.id] = this.ruleForm[row.id]
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
.replace(/^\./g, '')
}
//
if (row.rulesName == 'identity') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
''
)
}
//
if (row.rulesName == 'phone') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^1(3|4|5|7|8|9)\\d{9}$/,
''
)
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/^1[3,4,5,6,7,8,9][0-9]{9}$/, '')
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/1(\d{2})\d{4}(\d{4})/g,'').replace(/[^\d]/g, '')
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/\.{11,}/g, '')
// /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
}
//
if (row.rulesName == 'eMail') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/,
''
)
}
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g,'')
},
//
searchByStationName(type, form) {
this.$emit('inputBlur', type, form)
if (type == 'address') {
let address = this.ruleForm[type]
let that = this
var map = new BMap.Map('container')
map.centerAndZoom(address, 18)
map.enableScrollWheelZoom() //
map.enableContinuousZoom() //
map.addControl(new BMap.NavigationControl()) //
map.addControl(new BMap.OverviewMapControl()) //
map.addControl(
new BMap.OverviewMapControl({
isOpen: true,
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
})
) //
var localSearch = new BMap.LocalSearch(map)
localSearch.enableAutoViewport() //
map.clearOverlays() //
var keyword = address
localSearch.setSearchCompleteCallback(function(searchResult) {
var poi = searchResult.getPoi(0)
map.centerAndZoom(poi.point, 13)
var marker = new BMap.Marker(
new BMap.Point(poi.point.lng, poi.point.lat)
) //
map.addOverlay(marker)
var content =
keyword +
'<br/><br/>经度:' +
poi.point.lng +
'<br/>纬度:' +
poi.point.lat
that.ruleForm['lng'] = poi.point.lng
that.ruleForm['lat'] = poi.point.lat
var infoWindow = new BMap.InfoWindow(
'<p style=\'font-size:14px;\'>' + content + '</p>'
)
marker.addEventListener('click', function() {
this.openInfoWindow(infoWindow)
})
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //
})
localSearch.search(keyword)
}
},
//
handleChange(val) {
this.$emit('handleChange', val)
},
//
getImage(imagePath) {
let licenseImg = imagePath.join(',')
},
//
getbeforeImgList(imagePath) {
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
},
//
getmaterialsList(imagePath) {
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsList', licenseImg)
},
//
getmaterialsListAfter(imagePath) {
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
},
revealPhoto(licenseImg) {
this.$refs.imgFile.revealImg(licenseImg)
},
//
echoFromData(echoData, otherField) {
let jsonData = []
this.formRow.forEach((item) => {
jsonData.push(item.elCol)
})
let newJson = [].concat.apply([], jsonData)
newJson.forEach((item) => {
if (this.ruleForm.factoryInFlag == 1) {
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
}
}
if (this.ruleForm.factoryInFlag == 0) {
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
}
}
this.$set(this.ruleForm, item.prop, echoData[item.prop])
})
//
if (typeof otherField == 'object') {
this.$refs[otherField.props][0].setEchoData(echoData[otherField.field])
}
},
//
//propLabel value
getField(propLabel, value) {
this.$set(this.ruleForm, propLabel, value)
},
//
choiceAssignment(value) {
this.ruleForm = Object.assign({}, value)
// this.$forceUpdate()
},
incomingParameters(vale) {
let ruleLength = 0
let valeLength = 0
for (let i in vale) {
valeLength = valeLength + 1
}
for (let i in this.ruleForm) {
ruleLength = ruleLength + 1
}
// if(ruleLength == valeLength){
// this.choiceAssignment(vale)
// }else{
// for(let i in vale){
// this.getField(i,vale[i])
// }
// }
for (let i in vale) {
this.getField(i, vale[i])
}
},
resetFormPlus(formName) {
for (let i in this.$refs[formName]) {
this.getField(i, '')
}
},
//
resetField(field) {
if (this.ruleForm[field]) {
this.$set(this.ruleForm, field, '')
this.$refs['ruleForm'].clearValidate(field) //
}
},
resetForm() {
this.$refs[this.rulesName].clearValidate() //
},
resetFields() {
// this.choiceAssignment({});
this.$refs.ruleForm.resetFields()
},
// , index indexRow
selectChange(val, index, indexRow, row) {
this.$emit('onSelect', val, index, indexRow, row)
this.$forceUpdate()
},
switchChange(val, index, indexRow, row) {
this.$emit('switchChange', val, index, indexRow, row)
},
//
getCascader(value, field) {
this.$set(this.ruleForm, field, value)
},
//
submitForm() {
this.$refs[this.refName].validate((valid) => {
if (valid) {
this.$emit('onSubmit', this.ruleForm)
} else {
console.log('error submit!!')
return false
}
})
},
//
resetForm() {
// let tempObj = deepClone(this.tempFormData);
// this.tableColumn
// .filter((item) => item.disabled)
// .forEach((item) => {
// tempObj[item.id] = this.ruleForm[item.id];
// });
// this.choiceAssignment({});
// this.$emit("resetForm", tempObj);
this.$refs[this.refName].resetFields()
},
clearCheck(propName) {
this.ruleForm[propName] = ''
},
elDialogClick(row, index, indexRow) {
if (row.disabled) {
return
}
// row.prop
this.$emit('elDialogClick', row, index)
},
elDialogHover(row) {
row.elDialogHoverType = true
},
elDialogLeave(row) {
// row.elDialogHoverType = false
},
// input
changeRadio(val, index, indexRow, row) {
this.$emit('onChangeRadio', val, index, indexRow, row)
},
normalizer(node, row) {
//children=null
if (node.children == null || node.children == 'null') {
delete node.children
}
// return{
// ...node,
// label:nodeLabel
// }
},
selectTree(row) {
this.$emit('selectTree')
if (this.$refs.ruleForm) {
this.$nextTick(() => {
this.$refs.ruleForm.validateField(row.id)
})
}
},
treeSelectClear() {
this.$refs.selectTree.clear()
}
},
mounted() {
// this.$refs.ruleForm.resetFields();
}
}
</script>
<style>
.el-form-item__error {
}
.el-form-item__label {
/* width: 25%; */
line-height: 1.2;
}
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
margin-right: 0;
content: "";
}
</style>
<style scoped lang="scss">
::v-deep .el-form-item--medium .el-form-item__content {
line-height: 20px !important;
flex: 1;
}
::v-deep .el-form-item__label {
padding: 0 0 10px !important;
}
.label {
/* @include fontBase(16px, #333333) ; */
color: #999;
font-size: 14px !important;
display: block;
width: 180px;
// text-align: left;
}
> > > .el-form-item__label {
width: 100px;
text-align: right !important;
margin-right: 10px !important;
padding: 0 !important;
}
::v-deep .el-form-item__label:before {
display: none;
}
::v-deep .el-form-item__content {
margin-left: 10px;
// width: calc(100% - 100px);
}
.w-100 {
width: 100%;
}
.saveBtn {
/* width: 410px; */
}
.one {
width: calc(100% - 15px) !important;
}
.elDialog {
display: flex;
width: 100%;
/* width: calc(100% - 14px);1 */
align-items: center;
justify-content: space-between;
border: 1px solid #dcdfe6;
border-radius: 8px;
padding: 0 15px;
cursor: pointer;
i {
color: #c0c4cc;
}
}
.showText {
/* width: 100%; */
/* width: calc(100% - 110px); */
/*让长段文本不换行*/
white-space: nowrap;
/*设置文本超出元素宽度部分隐藏*/
overflow-x: hidden;
/*设置文本超出部分用省略号显示*/
text-overflow: ellipsis;
}
.ruleFormClass {
::v-deep .el-input__inner {
border-color: #e6a23c !important;
}
.elDialog {
border-color: #e6a23c !important;
}
::v-deep .el-radio__inner {
border-color: #e6a23c !important;
}
.el-radio.is-bordered {
border-color: #e6a23c !important;
}
::v-deep .vue-treeselect__control {
border-color: #e6a23c !important;
}
::v-deep .el-textarea__inner {
border-color: #e6a23c !important;
}
}
::v-deep.stretchNone {
.el-textarea__inner {
resize: none;
}
}
</style>

View File

@ -1,321 +0,0 @@
<template>
<div>
<template v-if="!lookflag">
<el-select
v-loading="selLoading"
class="w-100"
v-model="selectValue"
:placeholder="placeholder"
:clearable="false"
style="width: 240px"
size="mini"
ref="mySelect"
:reserve-keyword="true"
:disabled="disabled"
filterable
popper-class="sele"
:filter-method="filter"
@change="fun"
@focus="funx"
@blur="funb"
@visible-change="hidden"
clearable
>
<el-option
v-for="(item, index) in options"
:key="index"
:label="item.label"
remote
:value="item.value"
placeholder="请输入"
>
</el-option>
<div style="bottom: -10px">
<el-pagination
v-if="pageModel.total > pageModel.limit"
small
@current-change="handleCurrentChange"
:current-page="pageModel.pageIndex"
:page-size="pageModel.limit"
layout="prev, pager,next,total"
:total="pageModel.total"
>
</el-pagination>
</div>
</el-select>
</template>
<template v-else
><div v-loading="selLoading">{{ showValue }}</div></template
>
</div>
</template>
<style scoped lang="scss">
::v-deep .el-input--mini .el-input__inner {
height: 38px;
}
.w-100 {
width: 100% !important;
}
.drop >>> .el-input__inner {
background: #5183ff !important;
color: white;
border: none;
height: 26px;
padding: 10px 22px 10px 10px;
text-align: center;
}
.drop {
width: 250px;
}
.drop >>> .el-select .el-input .el-select__caret {
display: none;
}
</style>
<script>
import debounce from "lodash/debounce";
import { getUserModuleApi } from "@/api/integrationOption/integrationOption.js";
export default {
props: {
searchKey: {
type: String,
default: "",
},
ruleForm: {
type: Object,
default: () => {
return {};
},
},
selectInfo: {
type: Object,
default: () => {
return {};
},
},
//
disabled: {
type: Boolean,
default: false,
},
placeholder: String,
value: {
type: [String, Number],
},
itemObj: {
type: Object,
default: () => {
return {};
},
},
lookflag: {
type: Boolean,
default: false,
},
idKey: {
type: [Number, String],
default: 0,
},
journalingType: {
type: [String, Number],
default: "subject",
},
apiInfo: {
type: Object,
},
searchApiInfo: {
type: Object,
},
prop: {
type: Object,
default: () => {
return {
label: "names",
id: "codes",
};
},
},
foucus: {
type: Boolean,
default: true,
},
apiBody: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
pageModel: {
total: 0,
pageIndex: 1,
limit: 10,
},
selLoading: false,
showValue: "",
lookLoading: false,
options: [],
tempObj: {},
};
},
computed: {
selectValue: {
get() {
return this.value;
},
set(val) {
this.$emit("input", val);
},
},
},
created() {
if (this.value) {
console.log(this.value, "查询");
this.searchCodes(this.value);
}
},
mounted() {},
methods: {
//
handleCurrentChange(val) {
this.pageModel.pageIndex = val;
this.getUserModuleHandle();
},
// select
fun(val) {
// this.$emit(`${this.funName}`, arr);
this.$emit("selectChange", val, this.itemObj);
// this.searchShowValue(val);
this.$nextTick(() => {
this.$emit("blur");
});
},
// searchShowValue(val) {
// this.options.forEach((item) => {
// if (item.codes == val) {
// this.showValue = item.names;
// this.$nextTick(() => {
// this.$emit("showValue", this.showValue, this.itemObj, this.idKey);
// });
// }
// });
// },
//
funx() {
if (this.foucus) {
this.getUserModuleHandle();
}
},
clearOptions() {
if (this.options.length) {
this.pageModel.pageIndex = 1;
this.options = [];
this.tempObj = null;
}
},
//
funb() {
// this.$nextTick(() => {
// this.$emit("blur");
// });
},
hidden(val) {
if (!val) {
this.$nextTick(() => {
this.$emit("blur");
});
}
},
//,options
filter: debounce(function (val) {
this.pageModel.pageIndex = 1;
this.getUserModuleHandle(val);
}, 300),
// filter(val) {
// },
focus() {
this.$refs.mySelect.focus();
},
async getUserModuleHandle(val = null, obj = null) {
if (obj) {
this.tempObj = obj;
}
this.selLoading = true;
const res = await getUserModuleApi(this.apiInfo, {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,
});
this.selLoading = false;
if (res.status == 200) {
this.options = [];
if (res.attribute instanceof Array) {
this.pageModel.total = res.attribute.length;
res.attribute.forEach((item) => {
this.options.push({
value: item[this.prop.id],
label: item[this.prop.label],
});
});
} else {
this.pageModel.total = res.attribute.total;
res.attribute.list.forEach((item) => {
this.options.push({
value: item[this.prop.id],
label: item[this.prop.label],
});
});
}
}
},
async searchCodes(codes) {
let obj = {};
if (this.searchKey) {
obj[this.searchKey] = codes;
}
const res = await getUserModuleApi(this.searchApiInfo, {
...obj,
});
console.log(res, "查询结果");
if (res.status == 200 && res.attribute.main) {
if (!this.options.length) {
console.log(this.prop.id, this.prop.label);
this.options.push({
value: res.attribute.main[this.prop.id],
label: res.attribute.main[this.prop.label],
});
}
this.showValue = res.attribute.main[this.prop.label];
console.log(this.showValue);
this.$nextTick(() => {
this.$emit("showValue", this.showValue, this.itemObj, this.idKey);
});
}
},
},
beforeDestroy() {},
//
watch: {
value: {
handler: function (newv, oldv) {
console.log("进入watch", newv);
if(newv){
this.searchCodes(newv);
}
},
},
},
};
</script>

View File

@ -1,79 +0,0 @@
<!--
* @name: 自定义分页组件
* @author: Zhangpengcheng
* @date: 2022-09-05
-->
<template>
<div class="pageTion" flex="main:right">
<el-pagination ref="pagination" :page-sizes="[10,20, 30, 40,100]" :total="pageModel.total" :current-page="pageModel.page" :page-size="pageModel.limit"
@current-change="currentChange" @size-change="sizeChange" background layout="prev, pager, next,jumper,total,sizes">
</el-pagination>
</div>
</template>
<script>
export default {
props: {
pageModel: {
default: null
}
},
data() {
return {}
},
created() {},
mounted() {
this.$nextTick(() => {
})
},
computed: {},
methods: {
sizeChange(val) {
let pageModel = this.pageModel;
pageModel.limit = val;
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
currentChange(val) {
let pageModel = this.pageModel;
pageModel.pageIndex = val;
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
},
}
</script>
<style scoped lang='scss'>
.pageTion {
width: 100%;
margin: 10px 0;
}
::v-deep .el-pager li {
background-color: #f9f9f9 !important ;
width: 36px !important;
height: 36px !important;
line-height: 36px !important;
border-radius: 50% !important;
}
::v-deep .el-pager .active {
background-color: #409EFF !important;
}
::v-deep .el-pagination button {
background-color: #f9f9f9 !important;
color: #333333 !important;
font-size: 14px !important;
border-radius: 18px !important;
width: 98px !important;
height: 36px !important;
}
::v-deep .el-pagination__total {
line-height: 36px !important;
}
::v-deep .el-pagination__jump {
height: 36px !important;
line-height: 36px !important;
}
::v-deep .el-input__inner {
height: 36px !important;
line-height: 36px !important;
}
</style>

View File

@ -1,24 +0,0 @@
//
<template>
<el-radio-group v-model="itemObj.value">
<el-radio v-for="item in itemObj.options" :label="item.id" :key="item.id">{{item.label}}</el-radio>
</el-radio-group>
</template>
<script>
export default {
props: {
itemObj: {
type: Object,
default: () => {},
},
},
data() {
return {
radio: "",
};
},
created(){
}
};
</script>

View File

@ -1,29 +0,0 @@
//
<template>
<el-select v-model="itemObj.value" filterable placeholder="请选择">
<el-option
v-for="item in itemObj.options"
:key="item.id"
:label="item.label"
:value="item.id"
>
</el-option>
</el-select>
</template>
<script>
export default {
props:{
itemObj:{
type:Object,
default:()=>{}
}
},
data() {
return {
}
},
created(){
}
}
</script>

View File

@ -1,634 +0,0 @@
<!--
* @name: 自定义 el-table
* @author: Zhangpengcheng
* @date: 2022-08-30
* tabLoading 加载 headerStyle表头格式 tableData数据 border纵向边框 @current-change单选触发 summary-method合计 @cell-click某个单元格点击触发事件 @sort-change触发后台排序
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
* :style="'height:'+ tableHeight + '!important'"
-->
<template>
<!-- :row-class-name="tableRowClassName" -->
<div class="app-container">
<el-table
v-loading="tabLoading"
ref="elTable"
:header-cell-style="headerStyle"
:data="tableData"
:border="border"
@current-change="handleCurrentChange"
:summary-method="getSummaries"
:row-class-name="tableRowClassName"
:size="size"
:row-key="getRowKey"
@cell-click="getCellClick"
@row-click="getRowClick"
:highlight-current-row="highlightCurrent"
:show-summary="showsummary"
:SummariesIndex="SummariesIndex"
@row-dblclick="rowDblclick"
@selection-change="handleSelectionChange"
@select="select"
@select-all="selectAll"
style="width: 100%"
:cell-class-name="tableCellName"
:height="tableHeight"
:max-height="tableMaxHeight"
@sort-change="sortChange"
:key="itemKey"
@cell-dblclick="doubleClick"
fit
>
<el-table-column
align="center"
:reserve-selection="true"
v-if="showSelect"
type="selection"
width="55"
>
</el-table-column>
<el-table-column
label="序号"
align="center"
type="index"
v-if="showIndex"
width="55"
>
<template slot-scope="scope">
<div v-if="indexOperate">
<p v-if="scope.$index + 1 != tableData.length">
{{ scope.$index + 1 }}
</p>
<el-button
type="primary"
plain
icon="el-icon-plus"
circle
v-else
size="mini"
@click="newRow"
>
</el-button>
</div>
<p v-else>{{ scope.$index + 1 }}</p>
</template>
</el-table-column>
<el-table-column label="单选" align="center" v-if="slotrow" width="60">
<template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<el-radio v-model="radioIndex" :label="scope.$index"
><span></span
></el-radio>
</template>
</el-table-column>
<el-table-column
:key="ind + 1"
:width="item.width ? item.width : 'auto'"
:label="item.title"
:prop="item.id"
:show-overflow-tooltip="item.tooltip"
:sortable="item.sortable"
:align="item.align ? item.align : 'center'"
header-align="center"
:fixed="item.fixed"
v-for="(item, ind) in tableColumn"
>
<!-- :isClick="item.other && item.other.isClick ? item.other.isClick : false" -->
<template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<slot :name="item.id" :row="slotrow ? scope : scope.row">
<!-- 插槽后备内容如父组件不使用插槽则使用后备内容 -->
<!-- color:
item.other && item.other.color ? item.other.color : '#333',
cursor:
item.other && item.other.isClick ? 'pointer' : 'default', -->
<template
class="item"
effect="dark"
placement="top"
v-if="
item.type !== 'select' &&
item.type !== 'treeselect' &&
item.type !== 'datepick' &&
item.type !== 'check'
"
>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
<span
:style="{
color: item.color ? item.color : '#333',
cursor: item.isClick ? 'pointer' : 'default',
}"
>{{
!item.stateOption
? scope.row[item.id]
: item.stateOption[scope.row[item.id]]
}}</span
>
</div>
</template>
<template v-else>
<baseNewSelect
v-if="item.type === 'select'"
v-model="scope.row[item.id]"
:lookflag="true"
:itemObj="item"
:ruleForm="scope.row"
></baseNewSelect>
<baseCascader
v-if="item.type === 'treeselect'"
v-model="scope.row[item.id]"
:lookflag="true"
:itemObj="item"
:ruleForm="scope.row"
>
</baseCascader>
<div v-if="item.type === 'datepick'">
{{ scope.row[item.id].split("T")[0] }}
</div>
<el-checkbox v-model="scope.row[item.id]"></el-checkbox>
</template>
</slot>
</template>
</el-table-column>
<el-table-column
label="操作"
:width="funWidth"
v-if="funData.length != 0"
align="center"
header-align="center"
:fixed="fixedTable"
>
<template slot-scope="scope">
<div flex="cross:center main:center">
<div
v-for="(item, index) in funData"
:key="index"
:class="{ 'mr-12': index + 1 != funData.length }"
@click.stop="funcEmit(scope.row, funData[index])"
class="btnText"
:style="{ background: item.color ? item.color : 'blue' }"
style="padding: 3px 10px; border-radius: 20px"
>
<span
style="color: #fff; font-weight: 700"
v-if="!item.ifField && !item.hiddenField"
>{{ item.text }}</span
>
<span
:style="{
color:
scope.row[item.ifField] == item.fieldVal
? item.fieldColor
: item.color,
}"
v-if="item.ifField"
></span>
</div>
</div>
</template>
</el-table-column>
<!-- 操作 自定义插槽 -->
<slot v-else></slot>
</el-table>
</div>
</template>
<script>
import baseCascader from "./baseCascader/index";
import baseNewSelect from "./baseNewSelect.vue";
import Sortable from "sortablejs";
import { getUserModuleApi } from "@/api/integrationOption/integrationOption.js";
export default {
props: {
//
tableMaxHeight: {
type: [String, Number],
},
// loading
tabLoading: {
type: Boolean,
default: false,
},
// icon
indexOperate: {
type: Boolean,
default: false,
},
//
fixedTable: {
type: [Boolean, String],
default: false,
},
//
slotrow: {
type: Boolean,
default: false,
},
showsummary: {
type: Boolean,
default: false,
},
//
tableHeight: {
type: [Number, String],
},
//
// windowHight: {
// type: [ String],
// default: 'auto'
// },
//
size: {
type: String,
default: "small",
},
//
tableData: {
type: Array,
default: () => {
return [];
},
},
//
tableColumn: {
type: Array,
default: () => {
return [];
},
},
// index
SummariesIndex: {
type: Array,
default: () => {
return [];
},
},
//
showSelect: {
type: Boolean,
default: false,
},
//
showIndex: {
type: Boolean,
default: false,
},
//
funData: {
type: Array,
default: () => {
return [];
},
},
//
funWidth: {
type: Number,
default: 100,
},
//
border: {
type: Boolean,
default: true,
},
//
highlightCurrent: {
type: Boolean,
default: false,
},
//
sortableSwitch: {
type: Boolean,
default: false,
},
// headerStyle:{
// type: String,
// default:{
// 'background-color': '#F5F5F5',
// 'color': '#333333',
// },
// }
},
data() {
return {
headerStyle: {
"background-color": "#F5F5F5",
color: "#333333",
},
itemKey: true,
radioIndex: false,
};
},
created() {},
mounted() {
this.$emit("mainTableMounted");
this.rowDrop();
//
// var tableBody = this.$refs.elTable.$refs.footerWrapper
// tableBody.addEventListener('scroll', () => {
// //
// const scrollLeft = tableBody.scrollLeft
// this.$refs.elTable.$refs.bodyWrapper.scrollLeft = scrollLeft
// })
},
computed: {},
watch: {},
methods: {
setCurrent(row) {
this.$refs.elTable.setCurrentRow(row);
},
selectShow(item, row) {
const res = getUserModuleApi(
{
tl: "optionService",
as: "sys_template",
dj: "queryTemplateData",
},
{
service: item.service,
id: row[item.id],
label: item.label,
value: item.value,
}
).then((val) => {
this.$emit("selectValueGeT", item, row, val.attribute[0][item.label]);
});
// console.log(res.attribute[0][item.label])
// return 1232321;
},
select(selection, row) {
this.$emit("select", selection, row);
},
selectAll(selection) {
this.$emit("selectAll", selection);
},
setTableKey() {
this.itemKey = !this.itemKey;
},
//
doubleClick(row, column, cell, event) {
this.$emit("doubleClick", row, column, cell, event);
},
//
clearSelect() {
this.$refs.elTable.clearSelection();
},
/**
* @description 单元格点击事件
* @author duanyipeng
* @createDate 2020/7/6 21:36
* @param { Object } row 每一行数据
* @param { Object } column 选中单元格表头数据
* @use {
* other:{
* isClick:true
* }
* }
*/
getCellClick(row, column) {
let label = column.label;
// let itemColumn = this.tableColumn.filter(item => {
// return item.label === label
// })
// if (itemColumn[0] && itemColumn[0].other && itemColumn[0].other.isClick) {
// this.$emit('onCellClick', row, label)
// }
this.$emit("onCellClick", row, label);
},
//
getRowClick(row, column, event) {
this.handleCurrentChange(row);
this.$emit("onRowClick", row);
},
//
rowDblclick(row, column, event) {
if (this.showSelect) {
this.toggleSelection([row]);
}
this.$emit("rowDblclick", row);
},
// id,row-keykey
getRowKey(row) {
return row.id;
},
//
handleSelectionChange(selectTable) {
this.$emit("onSelectionChange", selectTable);
},
/**
* 触发操作事件
* 参数1当前按钮索引
* 参数2当前按钮所在行数据
*/
funcEmit(row, item) {
this.$emit("onFunc", row, item);
},
// :descending;ascending
sortChange(column) {
this.$emit("sortChange", column);
},
//
handleCurrentChange(val) {
this.radioIndex = val.index;
this.$emit("radioChange", val);
},
clearRadioIndex() {
this.radioIndex = false;
},
setRadioIndex(index) {
this.radioIndex = index;
},
// index
tableCellName({ row, column, rowIndex, columnINdex }) {
row.index = rowIndex;
column.index = columnINdex;
},
// tableRowClassName({ row,rowIndex}) {
// if (rowIndex === 1) {
// return 'warning-row';
// } else if (rowIndex === 3) {
// return 'success-row';
// }
// return '';
// },
tableRowClassName: function ({ row, rowIndex }) {
let data = "";
this.$emit("row-class-name", { row: row, rowIndex: rowIndex }, (val) => {
data = val;
});
return data; //string
},
newRow() {
this.$emit("newRow");
this.$nextTick(() => {
this.$refs.elTable.bodyWrapper.scrollTop =
this.$refs.elTable.bodyWrapper.scrollHeight;
});
},
//,
rowDrop() {
if (!this.sortableSwitch) {
return;
}
const el = this.$refs.elTable.$el.querySelectorAll(
".el-table__body-wrapper > table > tbody"
)[0];
this.sortable = Sortable.create(el, {
ghostClass: "sortable-ghost",
setData: function (dataTransfer) {
dataTransfer.setData("Text", "");
},
onEnd: (evt) => {
// console.log(evt,"evt")
// console.log(evt.oldIndex, "oldIndex");
// console.log(this.tableData)
// console.log(evt.oldIndex, this.tableData.splice(evt.oldIndex, 1))
const targetRow = this.tableData.splice(evt.oldIndex, 1)[0];
// console.log(targetRow, "targetRow");
// console.log(evt.newIndex, "newIndex");
this.tableData.splice(evt.newIndex, 0, targetRow);
},
});
},
//
toggleSelection(rowData, selected) {
if (rowData) {
rowData.forEach((row) => {
this.$refs.elTable.toggleRowSelection(row, selected);
});
} else {
this.$refs.elTable.clearSelection();
}
},
//
getSummaries(params) {
const { columns, data } = params;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
this.SummariesIndex.forEach((el) => {
if (index == el) {
const values = data.map((item) => Number(item[column.property]));
if (!values.every((value) => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = sums[index].toFixed(2);
} else {
sums[index] = "";
}
}
});
});
return sums;
},
},
components: {
baseNewSelect,
baseCascader,
},
};
</script>
<style>
.btnText {
padding: 3px 10px;
border-radius: 20px;
}
.el-table .warning-row {
background: #ffe562;
}
.el-table .success-row {
background: #acf389;
}
.el-table .denger-row {
background: #e13501;
}
.fiexTableBottm {
position: sticky;
bottom: 0;
}
</style>
<style scoped lang="scss">
>>> .el-radio__label {
// display: none;
}
.btnText {
cursor: pointer;
}
.mr-12 {
margin-right: 12px;
}
::v-deep .cell {
font-weight: 400;
}
::v-deep .el-table__row {
height: 60px !important;
background-color: #fcfcfc;
}
::v-deep .el-table__header {
height: 50px !important;
background-color: #fcfcfc;
}
// ::v-deep .el-table .sort-caret.ascending {
// top: 1px
// }
// ::v-deep .el-table .sort-caret.descending {
// bottom: 2px
// }
// ::v-deep .el-table .caret-wrapper {
// height: 23px;
// }
// div ::v-deep .el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// z-index: 2 !important;
// }
// div ::v-deep .el-table__footer-wrapper {
// overflow-x: auto;
// border-top: 1px solid #f4f4f4;
// }
// ::v-deep .el-table {
// overflow-x: auto;
// }
// ::v-deep .el-table__header-wrapper,
// ::v-deep .el-table__body-wrapper,
// ::v-deep .el-table__footer-wrapper {
// overflow: visible;
// }
// ::v-deep .el-table::after {
// position: relative;
// }
// ::v-deep .el-table--scrollable-x ::v-deep .el-table__body-wrapper {
// overflow: visible;
// }
// ::v-deep .el-table {
// .el-table__body-wrapper {
// z-index: 2;
// }
// }
</style>

View File

@ -1,741 +0,0 @@
<!--
* @name: 自定义 el-table
* @author: Zhangpengcheng
* @date: 2022-08-30
* tabLoading 加载 headerStyle表头格式 tableData数据 border纵向边框 @current-change单选触发 summary-method合计 @cell-click某个单元格点击触发事件 @sort-change触发后台排序
* @row-click 当某一行被点击时会触发该事件 highlight-current-row是否高亮 show-summary是否合计 SummariesIndex合计需要的index @selection-change多选 tableHeight高度
* :style="'height:'+ tableHeight + '!important'"
-->
<template>
<!-- :row-class-name="tableRowClassName" -->
<div class="app-container">
<el-table
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
v-loading="tabLoading"
ref="elTable"
:header-cell-style="headerStyle"
:data="tableInfo.tableData"
:border="border"
@current-change="handleCurrentChange"
:summary-method="getSummaries"
:row-class-name="tableRowClassName"
:size="size"
row-key="id"
@cell-click="getCellClick"
@row-click="getRowClick"
:highlight-current-row="highlightCurrent"
:show-summary="showsummary"
:SummariesIndex="SummariesIndex"
@row-dblclick="rowDblclick"
@selection-change="handleSelectionChange"
@select="select"
@select-all="selectAll"
style="width: 100%"
:cell-class-name="tableCellName"
:max-height="tableMaxHeight"
@sort-change="sortChange"
:key="itemKey"
@cell-dblclick="doubleClick"
fit
>
<el-table-column
align="center"
:reserve-selection="true"
v-if="showSelect"
type="selection"
width="55"
>
</el-table-column>
<el-table-column
fixed
label="序号"
align="center"
type="index"
v-if="showIndex"
width="55"
>
<template slot-scope="scope">
<div v-if="indexOperate && !lookflag">
<p v-if="scope.$index + 1 != tableInfo.tableData.length">
{{ scope.$index + 1 }}
</p>
<el-button
type="primary"
plain
icon="el-icon-plus"
circle
v-else
size="mini"
@click="newRow"
>
</el-button>
</div>
<p v-else>{{ scope.$index + 1 }}</p>
</template>
</el-table-column>
<el-table-column label="单选" align="center" v-if="slotrow" width="60">
<template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<el-radio v-model="radioIndex" :label="scope.$index"
><span></span
></el-radio>
</template>
</el-table-column>
<el-table-column
:key="item.id"
:width="item.width ? item.width : 'auto'"
:label="item.title"
:prop="item.id"
:show-overflow-tooltip="item.tooltip"
:sortable="item.sortable"
:align="item.align ? item.align : 'center'"
header-align="center"
:fixed="item.fixed"
v-for="(item, ind) in tableInfo.detailFields"
v-if="!item.hidden"
>
<!-- :isClick="item.other && item.other.isClick ? item.other.isClick : false" -->
<template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<slot
:name="item.id"
:row="
slotrow
? scope
: [scope.row, item, tableInfo.tableData[scope.row.index]]
"
>
<template v-if="!lookflag">
<!-- <button @click="test(scope)">按钮</button> -->
<!-- v-model="tableInfo.tableData[scope.row.index][item.id]" -->
<el-input
:maxlength="item.maxlength ? item.maxlength : '50'"
v-if="item.type === 'input'"
v-model="scope.row[item.id]"
placeholder=""
></el-input>
<el-input
:maxlength="item.maxlength ? item.maxlength : '50'"
v-if="item.type === 'number'"
type="number"
onkeyup="value=value.replace(/[^\d]/g,'')"
v-model="scope.row[item.id]"
placeholder=""
min="1"
></el-input>
<el-checkbox
v-if="item.type === 'checkbox'"
v-model="scope.row[item.id]"
></el-checkbox>
<BaseSelect
v-if="item.type === 'select'"
v-model="scope.row[item.id]"
:selectInfo="item"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
></BaseSelect>
<baseCascader
v-if="item.type === 'treeselect'"
v-model="scope.row[item.id]"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<el-link
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
v-if="item.type === 'click'"
@click="clickBoxHandle(scope.row)"
type="primary"
>{{
tableInfo.tableData[scope.row.index][item.id]
? tableInfo.tableData[scope.row.index][item.id]
: "点击这里..."
}}</el-link
>
<div v-if="item.type === 'text'">
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<BaseDatePicker
v-if="item.type === 'datepick'"
v-model="scope.row[item.id]"
></BaseDatePicker>
<BaseDatePicker
v-if="item.type === 'datetimepick'"
datePickerType="datetime"
v-model="scope.row[item.id]"
></BaseDatePicker>
<div
v-if="
item.type === 'compute' &&
!lookflag &&
scope.$index + 1 != tableInfo.tableData.length
"
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ calculator(item, scope.row) }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ calculator(item, scope.row) }}
</div>
</el-tooltip>
</div>
<el-switch
v-if="item.type === 'switch'"
v-model="scope.row[item.id]"
>
</el-switch>
</template>
<template v-else>
<div
v-if="
item.type != 'checkbok' &&
item.type !== 'select' &&
item.type !== 'treeselect' &&
item.type !== 'datepick'
"
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<baseCascader
v-if="item.type === 'treeselect'"
v-model="scope.row[item.id]"
:lookflag="true"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<el-checkbox
v-if="item.type === 'checkbox'"
v-model="scope.row[item.id]"
></el-checkbox>
<div v-if="item.type === 'datepick'">
{{ 123 }}
{{ scope.row[item.id].split("T")[0] }}
</div>
</template>
</slot>
</template>
</el-table-column>
<el-table-column
label="操作"
:width="funWidth"
v-if="funData.length != 0 && !lookflag"
align="center"
header-align="center"
:fixed="fixedTable"
>
<template slot-scope="scope">
<div flex="cross:center main:center">
<div
v-for="(item, index) in funData"
:key="index"
:class="{ 'mr-12': index + 1 != funData.length }"
@click="funcEmit(scope.row, funData[index], scope)"
class="btnText"
>
<span
:style="'color:' + item.color"
v-if="!item.ifField && !item.hiddenField"
>{{ item.text }}</span
>
<span
:style="{
color:
scope.row[item.ifField] == item.fieldVal
? item.fieldColor
: item.color,
}"
v-if="item.ifField"
>{{
scope.row[item.ifField] == item.fieldVal
? item.fieldTxt
: item.text
}}</span
>
</div>
</div>
</template>
</el-table-column>
<!-- 操作 自定义插槽 -->
</el-table>
</div>
</template>
<script>
import baseCascader from "./baseCascader/index";
import { deepClone } from "@/utils/index.js";
import execMathExpress from "exec-mathexpress";
import BaseDatePicker from "./baseDatePicker.vue";
import BaseSelect from "./baseNewSelect.vue";
import Sortable from "sortablejs";
export default {
props: {
//
formIndex: {
type: Number,
default: 0,
},
lookflag: {
type: Boolean,
default: false,
},
tableInfo: {
type: Object,
default: () => {
return {};
},
},
//
tableMaxHeight: {
type: [String, Number],
},
// loading
tabLoading: {
type: Boolean,
default: false,
},
// icon
indexOperate: {
type: Boolean,
default: false,
},
//
fixedTable: {
type: [Boolean, String],
default: false,
},
//
slotrow: {
type: Boolean,
default: false,
},
showsummary: {
type: Boolean,
default: false,
},
//
tableHeight: {
type: [Number, String],
default: "auto",
},
//
// windowHight: {
// type: [ String],
// default: 'auto'
// },
//
size: {
type: String,
default: "small",
},
//
tableData: {
type: Array,
default: () => {
return [];
},
},
//
detailFields: {
type: Array,
default: () => {
return [];
},
},
// index
SummariesIndex: {
type: Array,
default: () => {
return [];
},
},
//
showSelect: {
type: Boolean,
default: false,
},
//
showIndex: {
type: Boolean,
default: false,
},
//
funData: {
type: Array,
default: () => {
return [];
},
},
//
funWidth: {
type: Number,
default: 100,
},
//
border: {
type: Boolean,
default: true,
},
//
highlightCurrent: {
type: Boolean,
default: false,
},
//
sortableSwitch: {
type: Boolean,
default: false,
},
// headerStyle:{
// type: String,
// default:{
// 'background-color': '#F5F5F5',
// 'color': '#333333',
// },
// }
},
data() {
return {
headerStyle: {
"background-color": "#F5F5F5",
color: "#333333",
},
itemKey: true,
radioIndex: false,
};
},
created() {},
mounted() {
this.$emit("getTableData", this.tableInfo.index);
this.rowDrop();
},
computed: {},
watch: {},
methods: {
test(row) {
console.log(row);
},
calculator(item, row) {
let obj = {};
item.computeId.forEach((ele) => {
obj[ele] = row[ele];
});
let result;
try {
let { num, den } = execMathExpress(item.total, obj);
console.log(execMathExpress(item.total, obj));
result = num / den;
} catch (error) {
return "数字不合法";
}
this.$emit("toalResult", this.tableInfo, row, item, result);
return result.toFixed(2);
},
//
clickBoxHandle(row) {
this.$emit(
"clickBox",
this.tableInfo,
row.index,
this.tableInfo.tableData[row.index].id,
this.formIndex
);
},
select(selection, row) {
this.$emit("select", selection, row);
},
selectAll(selection) {
this.$emit("selectAll", selection);
},
setTableKey() {
this.itemKey = !this.itemKey;
},
//
doubleClick(row, column, cell, event) {
this.$emit("doubleClick", row, column, cell, event);
},
//
clearSelect() {
this.$refs.elTable.clearSelection();
},
/**
* @description 单元格点击事件
* @author duanyipeng
* @createDate 2020/7/6 21:36
* @param { Object } row 每一行数据
* @param { Object } column 选中单元格表头数据
* @use {
* other:{
* isClick:true
* }
* }
*/
getCellClick(row, column) {
let label = column.label;
// let itemColumn = this.detailFields.filter(item => {
// return item.label === label
// })
// if (itemColumn[0] && itemColumn[0].other && itemColumn[0].other.isClick) {
// this.$emit('onCellClick', row, label)
// }
this.$emit("onCellClick", row, label);
},
//
getRowClick(row, column, event) {
this.handleCurrentChange(row);
this.$emit("onRowClick", row);
},
//
rowDblclick(row, column, event) {
if (this.showSelect) {
this.toggleSelection([row]);
}
this.$emit("rowDblclick", row);
},
// id,row-keykey
getRowKey(row) {
return row.id;
},
//
handleSelectionChange(selectTable) {
this.$emit("onSelectionChange", selectTable);
},
/**
* 触发操作事件
* 参数1当前按钮索引
* 参数2当前按钮所在行数据
*/
funcEmit(row, item) {
this.$emit("onFunc", row, item, this.tableInfo.tableData);
},
// :descending;ascending
sortChange(column) {
this.$emit("sortChange", column);
},
//
handleCurrentChange(val) {
this.radioIndex = val.index;
this.$emit("radioChange", val);
},
clearRadioIndex() {
this.radioIndex = false;
},
setRadioIndex(index) {
this.radioIndex = index;
},
// index
tableCellName({ row, column, rowIndex, columnINdex }) {
row.index = rowIndex;
column.index = columnINdex;
},
// tableRowClassName({ row,rowIndex}) {
// if (rowIndex === 1) {
// return 'warning-row';
// } else if (rowIndex === 3) {
// return 'success-row';
// }
// return '';
// },
tableRowClassName: function ({ row, rowIndex }) {
let data = "";
this.$emit("row-class-name", { row: row, rowIndex: rowIndex }, (val) => {
data = val;
});
return data; //string
},
newRow() {
this.$emit("newRow", this.tableInfo);
this.$nextTick(() => {
this.$refs.elTable.bodyWrapper.scrollTop =
this.$refs.elTable.bodyWrapper.scrollHeight;
this.setTableKey();
});
},
//,
rowDrop() {
if (!this.sortableSwitch) {
return;
}
const el = this.$refs.elTable.$el.querySelectorAll(
".el-table__body-wrapper > table > tbody"
)[0];
this.sortable = Sortable.create(el, {
ghostClass: "sortable-ghost",
setData: function (dataTransfer) {
dataTransfer.setData("Text", "");
},
onEnd: (evt) => {
// console.log(evt,"evt")
// console.log(evt.oldIndex, "oldIndex");
// console.log(this.tableData)
// console.log(evt.oldIndex, this.tableData.splice(evt.oldIndex, 1))
const targetRow = this.tableData.splice(evt.oldIndex, 1)[0];
// console.log(targetRow, "targetRow");
// console.log(evt.newIndex, "newIndex");
this.tableData.splice(evt.newIndex, 0, targetRow);
},
});
},
//
toggleSelection(rowData, selected) {
if (rowData) {
rowData.forEach((row) => {
this.$refs.elTable.toggleRowSelection(row, selected);
});
} else {
this.$refs.elTable.clearSelection();
}
},
//
getSummaries(params) {
const { columns, data } = params;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
this.SummariesIndex.forEach((el) => {
if (index == el) {
const values = data.map((item) => Number(item[column.property]));
if (!values.every((value) => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = sums[index].toFixed(2);
} else {
sums[index] = "";
}
}
});
});
return sums;
},
},
components: {
BaseSelect,
BaseDatePicker,
baseCascader,
},
};
</script>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
.el-table .warning-row {
background: #ffe562;
}
.el-table .success-row {
background: #acf389;
}
.el-table .denger-row {
background: #e13501;
}
.fiexTableBottm {
position: sticky;
bottom: 0;
}
</style>
<style scoped lang="scss">
>>> .el-radio__label {
// display: none;
}
.btnText {
cursor: pointer;
}
.mr-12 {
margin-right: 12px;
}
::v-deep .cell {
font-weight: 400;
display: flex;
align-items: center;
}
::v-deep .el-table__row {
height: 60px !important;
background-color: #fcfcfc;
}
// ::v-deep .el-table .sort-caret.ascending {
// top: 1px
// }
// ::v-deep .el-table .sort-caret.descending {
// bottom: 2px
// }
// ::v-deep .el-table .caret-wrapper {
// height: 23px;
// }
//
// div ::v-deep .el-table--scrollable-x .el-table__body-wrapper{overflow-x: hidden!important;z-index: 2!important;}
// div ::v-deep .el-table__footer-wrapper {overflow-x: auto;border-top: 1px solid #f4f4f4;}
// ::v-deep .el-table {
// overflow-x: auto;
// }
// ::v-deep .el-table__header-wrapper,
// ::v-deep .el-table__body-wrapper,
// ::v-deep .el-table__footer-wrapper {
// overflow: visible;
// }
// ::v-deep .el-table::after {
// position: relative;
// }
// ::v-deep .el-table--scrollable-x ::v-deep .el-table__body-wrapper {
// overflow: visible;
// }
// ::v-deep .el-table { .el-table__body-wrapper { z-index: 2; } }
</style>

View File

@ -1,102 +0,0 @@
const addForm = [
{
elCol: [
{
type: 'input',
title: '主数据名称',
id: 'mdmName',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'textrea',
title: '备注',
id: 'remark',
row: 24,
disabled: false,
fontSize: 16
}
]
}
]
const tableColumn = [
{
id: 'mdmName',
title: '主数据名称',
align: 'left',
width: 130
},
{
id: 'mdmTypeName',
title: '主数据类型'
},
{
id: 'remark',
title: '备注',
tooltip: true
},
{
id: 'createUserId',
title: '创建人',
tooltip: true
},
{
id: 'createTime',
title: '创建日期',
tooltip: true
},
{
id: 'modifyUserId',
title: '修改人'
},
{
id: 'modifyTime',
title: '修改时间'
}
]
const settingMenu = [
{
title: '基本信息',
icon: 'masterDataMenu01',
path: 'masterDataEdit'
},
{
title: '数据源',
icon: 'masterDataMenu02',
path: 'dataOrigin'
},
{
title: '显示信息',
icon: 'masterDataMenu03',
path: 'displayInfo'
},
{
title: '数据来源',
icon: 'masterDataMenu04',
path: 'authorily'
},
{
title: '分发设置',
icon: 'masterDataMenu05',
path: 'distribute'
},
{
title: '日志',
icon: 'masterDataMenu06',
path: 'logsDeatil'
},
]
const configData = {
addForm,
tableColumn,
settingMenu
}
export default configData

View File

@ -1,281 +0,0 @@
const dataOriginFormRow = [
{
elCol: [
{
type: "input",
title: "表名",
id: "clientPath",
row: 12,
disabled: false,
required: true,
fontSize: 16
},
{
type: "input",
title: "备注",
id: "webPath",
row: 12,
disabled: false,
required: false,
fontSize: 16
},
],
},
]
const optionFormRow = [
{
elCol: [
{
type: "input",
title: "中文名称",
id: "chName",
row: 24,
disabled: false,
required: true,
fontSize: 16
},
],
},
{
elCol: [
{
type: "input",
title: "英文名称",
id: "enName",
row: 24,
disabled: false,
required: true,
fontSize: 16,
pattern: /^[a-z][a-z0-9_]{0,50}$/,
message: "须以小写字母开头,只能包含小写字母,数字和下划线,不能包含中文字符其他符号。",
disabledOfId: true,
},
],
},
{
elCol: [
{
type: "select",
title: "字段类型",
id: "filedType",
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [],
},
],
},
{
elCol: [
{
type: "num",
title: "长度",
id: "filedLength",
max:255,
row: 24,
disabled: false,
required: true,
fontSize: 16
},
],
},
{
elCol: [
{
type: "input",
title: "显示名",
id: "title",
row: 24,
disabled: false,
required: true,
fontSize: 16
},
],
}
, {
elCol: [
{
type: "select",
title: "宽度",
id: "row",
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: "3",
id: "3",
}, {
label: "6",
id: "6",
}, {
label: "9",
id: "9",
}, {
label: "12",
id: "12",
}, {
label: "15",
id: "15",
}, {
label: "18",
id: "18",
}, {
label: "21",
id: "21",
}, {
label: "24",
id: "24",
},
]
},
],
},
{
elCol: [
{
type: "num",
title: "单元格宽度",
id: "width",
row: 24,
disabled: false,
required: false,
fontSize: 16,
message:"px"
},
],
},
{
elCol: [
{
type: "select",
title: "数据类型",
id: "type",
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: "input",
id: "input",
}, {
label: "datepick",
id: "datepick",
}, {
label: "daterange",
id: "daterange",
}, {
label: "radio",
id: "radio",
}, {
label: "textrea",
id: "textrea",
}, {
label: "select",
id: "select",
}, {
label: "treeselect",
id: "treeselect",
}, {
label: "number",
id: "num",
},
]
},
],
},
{
elCol: [
{
type: "onecheck",
title: "必填",
id: "required",
row: 24,
disabled: false,
required: false,
fontSize: 16,
options: [
{
label: "是",
id: "true",
}, {
label: "否",
id: "false",
}
]
},
],
},
{
elCol: [
{
type: "onecheck",
title: "禁止修改",
id: "disabled",
row: 24,
disabled: false,
required: false,
fontSize: 16,
options: [
{
label: "是",
id: "true",
},
]
},
],
},
]
const mainOptionRow = [
{
elCol: [
{
type: "input",
title: "英文名",
id: "dbName",
disabledOfId: true,
row: 24,
disabled: false,
required: true,
fontSize: 16,
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
message: "须以字母开头且不能出现_外的字符与中文",
},
],
},
{
elCol: [
{
type: "input",
title: "表说明",
id: "remark",
row: 24,
disabled: false,
required: true,
fontSize: 16
},
],
},
]
const mainRule =
{
dbName: [
{
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,29}$/,
message: "必须以字母开头后续字符可包含字母、数字和下划线总长度不超过30个字符。",
trigger: "change",
},
],
}
const config = {
dataOriginFormRow,
optionFormRow,
mainOptionRow,
mainRule
}
export default config

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,664 +0,0 @@
<template>
<div class="wrap">
<!--数据表-->
<div class="mainTable">
<div class="rule">
<div class="name">单据规则</div>
<template v-if="!receiptsTableData.length">
<div class="value">尚未设置</div>
</template>
<template v-else>
<div class="value">
<div class="receiptsItem" v-for="(item,index) in receiptsTableData">{{ item.dbValue }}</div>
</div>
</template>
<div class="btn" @click="ruleAddHandle">
<img src="./images/设置.png" alt="">
</div>
</div>
<div class="bigTitle" style="margin: 10px 0">数据表</div>
<div class="table">
<BaseTable
ref="mainTable"
:tableData="mainTableData"
:tabLoading="mainTabLoading"
:tableColumn="mainTableColumn"
:border="false"
tableMaxHeight="600"
:highlightCurrent="true"
@radioChange="mainOnClick"
>
<template #dbType="{row}">
{{ row.dbType === '1' ? '主表' : '子表' }}
</template>
<template #operation="{row}">
<div class="btnList">
<div class="settingBtn" @click="mainTableEditHandle(row)">
<img src="./images/设置.png" alt="">
</div>
<div class="deleBtn" @click="mainDeleOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
</template>
</BaseTable>
<div class="mainAddRow">
<el-link
type="primary"
@click="addMainAddRow"
:underline="false"
>+ 数据表添加
</el-link
>
</div>
</div>
</div>
<!-- 表字段-->
<div class="sonTable">
<div class="bigTitle">表字段</div>
<div class="table">
<BaseTable
ref="activedTable"
:tableData="activedTableData"
:tabLoading="activedTabLoading"
:tableColumn="activedTableColumn"
:border="false"
tableMaxHeight="650"
:highlightCurrent="true"
@radioChange="activedOnClick"
@onFunc="activedOnFunc"
>
<template #filedType="{row}">
{{ dataTypeDist[row.filedType] }}
</template>
<template #operation="{row}">
<div class="btnList">
<div class="settingBtn" @click="sonTableEditHandle(row)">
<img src="./images/设置.png" alt="">
</div>
<div class="deleBtn" @click="activedOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
</template>
</BaseTable>
<div class="mainAddRow" v-if="mainTempClick.id">
<el-link
v-if="mainTempClick.id"
type="primary"
@click="activedAddRow"
:underline="false"
>+ 表字段添加
</el-link
>
</div>
</div>
</div>
<!-- 单据规则-->
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="ruleAddDialogShow"
title="单据规则"
@handleClose="ruleAddDialogShow=false"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="ruleAddSaveHanlde"
>
<div class="receiptsTable">
<ruleAddTable ref="ruleAddTable"></ruleAddTable>
</div>
</base-right-dialog>
<!-- 数据表 -->
<base-right-dialog
ref="mainTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="mainTableDialogShow"
title="数据表"
@handleClose="mainTableDialogShow=false"
:submitShow="true"
:size="'30%'"
@handleConfirmClick="mainTableSaveHandle"
>
<div class="mainTable">
<mainTable ref="mainTable"></mainTable>
</div>
</base-right-dialog>
<!-- 表字段-->
<base-right-dialog
ref="sonTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="sonTableDialogShow"
title="表字段"
@handleClose="sonTableDialogShow=false"
:submitShow="true"
:size="'40%'"
@handleConfirmClick="sonTableSaveHandle"
>
<div class="mainTable">
<sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick"
@sonSaveHandle="sonSaveHandle"
></sonTable>
</div>
</base-right-dialog>
</div>
</template>
<script>
import sonTable from '@/views/masterDataOptions/dataOrigin/sonTable.vue'
import mainTable from '@/views/masterDataOptions/dataOrigin/mainTable.vue'
import ruleAddTable from '@/views/masterDataOptions/dataOrigin/ruleAddTable.vue'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import configData from './configData'
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import baseNewForm from '../compoments/baseNewForm'
import { deepClone } from '@/utils/index.js'
import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import baseForm from '@/components/base/baseNewForm/index.vue'
import baseRightDialog from '@/components/base/baseRightDialog/index.vue'
import { authApi } from '@/api/apis/auth'
export default {
data() {
return {
mainTempClick: {},//
mainTableData: [],//
mainTabLoading: false,//loading
mainTableColumn: [
{ title: '英文名', id: 'dbName' },
{ title: '表类型', id: 'dbType' },
{ title: '表说明', id: 'remark' },
{ title: '操作', id: 'operation' }
],
mainFunData: [],//
activedTableData: [],//
activedTabLoading: false,//loading
activedTableColumn: [
{ title: '中文名', id: 'chName' },
{ title: '英文名', id: 'enName' },
{ title: '字段类型', id: 'filedType' },
{ title: '长度', id: 'filedLength' },
{ title: '操作', id: 'operation' }
],//
activedFunData: [
{
text: '删除',
color: 'red'
}
],//
ruleAddDialogShow: false,//
receiptsTableData: [],//
mainTableDialogShow: false,//
//
dataTypeDist: {},
//
fieldTypeOptions: [],
sonTableDialogShow: false,//dialog
serviceOptions: []//
}
},
methods: {
//
async initSelect() {
//
const type = await getApiModuleApi({
tl: 'generalServiceImpl',
as: 'dictionaryshop',
dj: 'selectDictionaryshop'
}, { tab_name: 'mdm', column_name: 'mdm_filed_type' })
this.fieldTypeOptions = []
type.attribute.forEach(item => {
//
this.$set(this.dataTypeDist, item.column_value, item.column_content)
this.fieldTypeOptions.push({
label: item.column_content,
id: item.column_value
})
})
this.serviceOptions = []
//
const service = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmService'
}, { remark: '' })
service.attribute.forEach(item => {
console.log(item, 'item')
this.serviceOptions.push({
id: item.dbName,
label: item.remark,
dbId: item.id,
mdmId: item.mdmId
})
})
},
//
async mainOnClick(val) {
if (val.index === -1) return
console.log(val)
//
this.mainTempClick = val
//
const res = await authApi('mdmModuleService', '', 'queryMdmDbField', '', {
mdmId: this.$route.query.id,
dbId: this.mainTempClick.id
})
this.activedTableData = res.attribute
},
// (
mainDeleOnFunc(row, item) {
console.log(row, 'row')
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '是否确定删除?'
this.$confirm(msg)
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
mdmId: this.$route.query.id,
...row
})
this.$vmNews('删除成功!', 'success')
if (this.mainTempClick.id === row.id || row.dbType == 1) {
this.activedTableData = []
this.mainTempClick = {}
}
this.getMainTableHandle()
})
.catch((_) => {
})
},
//
addMainAddRow() {
if (!this.receiptsTableData.length) {
this.$vmNews('请添加单据规则后,再添加数据表。')
return
}
this.mainTableDialogShow = true
this.$nextTick(() => {
//
this.$refs.mainTable.$refs.mainOptionForm.resetFields()
this.$refs.mainTable.mainOptionForm = {}
//
this.$refs.mainTable.mainOptionRow[0].elCol.disabled = false
})
},
//
mainTableEditHandle(row) {
this.mainTableDialogShow = true
this.$nextTick(() => {
//
this.$refs.mainTable.$refs.mainOptionForm.resetFields()
this.$refs.mainTable.mainOptionForm = JSON.parse(JSON.stringify(row))
//
this.$refs.mainTable.mainOptionRow[0].elCol.disabled = true
})
},
//
activedOnClick(val) {
},
//
activedOnFunc(row) {
this.$confirm('是否确定删除?')
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
id: row.id,
mdmId: this.$route.query.id,
dbId: this.mainTempClick.id,
dbName: this.mainTempClick.dbName,
enName: row.enName,
filedType: row.filedType
})
this.$vmNews('删除成功', 'success')
this.mainOnClick(this.mainTempClick)
this.activedTableData.splice(row.index, 1)
})
.catch((_) => {
})
},
//
sonTableEditHandle(row) {
this.sonTableDialogShow = true
this.$nextTick(() => {
//
this.$refs.sonTable.$refs.optionForm.resetFields()
this.$refs.sonTable.$refs.typeOptionForm.resetFields()
this.$refs.sonTable.$refs.propertyForm.resetFields()
this.$refs.sonTable.optionRuleForm = {}
this.$refs.sonTable.typeOptionRuleForm = {}
this.$refs.sonTable.propertyRuleForm = {}
this.$refs.sonTable.propertyActiveList = []
this.$refs.sonTable.propertyFormRow = []
this.$refs.sonTable.typeOptionFormRow = []
//
this.$refs.sonTable.optionFormRow[2].elCol[0].options = this.fieldTypeOptions
this.$refs.sonTable.serviceOptions = this.serviceOptions
this.$refs.sonTable.activedOnClick(row)
})
},
//
activedAddRow() {
this.sonTableDialogShow = true
this.$nextTick(() => {
//
this.$refs.sonTable.$refs.optionForm.resetFields()
this.$refs.sonTable.$refs.typeOptionForm.resetFields()
this.$refs.sonTable.$refs.propertyForm.resetFields()
this.$refs.sonTable.optionRuleForm = {}
this.$set(this.$refs.sonTable.optionRuleForm, 'required', false)
this.$set(this.$refs.sonTable.optionRuleForm, 'disabled', false)
this.$refs.sonTable.typeOptionRuleForm = {}
this.$refs.sonTable.propertyRuleForm = {}
this.$refs.sonTable.propertyActiveList = []
this.$refs.sonTable.propertyFormRow = []
this.$refs.sonTable.typeOptionFormRow = []
this.$refs.sonTable.activedTableRow = {}
//
this.$refs.sonTable.optionFormRow[2].elCol[0].options = this.fieldTypeOptions
this.$refs.sonTable.serviceOptions = this.serviceOptions
})
},
//
ruleAddHandle() {
this.ruleAddDialogShow = true
this.$nextTick(() => {
this.$refs.ruleAddTable.ruleAddTableData = JSON.parse(JSON.stringify(this.receiptsTableData))
})
},
//(
async ruleAddSaveHanlde() {
let tempTableData = this.$refs.ruleAddTable.ruleAddTableData
let type = false
let flag = tempTableData.some((item, index) => {
if (!item.dbType || !item.dbValue) {
this.$vmNews(`请选择${index + 1}行的类型并填写或选择规则`, 'warning')
return true
} else if (item.dbType === '4' && index + 1 !== tempTableData.length) {
type = true
this.$vmNews(`流水号只允许在最后一行`, 'warning')
return true
} else if (item.dbType === '4') {
type = true
}
})
if (!type) {
this.$vmNews(`请添加流水号`, 'warning')
return
}
if (flag) return
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveOrUpdateMdmTableCodeRule', '', {
id: this.$route.query.id,
mdmTableCodeRuleEntityList: tempTableData
})
this.ruleAddDialogShow = false
this.$vmNews('添加单据规则成功', 'success')
//
this.getRuleHandle()
},
//
async getRuleHandle() {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'getMdmTableCodeRule', '', {
mdmId: this.$route.query.id
})
this.receiptsTableData = res.attribute
},
//
mainTableSaveHandle() {
this.$refs.mainTable.$refs.mainOptionForm.$refs['ruleForm'].validate(async(valid) => {
if (valid) {
//
let blacklist = ['id', 'document_rule', 'document_rule_num', 'data_status', 'add_status', 'update_status', 'delete_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id', 'data_id']
let form = this.$refs.mainTable.mainOptionForm
//
if (blacklist.includes(form.dbName)) {
this.$vmNews('当前英文名为系统默认字段,请修改')
return
}
// "dbType":"2",// 1 2
console.log(this.mainTableData.length && !form.id, 'this.mainTableData.length && !form.id', form, this.mainTableData.length)
if (!form.id) {
if (this.mainTableData.length) {
this.$set(form, 'dbType', 2)
} else {
this.$set(form, 'dbType', 1)
}
}
//id
if (form.id) {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmDb', '', {
mdmId: this.$route.query.id,
...form
})
if (res.status == 200) {
this.$vmNews('保存成功', 'success')
this.mainTableDialogShow = false
this.getMainTableHandle()
this.initSelect()
}
} else {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveMdmDb', '', {
mdmId: this.$route.query.id,
...form
})
if (res.status == 200) {
this.$vmNews('保存成功', 'success')
this.mainTableDialogShow = false
this.getMainTableHandle()
this.initSelect()
}
}
} else {
return false
}
})
},
//
sonTableSaveHandle() {
this.$refs.sonTable.$refs.optionForm.submitForm()
},
//
async getMainTableHandle() {
const res = await authApi('mdmModuleService', '', 'queryMdmDb', '', {
mdmId: this.$route.query.id
})
this.mainTableData = res.attribute
},
//
async sonSaveHandle(params) {
if (params.id) {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmDbField', '', params)
this.$vmNews('保存成功!', 'success')
this.sonTableDialogShow = false
//
this.mainOnClick(this.mainTempClick)
} else {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveMdmDbField', '', params)
this.$vmNews('保存成功!', 'success')
this.sonTableDialogShow = false
//
this.mainOnClick(this.mainTempClick)
}
}
},
components: {
baseRightDialog, baseForm,
baseNewForm,
BaseTable,
baseDialog,
ruleAddTable,
mainTable,
sonTable
},
created() {
//
this.getRuleHandle()
//
this.getMainTableHandle()
//
this.initSelect()
//
this.$emit('flashActive', 1)
},
watch: {},
computed: {}
}
</script>
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
}
.wrap {
display: flex;
background-color: #fff;
margin-left: 5px;
border-radius: 8px;
height: calc(100%);
.mainAddRow {
margin-top: 10px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;
}
.bigTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 20px;
text-align: left;
font-style: normal;
}
.mainTable {
flex: 1;
padding: 30px 20px 20px;
border-right: 1px solid #EBEBEB;;
.rule {
display: flex;
align-items: center;
width: 100%;
.name {
margin-right: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 22px;
text-align: left;
font-style: normal;
}
.value {
display: flex;
align-items: center;
border: 1px solid #ebebeb;
padding: 10px 15px;
border-radius: 5px;
}
.btn {
margin-left: 15px;
cursor: pointer;
width: 25px;
height: 25px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 14px;
height: 14px;
}
}
}
.table {
margin-top: 20px;
}
}
.sonTable {
flex: 1;
padding: 30px 20px 20px;
.table {
margin-top: 20px;
}
}
}
.btnList {
display: flex;
align-items: center;
justify-content: center;
.settingBtn {
cursor: pointer;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 14px;
height: 14px;
}
}
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 14px;
height: 14px;
}
}
}
::v-deep .el-table{
max-height: calc(100vh - 230px) !important;
}
::v-deep .el-table__body-wrapper{
max-height: calc(100vh - 230px) !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,83 +0,0 @@
<template>
<div class="mainTable">
<baseNewForm
ref="mainOptionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="mainOptionRow"
:ruleForm="mainOptionForm"
:labelPosition="'top'"
:rules="rules"
@onSubmit="mainOptionOnSubmit"
>
</baseNewForm>
</div>
</template>
<script>
import baseNewForm from '../compoments/baseNewForm'
export default {
name: 'mainTable',
components: {
baseNewForm
},
data() {
return {
mainOptionRow: [
{
elCol: [
{
type: 'input',
title: '英文名',
id: 'dbName',
disabledOfId: true,
row: 24,
disabled: false,
required: true,
fontSize: 16,
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
message: '须以字母开头且不能出现_外的字符与中文'
}
]
},
{
elCol: [
{
type: 'input',
title: '表说明',
id: 'remark',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
}
],
mainOptionForm: {},
rules: {
dbName: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
remark: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
}
}
},
methods: {
mainOptionOnSubmit() {
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -1,172 +0,0 @@
<template>
<div class="ruleAddTable">
<BaseTable
ref="receiptsTable"
:showIndex="true"
:tableData="ruleAddTableData"
:tableColumn="receiptsTableColumn"
:border="false"
:funData="receiptsFunData"
tableHeight="60vh"
@onFunc="receiptsOnFunc"
>
<template #dbType="{row}">
<el-select v-model="row['dbType']" placeholder="请选择"
@change="(val)=>ruleTypeSeleceChangHandle(val,row)"
>
<el-option
v-for="item in ruleTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
<template #dbValue="{row}">
<div v-if="!row['dbType']">请选择格式类型</div>
<div v-else-if="row['dbType'] === '1'">{{ row.dbValue }}</div>
<div v-else-if="row['dbType'] === '2'">
<el-input v-model="row.dbValue"></el-input>
</div>
<div v-else-if="row['dbType'] === '3'">
<el-select v-model="row.dbValue" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in dateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div v-else-if="row['dbType'] === '4'">
<el-input v-model="row.dbValue" @input="(val)=>integerNumber(val,row)"></el-input>
</div>
</template>
<template #operation="{row}">
<div class="deleBtn" @click="receiptsOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</template>
</BaseTable>
<div class="receiptsAddRow" style="margin-top: 30px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;"
>
<el-link
type="primary"
@click="receiptsAddRow"
:underline="false"
>+ 添加
</el-link>
</div>
</div>
</template>
<script>
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
export default {
name: 'ruleAddTable',
components: { BaseTable },
data() {
return {
receiptsTableData: [],//
ruleAddTableData: [],//
receiptsTableColumn: [
{
title: '类型',
id: 'dbType'
},
{
title: '格式规则',
id: 'dbValue'
},
{
title: '操作',
id: 'operation',
width: 70
}
],//
ruleTypeOptions: [
{
label: '连接符号',
value: '1'
}, {
label: '字符串',
value: '2'
}, {
label: '日期',
value: '3'
}, {
label: '流水号',
value: '4'
}
],//
receiptsFunData: [],//
dateOptions: [
{
label: 'yyyy-MM-dd',
value: 'yyyy-MM-dd'
}, {
label: 'yyyyMMdd',
value: 'yyyyMMdd'
}, {
label: 'yyyy-MM-dd HH:mm:ss',
value: 'yyyy-MM-dd HH:mm:ss'
}, {
label: 'yyyyMMddHHmmss',
value: 'yyyyMMddHHmmss'
}, {
label: 'yyyyMMddHHmmssSSS',
value: 'yyyyMMddHHmmssSSS'
}
]
}
},
methods: {
//
receiptsOnFunc(row) {
this.ruleAddTableData.splice(row.index, 1)
},
//
receiptsAddRow() {
this.ruleAddTableData.push({})
},
//
ruleTypeSeleceChangHandle(val, row) {
this.$set(row, 'dbValue', '')
if (val === '1') {
row['dbValue'] = '-'
}
},
//
integerNumber(val, row) {
row['dbValue'] = row['dbValue'].replace(/[^\d]/g, '')
}
}
}
</script>
<style scoped lang="scss">
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
</style>

View File

@ -1,866 +0,0 @@
<template>
<div class="sonTable">
<div class="optionForm">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="optionFormRow"
:ruleForm="optionRuleForm"
:labelPosition="'top'"
@onSelect="selectChangeHanlde"
@inputBlur="optionFormInputBlur"
@onSubmit="optionOnSubmit"
:rules="rules"
>
</baseNewForm>
<baseNewForm
:rules="rules"
ref="typeOptionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="typeOptionFormRow"
:ruleForm="typeOptionRuleForm"
:labelPosition="'top'"
@onSelect="typeSelectChangeHanlde"
@onSubmit="typeOptionOnSubmit"
>
</baseNewForm>
<baseNewForm
:rules="rules"
ref="propertyForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="propertyFormRow"
:ruleForm="propertyRuleForm"
:labelPosition="'top'"
@onSubmit="propertyOnSubmit"
>
</baseNewForm>
</div>
<div class="smtitle">
可选控间属性
</div>
<div class="checkBoxList">
<el-checkbox-group v-model="propertyActiveList"
@change="propertyActiveListChangeHanlde"
>
<el-checkbox v-for="(item,index) in propertyList" :label="item.id" :key="item.id">{{
item.label
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</template>
<script>
import baseNewForm from '../compoments/baseNewForm.vue'
import { deepClone } from '@/utils'
import { getApiModuleApi } from '@/api/apiChunks'
export default {
name: 'sonTable',
props: {
activedTableData: {
type: Array,
default: () => {
return []
}
},
mainTempClick: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
rules:{
chName: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
enName: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
filedType: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
filedLength: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
title: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
row: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
type: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
service: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
label: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
upId: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
},
activedTableRow: {},//
optionFormRow: [
{
elCol: [
{
type: 'input',
title: '中文名称',
id: 'chName',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'input',
title: '英文名称',
id: 'enName',
row: 24,
disabled: false,
required: true,
fontSize: 16,
pattern: /^[a-z][a-z0-9_]{0,50}$/,
message: '必须以小写字母开头,只能包含小写字母、数字和下划线,不能包含中文字符或其他符号。',
disabledOfId: true
}
]
},
{
elCol: [
{
type: 'select',
title: '字段类型',
id: 'filedType',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'num',
title: '长度',
id: 'filedLength',
row: 24,
disabled: false,
required: true,
fontSize: 16,
max: 255
}
]
},
{
elCol: [
{
type: 'input',
title: '显示名',
id: 'title',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
}
, {
elCol: [
{
type: 'select',
title: '宽度',
id: 'row',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: '3',
id: '3'
}, {
label: '6',
id: '6'
}, {
label: '9',
id: '9'
}, {
label: '12',
id: '12'
}, {
label: '15',
id: '15'
}, {
label: '18',
id: '18'
}, {
label: '21',
id: '21'
}, {
label: '24',
id: '24'
}
]
}
]
},
{
elCol: [
{
type: 'num',
title: '单元格宽度',
id: 'width',
row: 24,
disabled: false,
required: false,
fontSize: 16,
message: 'px'
}
]
},
{
elCol: [
{
type: 'select',
title: '数据类型',
id: 'type',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: 'input',
id: 'input'
}, {
label: 'datepick',
id: 'datepick'
},
// {
// label: 'daterange',
// id: 'daterange'
// },
{
label: 'radio',
id: 'radio'
}, {
label: 'textrea',
id: 'textrea'
}, {
label: 'select',
id: 'select'
}, {
label: 'treeselect',
id: 'treeselect'
},
{
label: 'number',
id: 'num'
}
]
}
]
},
{
elCol: [
{
type: 'onecheck',
title: '必填',
id: 'required',
row: 24,
disabled: false,
required: false,
fontSize: 16,
options: [
{
label: '是',
id: 'true'
}, {
label: '否',
id: 'false'
}
]
}
]
},
{
elCol: [
{
type: 'onecheck',
title: '禁止修改',
id: 'disabled',
row: 24,
disabled: false,
required: false,
fontSize: 16,
options: [
{
label: '是',
id: 'true'
}
]
}
]
}
],
optionRuleForm: {},//options
//type
typeOptionFormRow: [],
typeOptionRuleForm: {},//type
propertyFormRow: [],//
propertyRuleForm: {},//
propertyActiveList: [],//v-model)
propertyList: [
{
label: '大于',
id: 'up'
}, {
label: '小于',
id: 'low'
},
{
label: '正则',
id: 'pattern'
},
{ label: '正则提示', id: 'message' }
],//
//
typeDist: {
select: [
{
type: 'select',
id: 'service',
title: '服务名称',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
},
{
type: 'select',
id: 'label',
title: 'label',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}, {
type: 'input',
id: 'value',
title: 'value',
row: 24,
disabled: true,
required: true,
fontSize: 16,
options: []
}
],
radio: [
{
type: 'select',
id: 'service',
title: '服务名称',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
},
{
type: 'select',
id: 'label',
title: 'label',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}, {
type: 'input',
id: 'value',
title: 'value',
row: 24,
disabled: true,
required: true,
fontSize: 16,
options: []
}
],
treeselect: [
{
type: 'select',
id: 'service',
title: '服务名称',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
},
{
type: 'select',
id: 'label',
title: 'label',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}, {
type: 'input',
id: 'value',
title: 'value',
row: 24,
disabled: true,
required: false,
fontSize: 16,
options: []
},
{
type: 'select',
id: 'upId',
title: 'upId',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
serviceOptions: [], //
//radiolist
propertyDist: {
up: {
type: 'select',
id: 'up',
title: '大于',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
},
low: {
type: 'select',
id: 'low',
title: '小于',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
},
pattern: {
type: 'input',
id: 'pattern',
title: '正则',
row: 24,
disabled: false,
required: true,
fontSize: 16
},
message: {
type: 'input',
id: 'message',
title: '正则提示',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
}
}
},
methods: {
//
activedOnClick(val) {
this.activedTableRow = val
//typeruleForm
this.typeOptionFormRow = []
this.typeOptionRuleForm = {
value: 'id'
}
this.propertyFormRow = []
this.propertyRuleForm = {}
this.propertyActiveList = []
let propertyRuleForm = []
let optionRuleForm = []
let typeOptionRuleForm = []
this.$nextTick(() => {
//
this.$refs.optionForm.resetForm()
this.optionRuleForm = deepClone(val)
console.log(this.optionRuleForm, 'this.optionRuleForm')
let dom = document.querySelector('.optionForm')
dom.scrollTo({
top: 0,
behavior: 'smooth'
})
//
if (!val.mdmModuleDbFiledsRules) return
val.mdmModuleDbFiledsRules.forEach(item => {
if (item.ruleCode === 'required' || item.ruleCode === 'disabled') {
if (!item.ruleValue) {
this.$set(this[item.formName], item.ruleCode, false)
} else if (typeof item.ruleValue === 'boolean') {
this.$set(this[item.formName], item.ruleCode, item.ruleValue)
} else {
this.$set(this[item.formName], item.ruleCode, JSON.parse(item.ruleValue))
}
} else {
this.$set(this[item.formName], item.ruleCode, item.ruleValue)
}
if (item.formName === 'propertyRuleForm') {
propertyRuleForm.push(item.ruleCode)
}
})
if (this.typeOptionRuleForm.service) {
this.typeSelectChangeHanlde(this.typeOptionRuleForm.service, '', '', {
id: 'service',
options: this.serviceOptions
}, true)
}
this.selectChangeHanlde(this.optionRuleForm.type, '', '', { id: 'type' }, true)
this.selectChangeHanlde(this.optionRuleForm.filedType, '', '', { id: 'filedType' }, true)
this.propertyActiveList = propertyRuleForm
this.propertyActiveListChangeHanlde(this.propertyActiveList)
})
},
//type
selectChangeHanlde(val, index, indexRow, row, init = false) {
if (row.id === 'type') {
this.typeOptionFormRow = []
if (!init) {
this.typeOptionRuleForm = {
value: 'id'
}
}
if (val && this.typeDist[val]) {
this.typeDist[val].forEach(item => {
//
if (item.id === 'service') {
item.options = deepClone(this.serviceOptions)
}
let tempObj = {
elCol: [
{
...item
}
]
}
this.typeOptionFormRow.push(tempObj)
})
}
}
//
if (row.id === 'filedType') {
if (val) {
let dist = {
1: [
{
label: 'number',
id: 'num'
}
],
2: [
{
label: 'number',
id: 'num'
}
],
3: [
{
label: 'input',
id: 'input'
},
{
label: 'radio',
id: 'radio'
},
{
label: 'textrea',
id: 'textrea'
},
{
label: 'select',
id: 'select'
},
{
label: 'treeselect',
id: 'treeselect'
}
],
4: [
{
label: 'datepick',
id: 'datepick'
}
// {
// label: 'daterange',
// id: 'daterange'
// }
]
}
this.optionFormRow[7].elCol[0].options = dist[val]
if (val == 4) {
this.optionFormRow[3].elCol[0].disabled = true
this.optionFormRow[3].elCol[0].required = false
this.$set(this.optionRuleForm, 'filedLength', '')
} else {
this.optionFormRow[3].elCol[0].disabled = false
this.optionFormRow[3].elCol[0].required = true
}
} else {
this.optionFormRow[3].elCol[0].disabled = false
this.optionFormRow[3].elCol[0].required = true
}
if (!init) {
this.$set(this.optionRuleForm, 'type', '')
this.typeOptionFormRow = []
this.typeOptionRuleForm = {}
}
}
}
,
//
optionFormInputBlur(id, row) {
if (id === 'chName' && !row.title) {
this.$set(row, 'title', row['chName'])
}
}
,
//
optionOnSubmit() {
this.$refs.typeOptionForm.submitForm()
}
,
//typelabel
async typeSelectChangeHanlde(val, index, indexRow, row, initFlag = false) {
if (row.id === 'service') {
if (val) {
let obj = row.options.find(item => {
return val === item.id
})
console.log(obj, 'obj')
const res = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmServiceField'
}, { mdmId: obj.mdmId, dbId: obj.dbId })
this.labelOptions = []
res.attribute.forEach(item => {
this.labelOptions.push({
id: item.enName,
label: item.chName
})
})
} else {
this.labelOptions = []
}
this.typeOptionFormRow.forEach(item => {
if (item.elCol[0].id === 'label' || item.elCol[0].id === 'upId') {
if (!initFlag) {
this.$set(this.typeOptionRuleForm, item.elCol[0].id, '')
}
item.elCol[0].options = deepClone(this.labelOptions)
}
})
}
}
,
//type
typeOptionOnSubmit() {
this.$refs.propertyForm.submitForm()
}
,
//
propertyOnSubmit() {
console.log('进入保存方法', this.activedTableRow)
let params = {
mdmId: this.$route.query.id,
dbId: this.mainTempClick.id,
dbType: this.mainTempClick.dbType,
dbName: this.mainTempClick.dbName,
id: this.activedTableRow.id
}
//
let tempDist = {
title: true,
row: true,
type: true,
required: true,
disabled: true,
width: true
}
let tempArr = []
let disabledWords = ['id', 'formmain_id', 'data_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id', 'data_id']
if (disabledWords.includes(this.optionRuleForm.enName)) {
this.$vmNews(`暂存失败,英文名${this.optionRuleForm.enName}不合法。`)
return
}
if (this.optionRuleForm.type === 'datepick' || this.optionRuleForm.type === 'daterange') {
if (this.optionRuleForm.filedType != 4) {
this.$vmNews('字段类型与数据类型不合法,请选择日期类型', 'warning')
return
}
}
if (this.optionRuleForm.filedType == 4) {
if (this.optionRuleForm.type !== 'datepick' && this.optionRuleForm.type !== 'daterange') {
this.$vmNews('字段类型与数据类型不合法', 'warning')
return
}
}
if (this.optionRuleForm.filedLength * 1 > 255) {
this.$vmNews('长度不能大于255')
return
}
if (this.optionRuleForm.filedType == 2 && this.optionRuleForm.filedLength * 1 > 65) {
this.$vmNews('当字段类型为金额时长度不得大于65')
return
}
this.$set(params, 'chName', this.optionRuleForm.chName)
this.$set(params, 'enName', this.optionRuleForm.enName)
this.$set(params, 'filedType', this.optionRuleForm.filedType)
this.$set(params, 'filedLength', this.optionRuleForm.filedLength)
this.optionFormRow.forEach(item => {
if (tempDist[item.elCol[0].id]) {
tempArr.push({
ruleName: item.elCol[0].title,
ruleCode: item.elCol[0].id,
ruleValue: this.optionRuleForm[item.elCol[0].id],
ruleType: 2,
formName: 'optionRuleForm'
})
}
})
this.typeOptionFormRow.forEach(item => {
tempArr.push({
ruleName: item.elCol[0].title,
ruleCode: item.elCol[0].id,
ruleValue: this.typeOptionRuleForm[item.elCol[0].id],
ruleType: 2,
formName: 'typeOptionRuleForm'
})
})
this.propertyFormRow.forEach(item => {
tempArr.push({
ruleName: item.elCol[0].title,
ruleCode: item.elCol[0].id,
ruleValue: this.propertyRuleForm[item.elCol[0].id],
ruleType: 2,
formName: 'propertyRuleForm'
})
})
params.mdmModuleDbFiledsRules = tempArr
console.log(params)
this.$emit('sonSaveHandle', params)
}
,
//
propertyActiveListChangeHanlde(val) {
this.propertyFormRow = []
//
Object.keys(this.propertyRuleForm).forEach(item => {
if (!val.includes(item)) {
this.$delete(this.propertyRuleForm, item)
}
})
if (val === 'up' || val === 'low') {
this.activedTableData.forEach(item => {
tempOptions.push({ label: item.id, chName: item.enName })
})
}
//
val.forEach(item => {
let tempOptions = []
//datepick
if (item === 'up' || item === 'low') {
this.activedTableData.some(ele => {
console.log(ele, 'ele')
if (this.activedTableRow.id === ele.id || !ele.mdmModuleDbFiledsRules) return false
ele.mdmModuleDbFiledsRules.forEach(ele02 => {
if (ele02.ruleValue === 'datepick') {
tempOptions.push({ label: ele.chName, id: ele.enName })
}
})
})
}
let tempObj = {
elCol: [
{
...this.propertyDist[item],
options: tempOptions
}
]
}
this.propertyFormRow.push(tempObj)
})
}
},
components: {
baseNewForm
}
}
</script>
<style scoped lang="scss">
.smtitle {
color: #333;
font-weight: 400;
padding: 20px 0;
border-top: 1px solid #EBEBEB;
}
.checkBoxList {
padding-bottom: 50px;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,608 +0,0 @@
<template>
<div class="displayInfo" v-loading="mainLoading">
<div class="typeSetting">
<div class="btn">
<div class="title">显示类型</div>
<div class="chunk">
<el-button
v-if="!editFlag"
icon="el-icon-edit"
type="primary"
@click="editFlag=true"
>编辑
</el-button>
<el-button
v-if="editFlag"
icon="el-icon-close"
@click="getRuleForm"
:loading="saveLoading"
>取消
</el-button>
<el-button
v-if="editFlag"
icon="el-icon-first-aid-kit"
type="primary"
@click="saveHandle"
:loading="saveLoading"
>保存
</el-button>
</div>
</div>
<template v-if="!editFlag">
<div class="radio" style="margin-bottom: 20px">
<el-radio-group v-model="displayType" :disabled="true">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'right'"
labelWidth="100px"
@onSubmit="onSubmit"
:lookFlag="true"
>
</baseNewForm>
</div>
</template>
<template v-else>
<div class="radio" style="margin-bottom: 20px">
<el-radio-group v-model="displayType">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'right'"
labelWidth="100px"
@onSubmit="onSubmit"
>
</baseNewForm>
</div>
</template>
</div>
<div class="main">
<div class="content">
<div class="showItem">
<div class="itemTitle">查询</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('查询')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in dbQueryFiled" :key="index">
<div class="name">{{ item.viewName }}</div>
</div>
</div>
</div>
<div class="showItem">
<div class="itemTitle">列表</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('列表')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in dbListFiled" :key="index">
<div class="name">{{ item.viewName }}</div>
</div>
</div>
</div>
<div class="showItem">
<div class="itemTitle">新增</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('新增')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in dbAddFiled" :key="index">
<div class="name">{{ item.viewName }}</div>
</div>
</div>
</div>
<div class="showItem">
<div class="itemTitle">修改</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('修改')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in dbEditFiled" :key="index">
<div class="name">{{ item.viewName }}</div>
</div>
</div>
</div>
<div class="showItem">
<div class="itemTitle">查看</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('查看')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in dbShowFiled" :key="index">
<div class="name">{{ item.viewName }}</div>
</div>
</div>
</div>
<div class="showItem">
<div class="itemTitle">按钮</div>
<div class="setting">
<div class="settingBox" @click="settingHandle('按钮')">
<div class="img">
<img src="./images/设置.png" alt="">
</div>
<div class="value">设置</div>
</div>
</div>
<div class="showCheckBoxList">
<div class="showCheckBoxItem" v-for="(item,index) in btnShowList" :key="index">
<div class="name">{{ item.name }}</div>
</div>
</div>
</div>
</div>
</div>
<!-- -->
<base-right-dialog
ref="mainTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="mainTableDialogShow"
:title="activeTitle + '设置'"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="mainTableSaveHandle"
@handleClose="mainTableDialogShow=false"
>
<div class="mainTable">
<settingChunk ref="settingChunk" @saveSuccessEmit="saveSuccessEmit"></settingChunk>
</div>
</base-right-dialog>
</div>
</template>
<script>
import settingChunk from '@/views/masterDataOptions/displayInfo/settingChunk.vue'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import baseRightDialog from '@/components/base/baseRightDialog/index.vue'
import { authApi } from '@/api/apis/auth'
export default {
name: 'index.vue',
data() {
return {
formRow: [
{
elCol: [
{
type: 'select',
title: '显示字段',
id: 'viewFiled',
row: 6,
disabled: false,
required: true,
fontSize: 16,
options: []
},
{
type: 'select',
title: '上级id字段',
id: 'upIdFiled',
row: 6,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
}
],
ruleForm: {},
ainLoading: false,
displayType: '1',//
saveLoading: false,//loading
activeTitle: '',//key
mainTableDialogShow: false,
mainLoading: false,
'dbQueryFiled': [],//
'dbAddFiled': [],//
'dbEditFiled': [],//
'dbShowFiled': [],//
'dbListFiled': [],//
btnShowList: [],//
allFiledList: [
{
buttonName: '新建',
buttonValue: 'new',
buttonType: '1'
}, {
buttonName: '重置',
buttonValue: 'resize',
buttonType: '2'
}, {
buttonName: '查询',
buttonValue: 'search',
buttonType: '3'
}, {
buttonName: '修改',
buttonValue: 'edit',
buttonType: '4'
}, {
buttonName: '删除',
buttonValue: 'dele',
buttonType: '5'
}, {
buttonName: '查看',
buttonValue: 'view',
buttonType: '6'
}, {
buttonName: '下发',
buttonValue: 'send',
buttonType: '7'
}
],//
dist: {
'查询': ['queryFiled', 'dbQueryFiled', 1],
'列表': ['listFiled', 'dbListFiled', 2],
'新增': ['addFiled', 'dbAddFiled', 3],
'修改': ['editFiled', 'dbEditFiled', 4],
'查看': ['showFiled', 'dbShowFiled', 5]
},//
editFlag: false
}
},
methods: {
async initSelect() {
const res = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmMainDBField'
}, {
mdmId: this.$route.query.id
})
if (res.status === '200') {
this.formRow[0].elCol[1].options = []
this.formRow[0].elCol[0].options = []
res.attribute.forEach(item => {
this.formRow[0].elCol[1].options.push({
label: item.chName,
id: item.enName
})
this.formRow[0].elCol[0].options.push({
label: item.chName,
id: item.enName
})
})
}
},
//
saveSuccessEmit() {
this.mainTableDialogShow = false
this.getAllField()
},
//
async onSubmit() {
if (this.ruleForm.id) {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmView', '', {
...this.ruleForm,
mdmId: this.$route.query.id,
viewName: this.displayType
})
this.$vmNews('保存成功', 'success')
this.editFlag = false
this.getRuleForm()
} else {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveMdmView', '', {
...this.ruleForm,
mdmId: this.$route.query.id,
viewName: this.displayType
})
this.$vmNews('保存成功', 'success')
this.editFlag = false
this.getRuleForm()
}
},
//
async getRuleForm() {
this.ruleForm = {}
const res = await authApi('mdmModuleService', '', 'queryMdmView', '', {
mdmId: this.$route.query.id
})
console.log(res.attribute, 'res.attribute', res)
this.ruleForm = res.attribute ? res.attribute : {}
this.displayType = this.ruleForm.viewName ? this.ruleForm.viewName : '1'
this.editFlag = false
},
//
saveHandle() {
if (this.displayType === '1') {
this.$refs.optionForm.submitForm()
} else {
this.onSubmit()
}
},
//
settingHandle(key) {
if (!this.ruleForm.id) {
this.$vmNews('请先添加显示类型后再配置按钮')
return
}
this.activeTitle = key
this.mainTableDialogShow = true
this.$nextTick(() => {
this.$refs.settingChunk.getAllBtn(key)
})
},
//
mainTableSaveHandle() {
this.$refs.settingChunk.saveHandle()
},
//
async getAllField() {
//
const res = await authApi('mdmModuleService', '', 'queryMdmViewField', '', {
id: this.$route.query.id
})
console.log(res, 'res')
this.dbQueryFiled = res.attribute.dbQueryFiled
this.dbListFiled = res.attribute.dbListFiled
this.dbAddFiled = res.attribute.dbAddFiled
this.dbEditFiled = res.attribute.dbEditFiled
this.dbShowFiled = res.attribute.dbShowFiled
//
const res2 = await authApi('mdmModuleService', '', 'queryMdmViewButton', '', {
mdmId: this.$route.query.id
})
res2.attribute.forEach(item => {
item.name = this.allFiledList[item.buttonType - 1].buttonName
})
this.btnShowList = res2.attribute
}
},
components: {
baseRightDialog,
baseNewForm,
settingChunk
},
created() {
//
this.getRuleForm()
//
this.initSelect()
//
this.getAllField()
this.$emit('flashActive', 2)
}
}
</script>
<style scoped lang="scss">
::v-deep .el-form-item__content {
margin: 0 !important;
}
::v-deep .el-menu-item {
padding: 0 35px;
}
::v-deep .el-transfer-panel {
width: 25vw;
height: 60vh;
}
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-transfer-panel__list {
height: 50vh;
}
::v-deep .el-transfer-panel__body {
height: 50vh;
}
.displayInfo {
background-color: #f5f5f5;
position: relative;
margin-left: 5px;
width: 99.5%;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
.typeSetting {
background-color: #fff;
padding: 20px 10px 0px;
padding-bottom: 20px;
margin-bottom: 10px;
border-radius: 16px;
width: 100%;
> .btn {
padding-top: 10px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-weight: 600;
margin-left: 20px;
margin-bottom: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
}
> .title {
font-weight: 600;
margin-left: 20px;
margin-bottom: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
> .radio {
margin: 10px 20px;
}
> .tabIndex {
margin-top: 10px;
}
}
.main {
border-radius: 16px;
background-color: #fff;
padding: 15px 10px;
width: 100%;
overflow: auto;
.content {
margin-top: 1vh;
display: flex;
align-items: center;
width: 2000px;
.showItem {
flex: 1;
margin-left: 15px;
height: 55vh;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #EBEBEB;
padding: 14px 20px;
position: relative;
.itemTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 16px;
color: #333333;
line-height: 22px;
font-style: normal;
text-align: center;
padding-bottom: 20px;
border-bottom: 1px #ebebeb solid;
}
.setting {
width: 100%;
height: 15vh;
position: absolute;
bottom: 0;
left: 0;
border-radius: 8px;
display: none;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, .6);
.settingBox {
cursor: pointer;
.img {
width: 5vh;
height: 5vh;
img {
width: 100%;
height: 100%;
}
}
.value {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color: #FFFFFF;
line-height: 22px;
text-align: center;
font-style: normal;
}
}
}
&:hover {
.setting {
display: flex !important;
}
}
.showCheckBoxList {
height: 90%;
overflow: auto;
}
.showCheckBoxItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 16px 0 16px;
border-radius: 4px;
font-size: 14px;
.btn {
color: grey;
cursor: pointer;
}
}
}
}
}
}
</style>

View File

@ -1,442 +0,0 @@
<template>
<div class="displayInfo">
<div class="btn">
<div class="chunk">
<el-button
icon="el-icon-back"
@click="
$router.replace({ path: '/integrationOption/masterDataOptions' })
"
>返回
</el-button
>
</div>
<div class="chunk">
<el-button
icon="el-icon-first-aid-kit"
type="primary"
@click="saveHandle"
:loading="saveLoading"
>保存
</el-button
>
</div>
</div>
<div class="main" v-loading="mainLoading">
<div class="title">显示类型</div>
<div class="radio">
<el-radio-group v-model="displayType">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'left'"
labelWidth="80px"
@onSubmit="onSubmit">
</baseNewForm>
</div>
<div class="tabIndex">
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-menu-item index="1">查询</el-menu-item>
<el-menu-item index="2">列表</el-menu-item>
<el-menu-item index="3">新增</el-menu-item>
<el-menu-item index="4">修改</el-menu-item>
<el-menu-item index="5">查看</el-menu-item>
</el-menu>
</div>
<div class="content">
<el-transfer
style="text-align: left; display: inline-block;"
v-model="contentFormArr"
filterable
:titles="['全部字段', '显示字段']"
target-order="push"
@change="handleChange"
@right-check-change="rightCheckChange"
:props="propsKey"
:data="data">
<span slot-scope="{ option }">{{ option.name }}</span>
</el-transfer>
<div class="buttonList">
<div class="upBtn">
<el-button type="primary" icon="el-icon-top" @click="upHanlde"
:disabled="rightActived.length !== 1"></el-button>
</div>
<div class="downBtn">
<el-button type="primary" icon="el-icon-bottom" @click="downHanlde"
:disabled="rightActived.length !==1"></el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
import {getApiModuleApi} from "@/api/apiChunks/index.js";
export default {
name: "index.vue",
data() {
return {
mainLoading:false,
saveLoading:false,
id: "",
propsKey: {
key: "id",
label: "name",
disabled: "disabled"
},
displayType: "1",
formRow: [
{
elCol: [
{
type: "select",
title: "显示字段",
id: "viewFiled",
row: 12,
disabled: false,
required: true,
fontSize: 16,
options: [],
},
{
type: "select",
title: "上级id字段",
id: "upIdFiled",
row: 12,
disabled: false,
required: true,
fontSize: 16,
options: [],
},
]
}
],
ruleForm: {},
activeIndex: "1",
contentFormArr: [],
data: [],
rightActived: [],
addFiled: [],
dbAddFiled: [],
editFiled: [],
dbEditFiled: [],
showFiled: [],
dbShowFiled: [],
queryFiled: [],
dbQueryFiled: [],
listFiled: [],
dbListFiled: [],
}
},
methods: {
async init() {
this.mainLoading = true
this.activeIndex = "1"
const res = await getApiModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmModuleView",
}, {
id: this.$route.query.id
})
this.mainLoading = false
this.addFiled = res.attribute.addFiled
this.dbAddFiled = res.attribute.dbAddFiled
this.initDispose(this.addFiled, this.dbAddFiled)
this.editFiled = res.attribute.editFiled
this.dbEditFiled = res.attribute.dbEditFiled
this.initDispose(this.editFiled, this.dbEditFiled)
this.showFiled = res.attribute.showFiled
this.dbShowFiled = res.attribute.dbShowFiled
this.initDispose(this.showFiled, this.dbShowFiled)
this.queryFiled = res.attribute.queryFiled
this.dbQueryFiled = res.attribute.dbQueryFiled
this.initDispose(this.queryFiled, this.dbQueryFiled)
this.listFiled = res.attribute.listFiled
this.dbListFiled = res.attribute.dbListFiled
this.initDispose(this.listFiled, this.dbListFiled)
this.data = this.queryFiled
this.contentFormArr = []
this.dbQueryFiled.forEach(item => {
this.contentFormArr.push(item.id)
})
this.id = res.attribute.mdmModuleViewEntity.id
if (!res.attribute.mdmModuleViewEntity.viewName) return
this.displayType = res.attribute.mdmModuleViewEntity.viewName
this.ruleForm = {
viewFiled: res.attribute.mdmModuleViewEntity.viewFiled,
upIdFiled: res.attribute.mdmModuleViewEntity.upIdFiled,
}
},
async initSelect() {
const res = await getApiModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmModuleServerMainFiled"
}, {
mdmId: this.$route.query.id
})
console.log(res, 'select')
if (res.status === '200') {
this.formRow[0].elCol[1].options = []
this.formRow[0].elCol[0].options = []
res.attribute.forEach(item => {
this.formRow[0].elCol[1].options.push({
label: item.chName,
id: item.enName,
})
this.formRow[0].elCol[0].options.push({
label: item.chName,
id: item.enName,
})
})
}
},
async saveHandle() {
if (this.displayType === '1') {
this.$refs.optionForm.submitForm()
} else {
this.saveLoading = true
let params = {
id: this.$route.query.id,
mdmModuleViewEntity: {
id: this.id,
viewName: this.displayType
},
addFiled: this.dbAddFiled,
editFiled: this.dbEditFiled,
showFiled: this.dbShowFiled,
queryFiled: this.dbQueryFiled,
listFiled: this.dbListFiled,
}
const res = await getApiModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "doSaveMdmModuleView",
}, params)
if (res.status === '200') {
this.$vmNews("保存成功!", "success")
this.init()
this.$store.dispatch("GenerateRoutes")
}
this.saveLoading = false
}
},
//
async onSubmit() {
if (this.ruleForm.viewFiled === this.ruleForm.upIdFiled) {
this.$vmNews("显示字段与上级id字段不能相同", "warning")
return
}
this.saveLoading = true
let params = {
id: this.$route.query.id,
mdmModuleViewEntity: {
id: this.id,
viewName: this.displayType,
...this.ruleForm
},
addFiled: this.dbAddFiled,
editFiled: this.dbEditFiled,
showFiled: this.dbShowFiled,
queryFiled: this.dbQueryFiled,
listFiled: this.dbListFiled,
}
const res = await getApiModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "doSaveMdmModuleView",
}, params)
if (res.status === '200') {
this.$vmNews("保存成功!", "success")
this.$store.dispatch("GenerateRoutes")
this.init()
}
this.saveLoading = false
},
handleSelect(key, keyPath) {
this.activeIndex = key
this.rightActived = []
let tempObj = {
1: ['queryFiled', 'dbQueryFiled'],
2: ['listFiled', 'dbListFiled'],
3: ['addFiled', 'dbAddFiled'],
4: ['editFiled', 'dbEditFiled'],
5: ['showFiled', 'dbShowFiled']
}
this.data = this[tempObj[key][0]]
this.contentFormArr = []
this[tempObj[key][1]].forEach(item => {
this.contentFormArr.push(item.id)
})
},
handleChange(value, direction, movedKeys) {
let tempObj = {
1: ['queryFiled', 'dbQueryFiled'],
2: ['listFiled', 'dbListFiled'],
3: ['addFiled', 'dbAddFiled'],
4: ['editFiled', 'dbEditFiled'],
5: ['showFiled', 'dbShowFiled']
}
this.disposeDataArr(value)
this.rightActived = []
},
initDispose(arr1, arr2) {
arr2.forEach(item => {
arr1.some(ele => {
if (item.viewFiled === ele.id) {
item.id = ele.id
item.name = ele.name
return true
}
return false
})
})
},
rightCheckChange(arr) {
this.rightActived = arr
},
//
upHanlde() {
const index = this.contentFormArr.findIndex(ele => {
return this.rightActived[0] === ele
})
if (index === 0) {
this.$vmNews("排序为1时无法向上")
return
}
const tempDele = this.contentFormArr.splice(index, 1)
this.contentFormArr.splice(index - 1, 0, tempDele[0])
this.disposeDataArr(this.contentFormArr)
},
//
downHanlde() {
const index = this.contentFormArr.findIndex(ele => {
return this.rightActived[0] === ele
})
if (index === this.contentFormArr.length - 1) {
this.$vmNews("末尾排序无法向下排序")
return
}
const tempDele = this.contentFormArr.splice(index, 1)
this.contentFormArr.splice(index + 1, 0, tempDele[0])
this.disposeDataArr(this.contentFormArr)
},
disposeDataArr(arr) {
let tempObj = {
1: ['queryFiled', 'dbQueryFiled'],
2: ['listFiled', 'dbListFiled'],
3: ['addFiled', 'dbAddFiled'],
4: ['editFiled', 'dbEditFiled'],
5: ['showFiled', 'dbShowFiled']
}
this[tempObj[this.activeIndex][1]] = []
arr.forEach((idNum, index) => {
this.data.some(item => {
if (item.id === idNum) {
this[tempObj[this.activeIndex][1]].push({...item, sort: index})
return true
} else {
return false
}
})
})
}
},
components: {
baseNewForm
},
created() {
this.init()
this.initSelect()
this.$emit("flashActive", 2)
}
}
</script>
<style scoped lang="scss">
::v-deep .el-menu-item {
padding: 0 35px;
}
::v-deep .el-transfer-panel {
width: 25vw;
height: 60vh;
}
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-transfer-panel__list {
height: 50vh;
}
::v-deep .el-transfer-panel__body {
height: 50vh;
}
.displayInfo {
background-color: #fbfbfb;
width: 100%;
position: relative;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
background-color: #fff;
border-right: 8px;
height: 85vh;
overflow: auto;
margin-top: 10px;
padding: 0px 15px;
> .title {
font-weight: 600;
margin: 15px 0;
}
> .radio {
margin: 15px 20px;
}
> .tabIndex {
margin-top: 10px;
}
> .content {
margin-top: 30px;
display: flex;
align-items: center;
.buttonList {
margin-left: 50px;
.downBtn {
margin-top: 30px;
}
}
}
}
}
</style>

View File

@ -1,289 +0,0 @@
<template>
<div class="settingChunk">
<div class="leftAll">
<div class="search">
<el-input
placeholder="搜索"
prefix-icon="el-icon-search"
v-model="searchValue"
>
</el-input>
</div>
<div class="checkBoxList">
<!-- 字段-->
<template v-if="showFiledFlag">
<el-checkbox-group v-model="pickList" @change="checkBoxChangeHandle">
<template v-for="(item,index) in allBtnList">
<div class="checkBoxItem" :key="item.id" v-if="item.name.includes(searchValue)">
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
</div>
</template>
</el-checkbox-group>
</template>
<!-- 按钮类型-->
<template v-else>
<el-checkbox-group v-model="pickList" @change="changeBtnBoxHandle">
<template v-for="(item,index) in allFiledList">
<div class="checkBoxItem" :key="item.buttonType" v-if="item.buttonName.includes(searchValue)">
<el-checkbox :label="item.buttonType">{{ item.buttonName }}</el-checkbox>
</div>
</template>
</el-checkbox-group>
</template>
</div>
</div>
<div class="rightAdd">
<div class="pickTitle">已选择{{ pickShowList.length }}</div>
<div class="showCheckBoxList">
<draggable v-model="pickShowList">
<template v-if="showFiledFlag">
<div class="showCheckBoxItem" v-for="(item,index) in pickShowList" :key="item.viewFiled">
<div class="name">{{ item.name }}</div>
<div class="btn" @click="deleShowList(item,index)">x</div>
</div>
</template>
<template v-else>
<div class="showCheckBoxItem" v-for="(item,index) in pickShowList" :key="item.buttonType">
<div class="name">{{ item.buttonName }}</div>
<div class="btn" @click="deleBtnShowList(item,index)">x</div>
</div>
</template>
</draggable>
</div>
</div>
</div>
</template>
<script>
import draggable from 'vuedraggable'
import { authApi } from '@/api/apis/auth'
export default {
name: 'settingChunk',
data() {
return {
searchValue: '',//
allBtnList: [],//
allFiledList: [
{
buttonName: '新建',
buttonValue: 'new',
buttonType: '1'
}, {
buttonName: '重置',
buttonValue: 'resize',
buttonType: '2'
}, {
buttonName: '查询',
buttonValue: 'search',
buttonType: '3'
}, {
buttonName: '修改',
buttonValue: 'edit',
buttonType: '4'
}, {
buttonName: '删除',
buttonValue: 'dele',
buttonType: '5'
}, {
buttonName: '查看',
buttonValue: 'view',
buttonType: '6'
}, {
buttonName: '下发',
buttonValue: 'send',
buttonType: '7'
}
],//
//key''viewType
dist: {
'查询': ['queryFiled', 'dbQueryFiled', 1],
'列表': ['listFiled', 'dbListFiled', 2],
'新增': ['addFiled', 'dbAddFiled', 3],
'修改': ['editFiled', 'dbEditFiled', 4],
'查看': ['showFiled', 'dbShowFiled', 5]
},
pickDist: {},//
pickList: [],//
pickShowList: [],//
thisKey: '',//key
showFiledFlag: true//
}
},
methods: {
//
async getAllBtn(key) {
this.showFiledFlag = true
this.thisKey = key
//
this.pickShowList = []
this.pickList = []
this.searchValue = ''
this.allBtnList = []
this.pickDist = {}
//
if (this.dist[key]) {
const res = await authApi('mdmModuleService', '', 'queryMdmViewField', '', {
id: this.$route.query.id
})
let tempArr = this.dist[key]
res.attribute[tempArr[0]].forEach(item => {
this.$set(this.pickDist, item.id, item.name)
})
this.allBtnList = res.attribute[tempArr[0]]
res.attribute[tempArr[1]].forEach(item => {
this.pickList.push(item.viewFiled)
this.checkBoxChangeHandle()
})
} else {
this.showFiledFlag = false
const res = await authApi('mdmModuleService', '', 'queryMdmViewButton', '', {
mdmId: this.$route.query.id
})
res.attribute.forEach(item => {
this.pickList.push(item.buttonType)
})
this.changeBtnBoxHandle()
}
},
//
checkBoxChangeHandle() {
let tempList = []
this.pickShowList = []
//listdist
this.pickList.forEach(item => {
this.pickShowList.push({
name: this.pickDist[item],
viewFiled: item
})
})
},
//
changeBtnBoxHandle() {
this.pickShowList = []
this.pickList.forEach(item => {
let obj = this.allFiledList[item - 1]
this.pickShowList.push(obj)
})
},
//
deleShowList(item, index) {
this.pickShowList.splice(index, 1)
//box
let tempArr = []
this.pickShowList.forEach((item) => {
tempArr.push(item.viewFiled)
})
this.pickList = tempArr
},
//
deleBtnShowList(item, index) {
this.pickShowList.splice(index, 1)
let tempArr = []
this.pickShowList.forEach((item) => {
tempArr.push(item.buttonType)
})
this.pickList = tempArr
},
//
async saveHandle() {
//
if (this.showFiledFlag) {
//
let keyArr = this.dist[this.thisKey]
let params = {
mdmId: this.$route.query.id,
viewType: keyArr[2]
}
params[keyArr[1]] = this.pickShowList
this.openLoading("submit")
const res = await authApi('mdmModuleService', '', 'saveOrUpdateMdmViewField', '', params)
this.$vmNews('保存成功!', 'success')
this.$emit('saveSuccessEmit')
} else {
//
let params = {
mdmId: this.$route.query.id,
dbButtonFiled: this.pickShowList
}
this.openLoading("submit")
const res = await authApi('mdmModuleService', '', 'saveOrUpdateMdmViewButton', '', params)
this.$vmNews('保存成功!', 'success')
this.$emit('saveSuccessEmit')
}
}
},
mounted() {
},
components: {
draggable
}
}
</script>
<style scoped lang="scss">
.settingChunk {
display: flex;
height: 80vh;
.leftAll {
flex: 1;
padding: 0 20px;
border-right: 1px solid #EBEBEB;
.search {
width: 100%;
}
.checkBoxList {
height: 70vh;
overflow: auto;
}
.checkBoxItem {
margin: 20px 0 16px;
}
}
.rightAdd {
flex: 1;
padding: 0 20px;
.pickTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
font-style: normal;
}
.showCheckBoxList {
height: 70vh;
overflow: auto;
}
.showCheckBoxItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 10px 0 10px;
padding: 15px 10px;
background: #F8F8F8;
border-radius: 4px;
cursor: move; /* 将指针换成拖动样式 */
user-select: none; /* 禁止选择文字 */
.btn {
color: grey;
cursor: pointer;
}
}
}
}
</style>

View File

@ -1,614 +0,0 @@
<template>
<div class="linkk" ref="link" :style="style">
<div class="left">
<div class="title">
<h1>执行动作入参数</h1>
</div>
<template v-for="(item, index) in leftData">
<div
class="treebox"
@mouseenter="leftMouseenterHandle(item)"
@mouseleave="leftMouseleaveHandle(item)"
>
<div class="tree" :key="index">
<span>{{ item.label }}</span>
<span style="font-size: 12px; color: gray; padding-left: 10px">{{
item.type
}}</span>
</div>
<div class="btn">
<el-checkbox
:fill="item.stroke ? item.stroke : '#000000'"
v-model="item.value"
:disabled="!!lookFlag"
@change="
(val, $event) =>
leftCheckBoxHandle(val, item, $event, [item.id], item.label)
"
></el-checkbox>
</div>
</div>
<template v-if="item.children">
<template v-for="(item01, index01) in item.children">
<div
class="treebox"
@mouseenter="leftMouseenterHandle(item01)"
@mouseleave="leftMouseleaveHandle(item01)"
>
<div class="tree" style="margin-left: 15px">
<span>{{ item01.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item01.type }}</span
>
</div>
<div class="btn">
<el-checkbox
v-model="item01.value"
:disabled="!!lookFlag"
@change="
(val, $event) =>
leftCheckBoxHandle(
val,
item01,
$event,
[item.id, item01.id],
item.label + '.' + item01.label
)
"
></el-checkbox>
</div>
</div>
<template v-if="item01.children">
<template v-for="(item02, index02) in item01.children">
<div
class="treebox"
@mouseenter="leftMouseenterHandle(item02)"
@mouseleave="leftMouseleaveHandle(item02)"
>
<div class="tree" style="margin-left: 30px">
<span>{{ item02.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item02.type }}</span
>
</div>
<div class="btn">
<el-checkbox
v-model="item02.value"
:disabled="!!lookFlag"
@change="
(val, $event) =>
leftCheckBoxHandle(
val,
item02,
$event,
[item.id, item01.id, item02.id],
item.label + '.' + item01.label + '.' + item02.label
)
"
></el-checkbox>
</div>
</div>
<template v-if="item02.children">
<template v-for="(item03, index03) in item02.children">
<div
class="treebox"
@mouseenter="leftMouseenterHandle(item03)"
@mouseleave="leftMouseleaveHandle(item03)"
>
<div class="tree" style="margin-left: 45px">
<span>{{ item03.label }}</span>
<span
style="
font-size: 12px;
color: gray;
padding-left: 10px;
"
>{{ item03.type }}</span
>
</div>
<div class="btn">
<el-checkbox
v-model="item03.value"
:disabled="!!lookFlag"
@change="
(val, $event) =>
leftCheckBoxHandle(
val,
item03,
$event,
[item.id, item01.id, item02.id, item03.id],
item.label +
'.' +
item01.label +
'.' +
item02.label +
'.' +
item03.label
)
"
></el-checkbox>
</div>
</div>
</template>
</template>
</template>
</template>
</template>
</template>
</template>
</div>
<div class="svg">
<svg
ref="svg"
class="line"
xmlns="http://www.w3.org/2000/svg"
:style="{ height: svgHeight }"
style="position: absolute; z-index: 2"
version="1.1"
>
<line
v-for="item in line"
:key="item.leftid"
:x1="item.x1"
:y1="item.y1"
:x2="item.x2"
:y2="item.y2"
:style="{
position: 'absolute',
stroke: item.stroke,
strokeWidth: item.width,
zIndex: item.z,
}"
/>
<!-- <path
v-for="item in line"
:key="item.leftid"
:d="`M ${item.x1},${item.y2} C${item.centerX},${item.y1} ${item.centerX},${item.y2} ${item.x2},${item.y2}`"
style="stroke: #660000; fill: none"
/> -->
</svg>
</div>
<div class="right">
<div class="title">
<h1>API入参</h1>
</div>
<template v-for="(item, index) in rightData">
<div
class="treebox"
@mouseenter="rightMouseenterHandle(item)"
@mouseleave="rightMouseleaveHandle(item)"
>
<div class="btn">
<el-checkbox
:disabled="!!lookFlag"
size="mini"
v-model="item.value"
@change="
(val, $event) =>
rightCheckBoxHandle(val, item, $event, [item.id], item.label)
"
></el-checkbox>
</div>
<div class="tree" :key="index">
<span>{{ item.label }}</span>
<span style="font-size: 12px; color: gray; padding-left: 10px">{{
item.type
}}</span>
</div>
</div>
<template v-if="item.children">
<template v-for="(item01, index01) in item.children">
<div
class="treebox"
@mouseenter="rightMouseenterHandle(item01)"
@mouseleave="rightMouseleaveHandle(item01)"
>
<div class="btn">
<el-checkbox
:disabled="!!lookFlag"
v-model="item01.value"
@change="
(val, $event) =>
rightCheckBoxHandle(
val,
item01,
$event,
[item.id, item01.id],
item.label + '.' + item01.label
)
"
></el-checkbox>
</div>
<div class="tree" style="margin-left: 15px">
<span>{{ item01.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item01.type }}</span
>
</div>
</div>
<template v-if="item01.children">
<template v-for="(item02, index02) in item01.children">
<div
class="treebox"
@mouseenter="rightMouseenterHandle(item02)"
@mouseleave="rightMouseleaveHandle(item02)"
>
<div class="btn">
<el-checkbox
:disabled="!!lookFlag"
v-model="item02.value"
@change="
(val, $event) =>
rightCheckBoxHandle(
val,
item02,
$event,
[item.id, item01.id, item02.id],
item.label + '.' + item01.label + '.' + item02.label
)
"
></el-checkbox>
</div>
<div class="tree" style="margin-left: 30px">
<span>{{ item02.label }}</span>
<span
style="font-size: 12px; color: gray; padding-left: 10px"
>{{ item02.type }}</span
>
</div>
</div>
<template v-if="item01.children">
<template v-for="(item03, index03) in item02.children">
<div
class="treebox"
@mouseenter="rightMouseenterHandle(item03)"
@mouseleave="rightMouseleaveHandle(item03)"
>
<div class="btn">
<el-checkbox
:disabled="!!lookFlag"
v-model="item03.value"
@change="
(val, $event) =>
rightCheckBoxHandle(
val,
item03,
$event,
[item.id, item01.id, item02.id, item03.id],
item.label +
'.' +
item01.label +
'.' +
item02.label +
'.' +
item03.label
)
"
></el-checkbox>
</div>
<div class="tree" style="margin-left: 30px">
<span>{{ item03.label }}</span>
<span
style="
font-size: 12px;
color: gray;
padding-left: 10px;
"
>{{ item03.type }}</span
>
</div>
</div>
</template>
</template>
</template>
</template>
</template>
</template>
</template>
</div>
</div>
</template>
<script>
export default {
props: {
lookFlag: {
type: [Boolean, String],
default: false,
},
lineData: {
type: Array,
default: () => {
return [];
},
},
leftData: {
type: Array,
default: () => {
return [];
},
},
rightData: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
style: {
"--clickBoxColor": "pink",
},
defaultProps: {
children: "children",
label: "label",
},
leftActive: {},
rightActive: {},
line: [],
leftActiveItem: {},
rightActiveItem: {},
svgHeight: 0,
};
},
methods: {
leftMouseenterHandle(item) {
if (item.isline) {
let temp = this.line.find((ele) => {
return ele.leftid == item.id;
});
if (temp) {
temp.stroke = "red";
temp.width = 2;
temp.z = 9;
}
}
},
leftMouseleaveHandle(item) {
if (item.isline) {
let temp = this.line.find((ele) => {
return ele.leftid == item.id;
});
if (temp) {
temp.stroke = "#409EFF";
temp.width = 1;
temp.z = 4;
}
}
},
rightMouseenterHandle(item) {
if (item.isline) {
let temp = this.line.find((ele) => {
return ele.rightid == item.id;
});
if (temp) {
temp.stroke = "red";
temp.width = 2;
temp.z = 9;
}
}
},
rightMouseleaveHandle(item) {
if (item.isline) {
let temp = this.line.find((ele) => {
return ele.rightid == item.id;
});
if (temp) {
temp.stroke = "#409EFF";
temp.width = 1;
temp.z = 4;
}
}
},
leftCheckBoxHandle(val, item, e, arrId, name) {
if (val) {
let svginfo = this.$refs.svg.getBoundingClientRect();
let info = e.target.getBoundingClientRect();
this.leftActiveItem = item;
this.leftActive["leftidarr"] = arrId;
this.leftActive["leftid"] = item.id;
this.leftActive["leftTitle"] = name;
this.leftActive["x1"] = svginfo.x - info.x - 5;
this.leftActive["y1"] = info.y - svginfo.y + 10;
if (this.leftActive.leftid && this.rightActive.rightid) {
let obj = {
stroke: "#409EFF",
width: 1,
z: 4,
};
this.line.push({ ...this.leftActive, ...this.rightActive, ...obj });
this.$set(this.leftActiveItem, "isline", true);
this.$set(this.rightActiveItem, "leftid", this.leftActiveItem.id);
this.$set(this.leftActiveItem, "rightid", this.rightActiveItem.id);
this.$set(this.rightActiveItem, "isline", true);
this.leftActive = {};
this.rightActive = {};
}
this.deepSearchBox(this.leftData, item.id);
} else {
if (item.isline) {
this.line = this.line.filter((ele) => {
return ele.leftid != item.id;
});
this.cloaseBox(this.rightData, item.rightid);
item.isline = false;
} else {
this.leftActive = {};
this.leftActiveItem = {};
}
}
},
rightCheckBoxHandle(val, item, e, arrId, name) {
if (val) {
let svginfo = this.$refs.svg.getBoundingClientRect();
let info = e.target.getBoundingClientRect();
this.rightActiveItem = item;
this.rightActive["rightidarr"] = arrId;
this.rightActive["rightid"] = item.id;
this.rightActive["rightTitle"] = name;
this.rightActive["x2"] = info.x - svginfo.x - 30;
this.rightActive["y2"] = info.y - svginfo.y + 10;
if (this.leftActive.leftid && this.rightActive.rightid) {
let obj = {
stroke: "#409EFF",
width: 1,
z: 4,
};
this.line.push({ ...this.leftActive, ...this.rightActive, ...obj });
this.$set(this.leftActiveItem, "isline", true);
this.$set(this.leftActiveItem, "rightid", this.rightActiveItem.id);
this.$set(this.rightActiveItem, "leftid", this.leftActiveItem.id);
this.$set(this.rightActiveItem, "isline", true);
item["isline"] = true;
this.leftActive = {};
this.rightActive = {};
}
this.deepSearchBox(this.rightData, item.id);
} else {
if (item.isline) {
this.line = this.line.filter((ele) => {
return ele.rightid != item.id;
});
this.cloaseBox(this.leftData, item.leftid);
item.isline = false;
} else {
this.rightActive = {};
this.rightActiveItem = {};
}
}
},
deepSearchBox(arr, id) {
arr.forEach((item) => {
if (item.id != id && item.value && !item.isline) {
item.value = false;
}
if (item.children && item.children.length) {
this.deepSearchBox(item.children, id);
}
});
},
cloaseBox(arr, id) {
arr.some((item) => {
if (item.id == id) {
item.value = false;
item.isline = false;
return true;
} else if (item.children && item.children.length) {
this.cloaseBox(item.children, id);
}
});
},
handleNodeClick(data) {},
resizeHeight() {
console.log(this.$refs.link.getBoundingClientRect())
this.svgHeight = this.$refs.link.getBoundingClientRect().height + "px";
},
cleanActive(str) {
if (str == "left") {
this.leftActive = {};
this.leftActiveItem = {};
} else {
this.rightActive = {};
this.rightActiveItem = {};
}
this.line = [];
},
acivteData(flag, obj) {
if (flag == "left") {
this.leftActive = obj;
this.leftActive["leftid"] = obj.id;
} else {
this.rightActive = obj;
this.leftActive["rightid"] = obj.id;
}
},
},
mounted() {
this.svgHeight = this.$refs.link.getBoundingClientRect().height + "px";
},
watch: {
line: {
deep: true,
handler: function (newV, oldV) {
this.$emit("linechange", newV);
},
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-checkbox__inner {
width: 20px;
height: 20px;
border-radius: 50% !important;
text-align: center;
line-height: 20px;
}
::v-deep .el-checkbox__inner::after {
border: none !important;
}
.linkk {
border-top: 1px solid #ccc;
display: flex;
width: 100%;
height: 100%;
background-color: #fff;
overflow: hidden;
position: relative;
.left {
border-left: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 0 0 20px 20px;
width: 300px;
.title {
border-bottom: 1px solid #ccc;
padding: 20px;
}
.treebox {
margin-top: 25px;
display: flex;
align-items: center;
justify-content: space-between;
.btn {
}
}
}
.right {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 0 20px 20px 0;
width: 300px;
.title {
display: flex;
justify-content: flex-end;
border-bottom: 1px solid #ccc;
padding: 20px;
}
.treebox {
align-items: center;
margin-top: 25px;
display: flex;
.btn {
margin-right: 60px;
}
}
}
.svg {
width: 400px;
}
svg {
background-color: #f5f5f6;
width: 400px;
min-height: 300px;
}
line {
transition: all 0.1s;
}
}
</style>

View File

@ -1,315 +0,0 @@
<template>
<div>
<template v-if="!lookflag">
<el-select
v-loading="selLoading"
class="w-100"
v-model="selectValue"
:placeholder="placeholder"
:clearable="false"
style="width: 240px"
size="mini"
refs="mySelect"
:reserve-keyword="true"
:disabled="disabled"
filterable
popper-class="sele"
:filter-method="filter"
@change="fun"
@focus="funx"
@blur="funb"
@visible-change="hidden"
clearable
>
<el-option
v-for="item in options"
:key="item[itemObj.value]"
:label="item[itemObj.label]"
remote
:value="item[itemObj.value]"
placeholder="请输入"
>
</el-option>
<div style="bottom: -10px">
<el-pagination
v-if="pageModel.total > pageModel.limit"
small
@current-change="handleCurrentChange"
:current-page="pageModel.pageIndex"
:page-size="pageModel.limit"
layout="prev, pager,next,total"
:total="pageModel.total"
>
</el-pagination>
</div>
</el-select>
</template>
<template v-else
>
<div v-loading="selLoading">{{ showValue }}</div>
</template
>
</div>
</template>
<style scoped lang="scss">
::v-deep .el-input--mini .el-input__inner {
height: 38px;
}
.w-100 {
width: 100% !important;
}
.drop > > > .el-input__inner {
background: #5183ff !important;
color: white;
border: none;
height: 26px;
padding: 10px 22px 10px 10px;
text-align: center;
}
.drop {
width: 250px;
}
.drop > > > .el-select .el-input .el-select__caret {
display: none;
}
</style>
<el-select
v-loading="selLoading"
class="w-100"
v-model="selectValue"
:placeholder="placeholder"
:clearable="false"
style="width: 240px"
size="mini"
refs="mySelect"
:reserve-keyword="true"
:disabled="disabled"
filterable
popper-class="sele"
:filter-method="filter"
@change="fun"
@focus="funx"
@blur="funb"
@visible-change="hidden"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.label"
remote
:value="item.id"
placeholder="请输入"
>
</el-option>
<div style="bottom: -10px">
<el-pagination
v-if="pageTotal > pageSize"
small
@current-change="handleCurrentChange"
:current-page="currentpage"
:page-size="pageSize"
layout="prev, pager,next,total"
:total="pageTotal"
>
</el-pagination>
</div>
</el-select>
</template>
<script>
import debounce from "lodash/debounce";
import {getUserModuleApi} from "@/api/integrationOption/integrationOption.js";
import panelGroup from "@/views/dashboard/PanelGroup.vue";
export default {
props: {
//
disabled: {
type: Boolean,
default: false,
},
placeholder: String,
value: {
type: String,
},
appId: {
type: String,
default: ""
},
itemObj: {
type: Object,
default: () => {
return {
label: "label",
value: "value"
};
},
},
lookflag: {
type: Boolean,
default: false,
},
flag: {
type: Boolean,
default: false,
}
},
data() {
return {
options: [], //
pageModel: {
total: 0,
pageIndex: 1,
limit: 10,
},
selLoading: false,
showValue: "",
lookLoading: false,
};
},
computed: {
selectValue: {
get() {
return this.value;
},
set(val) {
this.$emit("input", val);
},
},
},
created() {
// if (Object.keys(this.ruleForm).length && this.ruleForm[this.itemObj.id]) {
// this.getSelectdata(this.ruleForm[this.itemObj.id]);
// }
},
methods: {
// select
async getUserModuleHandle(obj = {}) {
if (this.flag) {
if (this.appId) {
this.selLoading = true;
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "queryAppApi"
}, {
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
appId: this.appId,
...obj
})
console.log(res)
if (res.status === '200') {
this.selLoading = false;
this.pageModel.total = res.attribute.total;
this.options = res.attribute.list;
}
}
} else {
this.selLoading = true;
const res = await getUserModuleApi(
{
tl: "sysApplicationService",
as: "application",
dj: "queryApp",
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
...obj,
}
);
if (res.status == 200) {
console.log(res)
this.pageModel.total = res.attribute.total;
this.selLoading = false;
this.options = res.attribute.list;
}
}
},
// selectidvalue
async getSelectdata(id) {
if (this.flag) {
this.selLoading = true;
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "debugAppApi",
}, {
id: this.value,
appId: this.appId,
})
console.log(res, 'api查询')
this.options = []
this.options.push({...res.attribute.api})
this.selLoading = false;
} else {
this.selLoading = true;
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getApp",
}, {
id: id
})
this.selLoading = false;
console.log(res, '应用查询')
this.options = []
this.options.push({
...res.attribute
})
}
},
//
handleCurrentChange(val) {
this.pageModel.pageIndex = val;
this.getUserModuleHandle();
},
// select
fun(val) {
this.$emit("seleChange", this.value);
},
//
funx() {
this.getUserModuleHandle();
},
//
funb() {
},
hidden() {
},
//,options
filter: debounce(function (val) {
// this.pageModel.pageIndex = 1;
// this.getUserModuleApi({ lableValue: val });
// }, 300),
})
},
//
watch: {
value: {
immediate: true,
handler(NewV, oldV) {
if (this.flag) {
if (!NewV) {
this.options = []
}
}
if (NewV && this.options.length === 0) {
console.log(1)
this.getSelectdata(this.value)
}
}
},
},
};
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,379 +0,0 @@
<template>
<div class="wrap">
<div class="main" v-loading="mainLoading">
<baseTable :tableData="tableData" :tabLoading="tabLoading"
:tableColumn="tableColumn" :border="false"
>
<!-- 触发类型-->
<template #enabledType="{row}">
{{ row.enabledType == 0 ? '手动' : '自动' }}
</template>
<!-- 启用/停用-->
<template #enabledState="{row}">
<el-switch
:disabled="true"
v-model="row.enabledState"
active-value="1"
inactive-value="0"
>
</el-switch>
</template>
<!-- 操作-->
<template #operation="{row}">
<div class="btnList">
<div class="settingBtn" @click="sonTableEditHandle(row)">
<img src="./images/设置.png" alt="">
</div>
<div class="deleBtn" @click="activedOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
</template>
</baseTable>
<div class="receiptsAddRow">
<el-link
type="primary"
@click="addRowHandle"
:underline="false"
>+ 添加
</el-link
>
</div>
</div>
<baseRightDialog ref="settingForm"
:footerShow="true"
:dialogVisible.sync="settingFormShow"
title="分发设置"
@handleClose="settingFormShow=false"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="sonTableSaveHandle"
>
<settingForm ref="settingForm" v-if="settingFormShow" @saveSuccessHandle="saveSuccessHandle"></settingForm>
</baseRightDialog>
</div>
</template>
<script>
import settingForm from './settingForm.vue'
import baseRightDialog from '@/components/base/baseRightDialog/index.vue'
import baseNewSelect from '@/views/applicationList/com/baseNewSelect.vue'
import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import { getApiModuleApi } from '@/api/apiChunks'
import { deepClone } from '@/utils/index.js'
import { getUserModuleApi } from '@/api/integrationOption/integrationOption'
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
import { authApi } from '@/api/apis/auth'
export default {
data() {
return {
mainLoading: false,
saveLoading: false,
options: [],
//
roleDist: {},
addSwitch: false,
tabLoading: false,
tableColumn: [
{
title: '应用列表',
id: 'appName'
},
{
title: '触发类型',
id: 'enabledType'
},
{
title: '新增接口',
id: 'addName'
},
{
title: '修改接口',
id: 'updateName'
},
{
title: '删除接口',
id: 'deleteName'
},
{
title: '数据权限',
id: 'permission',
tooltip: true
},
{
title: '启用/停用',
id: 'enabledState'
},
{ title: '操作', id: 'operation' }
],
tableData: [],
pageModel: {
pageIndex: 1,
total: 10,
limit: 10
},
addRole: '',
settingFormShow: false,
serviceOptions: []
}
},
methods: {
///
saveSuccessHandle() {
this.settingFormShow = false
this.getTableData()
},
//
async initSelect() {
const res = await authApi('sysApplicationService', '', 'queryEntity', '', {})
console.log(res)
this.serviceOptions.options = []
res.attribute.forEach(item => {
this.serviceOptions.push({
id: item.id,
label: item.name
})
})
return true
},
//tableData
async getTableData() {
const res = await authApi('mdmModuleService', '', 'queryMdmDistribute', '', {
mdmId: this.$route.query.id
})
this.tableData = res.attribute
console.log(this.tableData, 'table')
//
//
let compareTypeDist = {
'1': '=',
'2': '!=',
'3': '>',
'4': '<'
}
let connectionSymbolDist = {
'1': 'and',
'2': 'or'
}
this.tableData.forEach(async(item) => {
this.$set(item, 'permission', '')
//
let obj = this.serviceOptions.find(ele => {
console.log(ele.id, item.appId, '13')
return ele.id === item.appId
})
this.$set(item, 'appName', obj.label)
let labelDist = {}
const res2 = await authApi('sysApplicationApiService', '', 'queryEntity', '', {
appId: item.appId
})
res2.attribute.forEach((item) => {
labelDist[item.id] = item.apiName
})
if (item.deleteApi) {
this.$set(item, 'deleteName', labelDist[item.deleteApi])
}
if (item.updateApi) {
this.$set(item, 'updateName', labelDist[item.updateApi])
}
if (item.addApi) {
this.$set(item, 'addName', labelDist[item.addApi])
}
//
item.mdmModuleDistributeDetailEntities.forEach(ele => {
console.log(ele, 'ele')
let leftBracket = ele.leftBracket ? ele.leftBracket : ''
let rightParenthesis = ele.rightParenthesis ? ele.rightParenthesis : ''
let compareType = compareTypeDist[ele.compareType]
let connectionSymbol = connectionSymbolDist[ele.connectionSymbol] ? connectionSymbolDist[ele.connectionSymbol] : ''
item.permission += leftBracket + ele.filedId + ' ' + compareType + ' ' + ele.filedVaule + rightParenthesis + ' ' + connectionSymbol + ' '
})
})
},
//
sonTableSaveHandle() {
this.$refs.settingForm.$refs.typeOptionForm.submitForm()
},
//
sonTableEditHandle(row) {
this.settingFormShow = true
this.$nextTick(() => {
this.$refs.settingForm.getrowDetails(row.id)
})
},
//
activedOnFunc(row) {
this.$confirm('确定删除?')
.then(async(_) => {
const res = await authApi('mdmModuleService', '', 'deleteMdmDistribute', '', {
id: row.id
})
this.$vmNews('删除成功', 'success')
this.getTableData()
})
.catch((_) => {
})
},
//
addRowHandle() {
this.settingFormShow = true
},
async init() {
this.mainLoading = true
const res = await getApiModuleApi({
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmModuleRule'
}, { id: this.$route.query.id })
res.attribute.forEach(item => {
item.mdmModuleRoleButtonEntities.forEach(ele => {
item[ele.buttonType] = true
})
})
this.mainLoading = false
this.tableData = res.attribute
},
//close
dialogCloseHandle() {
this.addRole = ''
},
//add
addHandle() {
this.addSwitch = true
},
//
currentChangeHandle(pageModel) {
this.pageModel = pageModel
this.$nextTick(() => {
})
}
},
components: {
baseNewForm,
BaseTable,
baseDialog,
baseNewSelect,
basePage,
baseRightDialog,
settingForm
},
created() {
this.initSelect().then(() => {
this.getTableData()
})
this.$emit('flashActive', 4)
}
}
</script>
<style scoped lang="scss">
.receiptsAddRow {
margin-top: 15px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;
}
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
}
.checkChunk {
display: flex;
flex-wrap: wrap;
}
.wrap {
margin-left: 5px;
background-color: #fbfbfb;
width: 99.5%;
overflow: auto;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
margin-top: 10px;
background: #fff;
padding: 20px;
border-radius: 8px;
.btn {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
}
}
}
footer {
margin-top: 20px;
}
.addBox {
> .chunk {
display: flex;
align-items: center;
}
}
.btnList {
display: flex;
align-items: center;
justify-content: center;
.settingBtn {
cursor: pointer;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
}
</style>

View File

@ -1,649 +0,0 @@
<template>
<div class="settingForm">
<baseNewForm
ref="typeOptionForm"
:spanNumber="18"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'top'"
@onSelect="typeSelectChangeHanlde"
@onSubmit="typeOptionOnSubmit"
>
</baseNewForm>
<div class="bigTitle">数据权限设置</div>
<div class="tableName">
<div class="title">数据主表名称</div>
<div class="input">
<el-select clearable v-model="tableId" @change="serviceSeleChangHadle">
<el-option v-for="(item,index) of serviceOptions" :key="index" :label="item.label"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div class="main" v-loading="mainLoading">
<!-- 此处逻辑当拥有左括号或者右括号时 连接符清除并禁用-->
<baseTable :tableData="tableData" :tabLoading="tabLoading"
:tableColumn="tableColumn" :border="false"
>
<!-- 左括号-->
<template #leftBracket="{row}">
<el-select clearable v-model="row.leftBracket"
>
<el-option v-for="(item,index) of leftBracketOptions" :key="index" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
<!-- 字段名称-->
<template #filedName="{row}">
<el-select clearable v-model="row.filedId" @change="(val)=>{filedIdChangHandle(val,row)}">
<el-option v-for="(item,index) of labelOptions" :key="index" :label="item.label" :value="item.id">
</el-option>
</el-select>
</template>
<!-- 对比类型-->
<template #compareType="{row}">
<el-select clearable v-model="row.compareType">
<el-option v-for="(item,index) of compareTypeOptions" :key="index" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
<!-- 运算值-->
<template #filedVaule="{row}">
<el-input v-model="row.filedVaule"></el-input>
</template>
<!-- 连接符-->
<template #connectionSymbol="{row}">
<el-select clearable v-model="row.connectionSymbol"
>
<el-option v-for="(item,index) of connectionSymbolOptions" :key="index" :label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
<!-- 右括号-->
<template #rightParenthesis="{row}">
<el-select clearable v-model="row.rightParenthesis">
<el-option v-for="(item,index) of rightParenthesisOptions" :key="index" :label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
<!-- 操作-->
<template #operation="{row}">
<div class="btnList">
<div class="deleBtn" @click="activedOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
</template>
</baseTable>
<div class="receiptsAddRow">
<el-link
type="primary"
@click="addRowHandle"
:underline="false"
>+ 添加
</el-link
>
</div>
</div>
</div>
</template>
<script>
import baseNewForm from '../compoments/baseNewForm'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import { authApi } from '@/api/apis/auth'
import { getApiModuleApi } from '@/api/apiChunks'
import { retrieveRawAttr } from 'echarts/lib/data/helper/dataProvider'
export default {
name: 'settingForm',
data() {
return {
formRow: [
{
elCol: [
{
type: 'select',
title: '应用列表',
id: 'appId',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '触发类型',
id: 'enabledType',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: '手动',
id: '0'
},
{
label: '自动',
id: '1'
}
]
}
]
},
{
elCol: [
{
type: 'select',
title: '新增接口',
id: 'addApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '修改接口',
id: 'updateApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '删除接口',
id: 'deleteApi',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '新增脚本',
id: 'addScript',
row: 24,
disabled: false,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '修改脚本',
id: 'updateScript',
row: 24,
disabled: false,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'select',
title: '删除脚本',
id: 'deleteScript',
row: 24,
disabled: false,
fontSize: 16,
options: []
}
]
},
{
elCol: [
{
type: 'switch',
title: '启用/停用',
id: 'enabledState',
row: 24,
disabled: false,
required: true,
fontSize: 16,
activeValue: '1',
inactiveValue: '0'
}
]
}
],
ruleForm: {},
tableId: '',//
mainLoading: false,
tabLoading: false,
tableData: [],
tableColumn: [
{
title: '括号',
id: 'leftBracket'
},
{
title: '字段名称',
id: 'filedName'
},
{
title: '字段编码',
id: 'filedId'
},
{
title: '运算符',
id: 'compareType'
},
{
title: '运算值',
id: 'filedVaule'
},
{
title: '连接符',
id: 'connectionSymbol'
},
{
title: '括号',
id: 'rightParenthesis'
},
{ title: '操作', id: 'operation' }
],
compareTypeOptions: [
{
label: '=',
value: '1'
},
{
label: '!=',
value: '2'
},
{
label: '>',
value: '3'
},
{
label: '<',
value: '4'
}
],//options
connectionSymbolOptions: [
{
label: 'and',
value: '1'
},
{
label: 'or',
value: '2'
}
],//options
leftBracketOptions: [
{
label: '(',
value: '('
}
],//
rightParenthesisOptions: [
{
label: ')',
value: ')'
}
],//
serviceOptions: [],//
labelOptions: [],//
labelDist: {}//
}
},
methods: {
// filedName
filedIdChangHandle(val, row) {
row.filedName = this.labelDist[val]
},
// 1. 2.
async serviceSeleChangHadle(val, flag = true) {
if (flag) {
this.labelOptions = []
this.labelDist = {}
this.tableData.forEach(item => {
item.filedName = ''
item.filedId = ''
})
}
if (val) {
let obj = this.serviceOptions.find(item => {
return val === item.id
})
const res = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmServiceField'
}, { mdmId: obj.mdmId, dbId: obj.dbId })
res.attribute.forEach(item => {
this.$set(this.labelDist, item.enName, item.chName)
this.labelOptions.push({
id: item.enName,
label: item.chName
})
})
}
},
//
async initSelect() {
//
this.serviceOptions = []
const service = await getApiModuleApi({
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmService'
}, { remark: '' })
service.attribute.forEach(item => {
console.log(item.dbName, 'item')
this.serviceOptions.push({
id: item.id,
label: item.remark,
dbId: item.id,
mdmId: item.mdmId
})
})
console.log(this.serviceOptions, 'this.serviceOptions')
},
async typeSelectChangeHanlde(val, index, indexRow, row, flag = true) {
if (flag && row.id === 'appId') {
this.formRow[2].elCol[0].options = []
this.formRow[3].elCol[0].options = []
this.formRow[4].elCol[0].options = []
this.formRow[5].elCol[0].options = []
this.formRow[6].elCol[0].options = []
this.formRow[7].elCol[0].options = []
this.$set(this.ruleForm, 'addApi', '')
this.$set(this.ruleForm, 'updateApi', '')
this.$set(this.ruleForm, 'deleteApi', '')
this.$set(this.ruleForm, 'addScript', '')
this.$set(this.ruleForm, 'updateScript', '')
this.$set(this.ruleForm, 'deleteScript', '')
}
//appidapp
if (row.id === 'appId' && val) {
const res = await authApi('sysApplicationApiService', '', 'queryEntity', '', {
appId: val
})
res.attribute.forEach((item) => {
this.formRow[2].elCol[0].options.push({
id: item.id,
label: item.apiName
})
this.formRow[3].elCol[0].options.push({
id: item.id,
label: item.apiName
})
this.formRow[4].elCol[0].options.push({
id: item.id,
label: item.apiName
})
})
//
const res2 = await authApi('sysApplicationService', '', 'queryAppScript', '', {
appId: val
})
res2.attribute.forEach((item) => {
this.formRow[5].elCol[0].options.push({
id: item.id,
label: item.scriptName
})
this.formRow[6].elCol[0].options.push({
id: item.id,
label: item.scriptName
})
this.formRow[7].elCol[0].options.push({
id: item.id,
label: item.scriptName
})
})
}
},
//
async typeOptionOnSubmit() {
let flag
//1.0 2.1 3.>1
if (this.tableData.length === 1) {
flag = this.tableData.some(item => {
if (item.leftBracket || item.rightParenthesis || item.connectionSymbol) {
this.$vmNews(`当仅有一行时不允许填写左右括号及连接符`)
return true
}
if (!item.filedName) {
this.$vmNews('请选择字段名称')
return true
}
if (!item.compareType) {
this.$vmNews('请选择运算符')
return true
}
if (!item.filedVaule) {
this.$vmNews('请填写运算值')
return true
}
})
} else if (this.tableData.length > 1) {
// -=1-=0
let leftBracketNum = 0
let rightParenthesisNum = 0
flag = this.tableData.some((item, index) => {
//
if (index + 1 === this.tableData.length && !item.rightParenthesis) {
this.$vmNews(`最后一行请填写右括号`)
return true
}
//
if (index + 1 === 1 && !item.leftBracket) {
this.$vmNews(`首行请填写左括号`)
return true
}
//
if (index + 1 != this.tableData.length && !item.connectionSymbol) {
this.$vmNews(`${index + 1}请填写连接符`)
return true
}
//
if (index + 1 == this.tableData.length && item.connectionSymbol) {
this.$vmNews(`最后一行不允许填写连接符`)
return true
}
if (!item.filedName) {
this.$vmNews(`${index + 1}行请填写字段名称`)
return true
}
if (!item.compareType) {
this.$vmNews(`${index + 1}行请填写运算符`)
return true
}
if (!item.filedVaule) {
this.$vmNews(`${index + 1}行请填写运算值`)
return true
}
if (item.leftBracket && item.rightParenthesis) {
this.$vmNews(`${index + 1}行中不允许同时存在左括号和右括号`)
return true
}
//
if (item.leftBracket) {
leftBracketNum++
let num = leftBracketNum - rightParenthesisNum
if (num !== 0 && num !== 1) {
this.$vmNews(`${index + 1}行中左括号填写不符合规则请重新填写`)
return true
}
}
if (item.rightParenthesis) {
rightParenthesisNum++
let num = leftBracketNum - rightParenthesisNum
if (num !== 0 && num !== 1) {
this.$vmNews(`${index + 1}行中右括号填写不符合规则请重新填写`)
return true
}
}
})
}
if (flag) return
let params = {
...this.ruleForm,
dbId: this.tableId,
mdmId: this.$route.query.id,
mdmModuleDistributeDetailEntities: this.tableData
}
if (params.id) {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmDistribute', '', params)
this.$vmNews('保存成功', 'success')
this.$emit('saveSuccessHandle')
} else {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'saveMdmDistribute', '', params)
this.$vmNews('保存成功', 'success')
this.$emit('saveSuccessHandle')
}
},
addRowHandle() {
this.tableData.push({
'leftBracket': '',//
'filedName': '',//
'compareType': '',// 1 2 3 4
'filedVaule': '',//
'connectionSymbol': '',// 1\and 2\or
'rightParenthesis': ''//
})
},
//
activedOnFunc(row) {
this.tableData.splice(row.index, 1)
},
//
async getAppList() {
const res = await authApi('sysApplicationService', '', 'queryEntity', '', {})
console.log(res)
this.formRow[0].elCol[0].options = []
res.attribute.forEach(item => {
this.formRow[0].elCol[0].options.push({
id: item.id,
label: item.name
})
})
},
//
async getrowDetails(id) {
const res = await authApi('mdmModuleService', '', 'getMdmDistribute', '', {
id
})
this.ruleForm = res.attribute
this.tableId = this.ruleForm.dbId
this.tableData = res.attribute.mdmModuleDistributeDetailEntities
console.log(this.tableData, '?')
this.typeSelectChangeHanlde(this.ruleForm.appId, 0, 0, { id: 'appId' }, false)
this.serviceSeleChangHadle(this.ruleForm.dbId, false)
}
},
created() {
this.getAppList()
this.initSelect()
},
components: {
BaseTable,
baseNewForm
}
}
</script>
<style scoped lang="scss">
.bigTitle {
border-top: 1px solid #EBEBEB;
padding-top: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 22px;
text-align: left;
font-style: normal;
}
.tableName {
display: flex;
align-items: center;
margin: 30px 0;
.title {
margin-right: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
font-style: normal;
}
}
.receiptsAddRow {
margin-top: 30px;
border: 1px dotted #ccc;
text-align: center;
height: 50px;
line-height: 50px;
}
.btnList {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.deleBtn {
cursor: pointer;
margin-left: 10px;
width: 24px;
height: 24px;
background: #EBEBED;
border-radius: 6px;
display: flex;
justify-content: center;
align-items: center;
> img {
width: 10px;
height: 10px;
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Some files were not shown because too many files have changed in this diff Show More