5.21修改所有已出现的bug和优化。
This commit is contained in:
parent
495fc24d25
commit
8ed8c085e8
|
@ -6,7 +6,7 @@
|
|||
>
|
||||
<template v-for="(item, index) in topMenus">
|
||||
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
|
||||
><svg-icon :icon-class="item.meta.menuIcon" />
|
||||
><svg-icon :icon-class="item.meta.icon" />
|
||||
{{ item.meta.title }}</el-menu-item
|
||||
>
|
||||
</template>
|
||||
|
@ -19,7 +19,7 @@
|
|||
:index="item.path"
|
||||
:key="index"
|
||||
v-if="index >= visibleNumber"
|
||||
><svg-icon :icon-class="item.meta.menuIcon" />
|
||||
><svg-icon :icon-class="item.meta.icon" />
|
||||
{{ item.meta.title }}</el-menu-item>
|
||||
</template>
|
||||
</el-submenu>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<!-- color: activePage == index ? '#1478f6' : ''}" v-for="(item,index) in lagerScreenMenuData" :key="index"-->
|
||||
<!-- >-->
|
||||
<!-- <div @click="handlerClick(item,index)" flex>-->
|
||||
<!-- <i :class="item.meta.menuIcon"></i>-->
|
||||
<!-- <i :class="item.meta.icon"></i>-->
|
||||
<!-- <p>{{ item.meta.title }}</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </router-link>-->
|
||||
|
@ -273,6 +273,7 @@ export default {
|
|||
.then(() => {
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
Cookies.remove("automaticLogin");
|
||||
this.$store.commit("REMOVE_ROUTER");
|
||||
// location.href = '/login';
|
||||
this.$router.replace({ path: "/login" });
|
||||
// this.$router.push("/login");
|
||||
|
|
|
@ -5,25 +5,25 @@
|
|||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<!-- <template slot="title"> -->
|
||||
<!-- <i class="iconfont" :class="item.meta.menuIcon" > </i> -->
|
||||
<!-- <i class="iconfont" :class="item.meta.icon" > </i> -->
|
||||
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||
<!-- <div v-if="sidebarOpened">
|
||||
<i class="iconfont" :class="item.meta.menuIcon" > </i>
|
||||
<i class="iconfont" :class="item.meta.icon" > </i>
|
||||
<span>{{isNest}}</span>
|
||||
</div> -->
|
||||
|
||||
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span>{{onlyOneChild.meta.title}}</span>
|
||||
</div>
|
||||
<template slot="title">
|
||||
<div v-if="isNest === false">
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</template>
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<i class="iconfont" :class="item.meta.menuIcon" v-if="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon" v-if="item.meta.icon"> </i>
|
||||
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
||||
class="itemSidebar">{{item.meta.title}}</span>
|
||||
</template>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
||||
style="width:100px;" @click="goRoute(item)">
|
||||
<div class="concise">
|
||||
<i class=" concise-icon-item iconfont" :class="item.meta.menuIcon"></i>
|
||||
<i class=" concise-icon-item iconfont" :class="item.meta.icon"></i>
|
||||
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||
@click.stop="handleClickWithDelay(item)"></i>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
||||
@click="goRoute(item, route)" style="width:100px">
|
||||
<div class="concise">
|
||||
<i class=" concise-icon-item iconfont" :class="route.meta.menuIcon">
|
||||
<i class=" concise-icon-item iconfont" :class="route.meta.icon">
|
||||
</i>
|
||||
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||
@click.stop="handleClickWithDelay(route)"></i>
|
||||
|
@ -93,7 +93,7 @@ export default {
|
|||
this.$emit("openChildren", item);
|
||||
},
|
||||
async collectClick(val) {
|
||||
// console.log(val.meta.menuIcon);
|
||||
// console.log(val.meta.icon);
|
||||
let params = {
|
||||
mcId: val.id,
|
||||
type: "",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
@mouseenter="openChildren(item, index)"
|
||||
@click="goRouter(item, index)"
|
||||
>
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||
{{ item.meta.title }}
|
||||
</p>
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
class="newsSider"
|
||||
@mouseenter="openChildren(item, index)"
|
||||
>
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon ? item.meta.menuIcon :'el-icon-office-building'"> </i>
|
||||
<!-- <i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i> -->
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.icon ? item.meta.icon :'el-icon-office-building'"> </i>
|
||||
<!-- <i class="newsSider-icon iconfont" :class="item.meta.icon"> </i> -->
|
||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||
{{ item.meta.title }}
|
||||
</p>
|
||||
|
|
|
@ -5,25 +5,25 @@
|
|||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<!-- <template slot="title"> -->
|
||||
<!-- <i class="iconfont" :class="item.meta.menuIcon" > </i> -->
|
||||
<!-- <i class="iconfont" :class="item.meta.icon" > </i> -->
|
||||
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||
<!-- <div v-if="sidebarOpened">
|
||||
<i class="iconfont" :class="item.meta.menuIcon" > </i>
|
||||
<i class="iconfont" :class="item.meta.icon" > </i>
|
||||
<span>{{isNest}}</span>
|
||||
</div> -->
|
||||
|
||||
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span>{{onlyOneChild.meta.title}}</span>
|
||||
</div>
|
||||
<template slot="title">
|
||||
<div v-if="isNest === false">
|
||||
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
||||
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</template>
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<i class="iconfont" :class="item.meta.menuIcon" v-if="item.meta.menuIcon"> </i>
|
||||
<i class="iconfont" :class="item.meta.icon" v-if="item.meta.icon"> </i>
|
||||
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
||||
class="itemSidebar">{{item.meta.title}}</span>
|
||||
</template>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
||||
style="width:100px;" @click="goRoute(item)">
|
||||
<div class="concise">
|
||||
<i class=" concise-icon-item iconfont" :class="item.meta.menuIcon"></i>
|
||||
<i class=" concise-icon-item iconfont" :class="item.meta.icon"></i>
|
||||
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||
@click.stop="handleClickWithDelay(item)"></i>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
||||
@click="goRoute(item, route)" style="width:100px">
|
||||
<div class="concise">
|
||||
<i class=" concise-icon-item iconfont" :class="route.meta.menuIcon">
|
||||
<i class=" concise-icon-item iconfont" :class="route.meta.icon">
|
||||
</i>
|
||||
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||
@click.stop="handleClickWithDelay(route)"></i>
|
||||
|
@ -93,7 +93,7 @@ export default {
|
|||
this.$emit("openChildren", item);
|
||||
},
|
||||
async collectClick(val) {
|
||||
// console.log(val.meta.menuIcon);
|
||||
// console.log(val.meta.icon);
|
||||
let params = {
|
||||
mcId: val.id,
|
||||
type: "",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
||||
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
||||
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||
{{ item.meta.title }}
|
||||
</p>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
||||
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
||||
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||
{{ item.meta.title }}
|
||||
</p>
|
||||
|
|
|
@ -32,21 +32,6 @@
|
|||
<template v-slot:name="{ row }">
|
||||
<div class="nameCard">
|
||||
<div class="image">
|
||||
<!-- <template v-if="row.name==='中台'">
|
||||
<img src="./images/1.png" alt="" />
|
||||
</template>
|
||||
<template v-else-if="row.name==='U8C'">
|
||||
<img src="./images/2.png" alt="" />
|
||||
</template>
|
||||
<template v-else-if="row.name==='U8'">
|
||||
<img src="./images/3.png" alt="" />
|
||||
</template>
|
||||
<template v-else-if="row.name==='BIP'">
|
||||
<img src="./images/4.png" alt="" />
|
||||
</template>
|
||||
<template v-else-if="row.name==='ERP'">
|
||||
<img src="./images/5.png" alt="" />
|
||||
</template> -->
|
||||
<template>
|
||||
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
|
||||
</template>
|
||||
|
@ -200,10 +185,9 @@ export default {
|
|||
this.refreshLoading = false;
|
||||
if (res.status == 200) {
|
||||
this.pageModel.total = res.attribute.total;
|
||||
//获取图片
|
||||
res.attribute.list.map(el => {
|
||||
return request({
|
||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.appLogo,
|
||||
url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + el.appLogo,
|
||||
method: "get",
|
||||
responseType: 'arraybuffer'
|
||||
}).then((res) => {
|
||||
|
@ -252,7 +236,7 @@ export default {
|
|||
computed: {
|
||||
// 操作框的宽度
|
||||
funWidth() {
|
||||
return this.funData.length * 70;
|
||||
return this.funData.length * 100;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
@ -323,12 +307,14 @@ export default {
|
|||
align-items: center;
|
||||
|
||||
.image {
|
||||
flex: 0.25;
|
||||
width: 29px;
|
||||
height: 29px;
|
||||
flex: 0.35;
|
||||
width: 40px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
|
@ -346,17 +332,18 @@ export default {
|
|||
|
||||
> .name {
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
> .version {
|
||||
margin-top: 1px;
|
||||
color: #ff8b0f;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0 5px ;
|
||||
border: 0.5px solid #ff8b0f;
|
||||
padding: 0 1px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -366,7 +353,8 @@ export default {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
|
||||
span {
|
||||
margin-top: 5px;
|
||||
|
@ -374,6 +362,8 @@ export default {
|
|||
padding: 2px 10px;
|
||||
margin-left: 8px;
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.state1 {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
<!-- 轮播图-->
|
||||
<div class="swiper">
|
||||
<el-carousel height="150px" arrow="never" :loop="true">
|
||||
<el-carousel height="150px" arrow="never" :loop="true" indicator-position="outside">
|
||||
<el-carousel-item v-for="(item,index) in errList" :key="index">
|
||||
<div class="errList">
|
||||
<div class="errItem" v-for="row in errList[index]">
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
>
|
||||
</el-input>
|
||||
<el-input-number
|
||||
v-if="row.type === 'num'"
|
||||
v-model="ruleForm[row.prop]"
|
||||
v-if="row.tag === 'num' || (row.type === 'num' && !lookFlag)"
|
||||
v-model="ruleForm[row.id]"
|
||||
style="width: 100%"
|
||||
:disabled="row.disabled && !newFlag ? row.disabled : false"
|
||||
:precision="row.precisionNum ? row.precisionNum : 0"
|
||||
|
|
|
@ -46,21 +46,24 @@
|
|||
</el-select>
|
||||
</template>
|
||||
<template v-else
|
||||
><div v-loading="selLoading">{{ showValue }}</div></template
|
||||
>
|
||||
<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 {
|
||||
|
||||
.drop > > > .el-input__inner {
|
||||
background: #5183ff !important;
|
||||
color: white;
|
||||
border: none;
|
||||
|
@ -68,92 +71,52 @@
|
|||
padding: 10px 22px 10px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.drop {
|
||||
width: 250px;
|
||||
}
|
||||
.drop >>> .el-select .el-input .el-select__caret {
|
||||
|
||||
.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 debounce from 'lodash/debounce'
|
||||
import { getUserModuleApi } from '@/api/integrationOption/integrationOption.js'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
ruleForm: {
|
||||
type: Object,
|
||||
default: {},
|
||||
default: {}
|
||||
},
|
||||
selectInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
placeholder: String,
|
||||
value: {
|
||||
type: String,
|
||||
type: String
|
||||
},
|
||||
itemObj: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
return {}
|
||||
}
|
||||
},
|
||||
lookflag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -161,26 +124,26 @@ export default {
|
|||
pageModel: {
|
||||
total: 0,
|
||||
pageIndex: 1,
|
||||
limit: 10,
|
||||
limit: 10
|
||||
},
|
||||
selLoading: false,
|
||||
showValue: "",
|
||||
lookLoading: false,
|
||||
};
|
||||
showValue: '',
|
||||
lookLoading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selectValue: {
|
||||
get() {
|
||||
return this.value;
|
||||
return this.value
|
||||
},
|
||||
set(val) {
|
||||
this.$emit("input", val);
|
||||
},
|
||||
},
|
||||
this.$emit('input', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (Object.keys(this.ruleForm).length && this.ruleForm[this.itemObj.id]) {
|
||||
// this.getSelectdata(this.ruleForm[this.itemObj.id]);
|
||||
this.getSelectdata(this.ruleForm[this.itemObj.id]);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -188,12 +151,12 @@ export default {
|
|||
methods: {
|
||||
// 请求select信息(分页)
|
||||
async getUserModuleApi(obj = {}) {
|
||||
this.selLoading = true;
|
||||
this.selLoading = true
|
||||
const res = await getUserModuleApi(
|
||||
{
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "queryTemplateData",
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'queryTemplateData'
|
||||
},
|
||||
{
|
||||
tableName: this.itemObj.service,
|
||||
|
@ -201,48 +164,48 @@ export default {
|
|||
label: this.itemObj.label,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: this.pageModel.limit,
|
||||
...obj,
|
||||
...obj
|
||||
}
|
||||
);
|
||||
)
|
||||
if (res.status === '200') {
|
||||
console.log(res)
|
||||
this.pageModel.total = res.attribute.total;
|
||||
this.options = res.attribute.list;
|
||||
this.pageModel.total = res.attribute.total
|
||||
this.options = res.attribute.list
|
||||
}
|
||||
this.selLoading = false;
|
||||
this.selLoading = false
|
||||
},
|
||||
// 根据selectid找到value
|
||||
async getSelectdata(id) {
|
||||
this.selLoading = true;
|
||||
this.selLoading = true
|
||||
const res = await getUserModuleApi(
|
||||
{
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "queryTemplateData",
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'queryTemplateData'
|
||||
},
|
||||
{
|
||||
tableName: this.itemObj.service,
|
||||
id: id,
|
||||
label: this.itemObj.label,
|
||||
value: this.itemObj.value,
|
||||
value: this.itemObj.value
|
||||
}
|
||||
);
|
||||
)
|
||||
if (res.status == 200 && res.attribute.length) {
|
||||
this.selLoading = false;
|
||||
this.options = res.attribute;
|
||||
this.showValue = res.attribute[0][this.itemObj.label];
|
||||
this.selLoading = false
|
||||
this.options = res.attribute
|
||||
this.showValue = res.attribute[0][this.itemObj.label]
|
||||
} else {
|
||||
this.selLoading = false;
|
||||
this.selLoading = false
|
||||
this.options.push({
|
||||
[this.itemObj.label]: "请选择",
|
||||
[this.itemObj.value]: id,
|
||||
});
|
||||
[this.itemObj.label]: '请选择',
|
||||
[this.itemObj.value]: id
|
||||
})
|
||||
}
|
||||
},
|
||||
// 页码改变事件
|
||||
handleCurrentChange(val) {
|
||||
this.pageModel.pageIndex = val;
|
||||
this.getUserModuleApi();
|
||||
this.pageModel.pageIndex = val
|
||||
this.getUserModuleApi()
|
||||
},
|
||||
// select选中更改事件
|
||||
fun(val) {
|
||||
|
@ -250,18 +213,20 @@ export default {
|
|||
},
|
||||
// 获得焦点
|
||||
funx() {
|
||||
this.getUserModuleApi();
|
||||
this.getUserModuleApi()
|
||||
},
|
||||
// 失去焦点
|
||||
funb() {},
|
||||
hidden() {},
|
||||
funb() {
|
||||
},
|
||||
hidden() {
|
||||
},
|
||||
//搜索方法,将符合的数据存入options中,并分页展示
|
||||
filter: debounce(function (val) {
|
||||
filter: debounce(function(val) {
|
||||
// this.pageModel.pageIndex = 1;
|
||||
// this.getUserModuleApi({ lableValue: val });
|
||||
}, 300),
|
||||
}, 300)
|
||||
},
|
||||
//监听来自父组件的数据,当数据更新时,重置展示
|
||||
watch: {},
|
||||
};
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -285,7 +285,7 @@ export default {
|
|||
// }
|
||||
// })
|
||||
//主表处理
|
||||
console.log(res,'res')
|
||||
console.log(res, 'res')
|
||||
res.attribute.listList.forEach(item => {
|
||||
this.mainTableName = item.dbName
|
||||
item.ruleList.forEach(ele => {
|
||||
|
@ -532,7 +532,7 @@ export default {
|
|||
searchHandle() {
|
||||
let tempSearch = JSON.parse(JSON.stringify(this.searchForm))
|
||||
Object.keys(tempSearch).forEach((key) => {
|
||||
tempSearch[key.split(".")[1]] = tempSearch[key]
|
||||
tempSearch[key.split('.')[1]] = tempSearch[key]
|
||||
})
|
||||
console.log(tempSearch, 'tempSearch')
|
||||
let obj = {}
|
||||
|
@ -612,6 +612,7 @@ export default {
|
|||
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
|
||||
this.formRow = []
|
||||
this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow)
|
||||
console.log(this.formRow, 'formRow')
|
||||
//子表处理
|
||||
this.dialogTabaleInfo = []
|
||||
res.attribute.sublistMdmModuleDb.forEach(table => {
|
||||
|
@ -642,6 +643,10 @@ export default {
|
|||
})
|
||||
if (data.status === '200') {
|
||||
this.ruleForm = data.attribute[this.mainTableName]
|
||||
console.log(this.ruleForm,
|
||||
'123'
|
||||
)
|
||||
console.log(this.ruleForm, this.mainTableName, data.attribute, '123')
|
||||
this.dialogTabaleInfo.forEach(table => {
|
||||
table.tableData = []
|
||||
table.tableData = data.attribute[table.name]
|
||||
|
@ -699,6 +704,7 @@ export default {
|
|||
}
|
||||
this.dialogTabaleInfo.push({ ...tempObj })
|
||||
})
|
||||
console.log(this.dialogTabaleInfo,'dialogTabaleInfo')
|
||||
//初始化数据
|
||||
const data = await getUserModuleApi({
|
||||
tl: 'mdmService',
|
||||
|
@ -714,6 +720,7 @@ export default {
|
|||
table.tableData = []
|
||||
table.tableData = data.attribute[table.name] || []
|
||||
})
|
||||
console.log(this.dialogTabaleInfo,'dialogTabaleInfo')
|
||||
}
|
||||
this.dialogShow = true
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ export default {
|
|||
id: 'taskName',
|
||||
row: 8,
|
||||
required: true,
|
||||
disabled: false,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
|
@ -886,6 +886,7 @@ export default {
|
|||
|
||||
.taskAdd {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
|
||||
.addbox {
|
||||
background-color: #fff;
|
||||
|
|
|
@ -117,7 +117,8 @@
|
|||
:labelPosition="'left'"
|
||||
@onSelect="selectChangeHanlde"
|
||||
@inputBlur="optionFormInputBlur"
|
||||
@onSubmit="optionOnSubmit">
|
||||
@onSubmit="optionOnSubmit"
|
||||
>
|
||||
</baseNewForm>
|
||||
<baseNewForm
|
||||
ref="typeOptionForm"
|
||||
|
@ -127,7 +128,8 @@
|
|||
:ruleForm="typeOptionRuleForm"
|
||||
:labelPosition="'left'"
|
||||
@onSelect="typeSelectChangeHanlde"
|
||||
@onSubmit="typeOptionOnSubmit">
|
||||
@onSubmit="typeOptionOnSubmit"
|
||||
>
|
||||
</baseNewForm>
|
||||
<baseNewForm
|
||||
ref="propertyForm"
|
||||
|
@ -136,7 +138,8 @@
|
|||
:formRow="propertyFormRow"
|
||||
:ruleForm="propertyRuleForm"
|
||||
:labelPosition="'left'"
|
||||
@onSubmit="propertyOnSubmit">
|
||||
@onSubmit="propertyOnSubmit"
|
||||
>
|
||||
</baseNewForm>
|
||||
</div>
|
||||
<div class="smtitle">
|
||||
|
@ -170,7 +173,8 @@
|
|||
:formRow="mainOptionRow"
|
||||
:ruleForm="mainOptionForm"
|
||||
:labelPosition="'left'"
|
||||
@onSubmit="mainOptionOnSubmit">
|
||||
@onSubmit="mainOptionOnSubmit"
|
||||
>
|
||||
</baseNewForm>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -186,15 +190,18 @@
|
|||
:border="false"
|
||||
:funData="receiptsFunData"
|
||||
tableHeight="30vh"
|
||||
@onFunc="receiptsOnFunc">
|
||||
@onFunc="receiptsOnFunc"
|
||||
>
|
||||
<template #dbType="{row}">
|
||||
<el-select v-model="row['dbType']" placeholder="请选择"
|
||||
@change="(val)=>ruleTypeSeleceChangHandle(val,row)">
|
||||
@change="(val)=>ruleTypeSeleceChangHandle(val,row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ruleTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
@ -210,7 +217,8 @@
|
|||
v-for="item in dateOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
@ -234,12 +242,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
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 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'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -262,61 +270,61 @@ export default {
|
|||
typeOptionRuleForm: {},//表字段根据type数据
|
||||
propertyRuleForm: {},//可选属性表数据
|
||||
mainTableColumn: [
|
||||
{title: '英文名', id: 'dbName'},
|
||||
{title: '表类型', id: 'dbType'},
|
||||
{title: '表说明', id: 'remark'},
|
||||
{ title: '英文名', id: 'dbName' },
|
||||
{ title: '表类型', id: 'dbType' },
|
||||
{ title: '表说明', id: 'remark' }
|
||||
],
|
||||
mainActivedRow: false, // 数据表选中行暂存
|
||||
activedTableRow: false, //子表选中行暂存
|
||||
activedTableColumn: [
|
||||
{title: '中文名', id: 'chName'},
|
||||
{title: '英文名', id: 'enName'},
|
||||
{title: '字段类型', id: 'filedType'},
|
||||
{title: '长度', id: 'filedLength'},
|
||||
{ title: '中文名', id: 'chName' },
|
||||
{ title: '英文名', id: 'enName' },
|
||||
{ title: '字段类型', id: 'filedType' },
|
||||
{ title: '长度', id: 'filedLength' }
|
||||
],//子表行数据
|
||||
mainFunData: [
|
||||
{
|
||||
text: "删除",
|
||||
color: "red"
|
||||
text: '删除',
|
||||
color: 'red'
|
||||
}
|
||||
],//主表操作兰
|
||||
activedFunData: [
|
||||
{
|
||||
text: "删除",
|
||||
color: "red"
|
||||
text: '删除',
|
||||
color: 'red'
|
||||
}
|
||||
],//子表操作栏
|
||||
propertyActiveList: [],//可选属性选中列表(v-model)
|
||||
propertyList: [
|
||||
{
|
||||
label: "大于",
|
||||
id: "up"
|
||||
label: '大于',
|
||||
id: 'up'
|
||||
}, {
|
||||
label: "小于",
|
||||
id: "low"
|
||||
label: '小于',
|
||||
id: 'low'
|
||||
},
|
||||
{
|
||||
label: "正则",
|
||||
id: "pattern"
|
||||
label: '正则',
|
||||
id: 'pattern'
|
||||
},
|
||||
{label: "正则提示", id: "message"}
|
||||
{ label: '正则提示', id: 'message' }
|
||||
],//可选属性列表
|
||||
//radiolist属性数字字典
|
||||
propertyDist: {
|
||||
up: {
|
||||
type: "select",
|
||||
id: "up",
|
||||
title: "大于",
|
||||
type: 'select',
|
||||
id: 'up',
|
||||
title: '大于',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
},
|
||||
low: {
|
||||
type: "select",
|
||||
id: "low",
|
||||
title: "小于",
|
||||
type: 'select',
|
||||
id: 'low',
|
||||
title: '小于',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
|
@ -324,129 +332,129 @@ export default {
|
|||
options: []
|
||||
},
|
||||
pattern: {
|
||||
type: "input",
|
||||
id: "pattern",
|
||||
title: "正则",
|
||||
type: 'input',
|
||||
id: 'pattern',
|
||||
title: '正则',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
fontSize: 16
|
||||
},
|
||||
message: {
|
||||
type: "input",
|
||||
id: "message",
|
||||
title: "正则提示",
|
||||
type: 'input',
|
||||
id: 'message',
|
||||
title: '正则提示',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
fontSize: 16
|
||||
}
|
||||
},
|
||||
//可选属性表数据字典
|
||||
typeDist: {
|
||||
select: [
|
||||
{
|
||||
type: "select",
|
||||
id: "service",
|
||||
title: "服务名称",
|
||||
type: 'select',
|
||||
id: 'service',
|
||||
title: '服务名称',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
id: "label",
|
||||
title: "label",
|
||||
type: 'select',
|
||||
id: 'label',
|
||||
title: 'label',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
}, {
|
||||
type: "input",
|
||||
id: "value",
|
||||
title: "value",
|
||||
type: 'input',
|
||||
id: 'value',
|
||||
title: 'value',
|
||||
row: 24,
|
||||
disabled: true,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
}
|
||||
],
|
||||
radio: [
|
||||
{
|
||||
type: "select",
|
||||
id: "service",
|
||||
title: "服务名称",
|
||||
type: 'select',
|
||||
id: 'service',
|
||||
title: '服务名称',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
id: "label",
|
||||
title: "label",
|
||||
type: 'select',
|
||||
id: 'label',
|
||||
title: 'label',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
}, {
|
||||
type: "input",
|
||||
id: "value",
|
||||
title: "value",
|
||||
type: 'input',
|
||||
id: 'value',
|
||||
title: 'value',
|
||||
row: 24,
|
||||
disabled: true,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
}
|
||||
],
|
||||
treeselect: [
|
||||
{
|
||||
type: "select",
|
||||
id: "service",
|
||||
title: "服务名称",
|
||||
type: 'select',
|
||||
id: 'service',
|
||||
title: '服务名称',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
id: "label",
|
||||
title: "label",
|
||||
type: 'select',
|
||||
id: 'label',
|
||||
title: 'label',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
}, {
|
||||
type: "input",
|
||||
id: "value",
|
||||
title: "value",
|
||||
type: 'input',
|
||||
id: 'value',
|
||||
title: 'value',
|
||||
row: 24,
|
||||
disabled: true,
|
||||
required: false,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
options: []
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
id: "upId",
|
||||
title: "upId",
|
||||
type: 'select',
|
||||
id: 'upId',
|
||||
title: 'upId',
|
||||
row: 24,
|
||||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
options: [],
|
||||
},
|
||||
],
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
serviceOptions: [],
|
||||
labelOptions: [],
|
||||
|
@ -455,67 +463,67 @@ export default {
|
|||
receiptsTableData: [{}],//表单数据
|
||||
receiptsFunData: [
|
||||
{
|
||||
text: "删除",
|
||||
color: "red",
|
||||
text: '删除',
|
||||
color: 'red'
|
||||
}
|
||||
],
|
||||
receiptsTableColumn: [
|
||||
{
|
||||
title: "类型",
|
||||
id: "dbType"
|
||||
title: '类型',
|
||||
id: 'dbType'
|
||||
},
|
||||
{
|
||||
title: "格式规则",
|
||||
id: "dbValue"
|
||||
title: '格式规则',
|
||||
id: 'dbValue'
|
||||
}
|
||||
],
|
||||
ruleTypeOptions: [
|
||||
{
|
||||
label: "连接符号",
|
||||
value: "1"
|
||||
label: '连接符号',
|
||||
value: '1'
|
||||
}, {
|
||||
label: "字符串",
|
||||
value: "2"
|
||||
label: '字符串',
|
||||
value: '2'
|
||||
}, {
|
||||
label: "日期",
|
||||
value: "3"
|
||||
label: '日期',
|
||||
value: '3'
|
||||
}, {
|
||||
label: "流水号",
|
||||
value: "4"
|
||||
},
|
||||
label: '流水号',
|
||||
value: '4'
|
||||
}
|
||||
],
|
||||
dateOptions: [
|
||||
{
|
||||
label: "yyyy-MM-dd",
|
||||
value: "yyyy-MM-dd"
|
||||
label: 'yyyy-MM-dd',
|
||||
value: 'yyyy-MM-dd'
|
||||
}, {
|
||||
label: "yyyyMMdd",
|
||||
value: "yyyyMMdd"
|
||||
label: 'yyyyMMdd',
|
||||
value: 'yyyyMMdd'
|
||||
}, {
|
||||
label: "yyyy-MM-dd HH:mm:ss",
|
||||
value: "yyyy-MM-dd HH:mm:ss"
|
||||
label: 'yyyy-MM-dd HH:mm:ss',
|
||||
value: 'yyyy-MM-dd HH:mm:ss'
|
||||
}, {
|
||||
label: "yyyyMMddHHmmss",
|
||||
value: "yyyyMMddHHmmss"
|
||||
label: 'yyyyMMddHHmmss',
|
||||
value: 'yyyyMMddHHmmss'
|
||||
}, {
|
||||
label: "yyyyMMddHHmmssSSS",
|
||||
value: "yyyyMMddHHmmssSSS"
|
||||
},
|
||||
label: 'yyyyMMddHHmmssSSS',
|
||||
value: 'yyyyMMddHHmmssSSS'
|
||||
}
|
||||
],
|
||||
receiptsShowTableData: [],
|
||||
//数据类型字段
|
||||
dataTypeDist: {},
|
||||
};
|
||||
dataTypeDist: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 下拉初始化
|
||||
async initSelect() {
|
||||
//数据类型下拉
|
||||
const type = await getApiModuleApi({
|
||||
tl: "generalServiceImpl",
|
||||
as: "dictionaryshop",
|
||||
dj: "selectDictionaryshop",
|
||||
}, {tab_name: "mdm", column_name: "mdm_filed_type"})
|
||||
tl: 'generalServiceImpl',
|
||||
as: 'dictionaryshop',
|
||||
dj: 'selectDictionaryshop'
|
||||
}, { tab_name: 'mdm', column_name: 'mdm_filed_type' })
|
||||
this.optionFormRow[2].elCol[0].options = []
|
||||
type.attribute.forEach(item => {
|
||||
//创造数据字段给表单插槽显示(字段类型)
|
||||
|
@ -527,10 +535,10 @@ export default {
|
|||
})
|
||||
//服务名下拉
|
||||
const service = await getApiModuleApi({
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "queryMdmModuleServer",
|
||||
}, {remark: ""})
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'queryMdmModuleServer'
|
||||
}, { remark: '' })
|
||||
service.attribute.forEach(item => {
|
||||
this.serviceOptions.push({
|
||||
id: item.dbName,
|
||||
|
@ -542,21 +550,21 @@ export default {
|
|||
async init() {
|
||||
this.mainLoading = true
|
||||
const res = await getApiModuleApi({
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "queryMdmModuleDb"
|
||||
}, {id: this.$route.query.id})
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'queryMdmModuleDb'
|
||||
}, { id: this.$route.query.id })
|
||||
this.mainTableData = []
|
||||
this.receiptsShowTableData = res.attribute.mdmTableCodeRuleEntityList
|
||||
if (res.attribute.mainMdmModuleDb.id) {
|
||||
this.mainTableData.push({...res.attribute.mainMdmModuleDb})
|
||||
this.mainTableData.push({ ...res.attribute.mainMdmModuleDb })
|
||||
} else {
|
||||
let tempObj = {dbType: "1", sublistMdmModuleDbFileds: [{}]}
|
||||
let tempObj = { dbType: '1', sublistMdmModuleDbFileds: [{}] }
|
||||
this.mainTableData.push(tempObj)
|
||||
}
|
||||
res.attribute.sublistMdmModuleDb.forEach(item => {
|
||||
if (item.id) {
|
||||
this.mainTableData.push({...item})
|
||||
this.mainTableData.push({ ...item })
|
||||
}
|
||||
})
|
||||
this.mainLoading = false
|
||||
|
@ -567,7 +575,7 @@ export default {
|
|||
},
|
||||
//流水号修改事件
|
||||
integerNumber(val, row) {
|
||||
row['dbValue'] = row['dbValue'].replace(/[^\d]/g, "")
|
||||
row['dbValue'] = row['dbValue'].replace(/[^\d]/g, '')
|
||||
},
|
||||
//单据规则相关
|
||||
openReceiptsHandle() {
|
||||
|
@ -577,7 +585,7 @@ export default {
|
|||
},
|
||||
//单据规则下拉改变事件
|
||||
ruleTypeSeleceChangHandle(val, row) {
|
||||
this.$set(row, 'dbValue', "")
|
||||
this.$set(row, 'dbValue', '')
|
||||
if (val === '1') {
|
||||
row['dbValue'] = '-'
|
||||
}
|
||||
|
@ -588,7 +596,7 @@ export default {
|
|||
this.typeOptionFormRow = []
|
||||
if (!init) {
|
||||
this.typeOptionRuleForm = {
|
||||
value: "id"
|
||||
value: 'id'
|
||||
}
|
||||
}
|
||||
if (val && this.typeDist[val]) {
|
||||
|
@ -614,10 +622,10 @@ export default {
|
|||
if (row.id === 'service') {
|
||||
if (val) {
|
||||
const res = await getApiModuleApi({
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "queryMdmModuleServerFiled",
|
||||
}, {dbName: val})
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'queryMdmModuleServerFiled'
|
||||
}, { dbName: val })
|
||||
this.labelOptions = []
|
||||
res.attribute.forEach(item => {
|
||||
this.labelOptions.push({
|
||||
|
@ -632,7 +640,7 @@ export default {
|
|||
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, "")
|
||||
this.$set(this.typeOptionRuleForm, item.elCol[0].id, '')
|
||||
}
|
||||
item.elCol[0].options = deepClone(this.labelOptions)
|
||||
}
|
||||
|
@ -649,13 +657,13 @@ export default {
|
|||
//检测重名
|
||||
let flag = this.activedTableData.some(item => {
|
||||
if (item['enName'] === this.optionRuleForm['enName'] && item.index != this.optionRuleForm.index) {
|
||||
this.$vmNews("英文名不允许重复", 'warning')
|
||||
this.$vmNews('英文名不允许重复', 'warning')
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (flag) return;
|
||||
if (flag) return
|
||||
this.$refs.optionForm.submitForm()
|
||||
},
|
||||
//主表验证通过
|
||||
|
@ -668,13 +676,13 @@ export default {
|
|||
//检测重名
|
||||
let flag = this.mainTableData.some(item => {
|
||||
if (item['dbName'] === this.mainOptionForm['dbName'] && item.index != this.mainOptionForm.index) {
|
||||
this.$vmNews("英文名不允许重复", 'warning')
|
||||
this.$vmNews('英文名不允许重复', 'warning')
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (flag) return;
|
||||
if (flag) return
|
||||
// 将表值赋值给mainActivedRow
|
||||
this.$set(this.mainActivedRow, 'dbName', this.mainOptionForm['dbName'])
|
||||
this.$set(this.mainActivedRow, 'remark', this.mainOptionForm['remark'])
|
||||
|
@ -695,7 +703,7 @@ export default {
|
|||
})
|
||||
if (val === 'up' || val === 'low') {
|
||||
this.activedTableData.forEach(item => {
|
||||
tempOptions.push({label: item.id, chName: item.enName})
|
||||
tempOptions.push({ label: item.id, chName: item.enName })
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -707,7 +715,7 @@ export default {
|
|||
if (this.activedTableRow.id === ele.id) return false
|
||||
ele.mdmModuleDbFiledsRules.forEach(ele02 => {
|
||||
if (ele02.ruleValue === 'datepick') {
|
||||
tempOptions.push({label: ele.chName, id: ele.enName})
|
||||
tempOptions.push({ label: ele.chName, id: ele.enName })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -720,7 +728,7 @@ export default {
|
|||
}
|
||||
]
|
||||
}
|
||||
this.propertyFormRow.push(tempObj);
|
||||
this.propertyFormRow.push(tempObj)
|
||||
})
|
||||
|
||||
},
|
||||
|
@ -741,7 +749,7 @@ export default {
|
|||
//清空type带出来的ruleForm
|
||||
this.typeOptionFormRow = []
|
||||
this.typeOptionRuleForm = {
|
||||
value: "id"
|
||||
value: 'id'
|
||||
}
|
||||
this.propertyFormRow = []
|
||||
this.propertyRuleForm = {}
|
||||
|
@ -755,10 +763,10 @@ export default {
|
|||
this.$refs.optionForm.resetForm()
|
||||
this.optionRuleForm = deepClone(val)
|
||||
console.log(this.optionRuleForm, 'this.optionRuleForm')
|
||||
let dom = document.querySelector(".optionForm")
|
||||
let dom = document.querySelector('.optionForm')
|
||||
dom.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
behavior: 'smooth'
|
||||
})
|
||||
if (!val.mdmModuleDbFiledsRules) return
|
||||
val.mdmModuleDbFiledsRules.forEach(item => {
|
||||
|
@ -779,13 +787,12 @@ export default {
|
|||
}
|
||||
})
|
||||
if (this.typeOptionRuleForm.service) {
|
||||
this.typeSelectChangeHanlde(this.typeOptionRuleForm.service, "", "", {id: 'service'}, true)
|
||||
this.typeSelectChangeHanlde(this.typeOptionRuleForm.service, '', '', { id: 'service' }, true)
|
||||
}
|
||||
this.selectChangeHanlde(this.optionRuleForm.type, "", "", {id: 'type'}, true)
|
||||
this.selectChangeHanlde(this.optionRuleForm.type, '', '', { id: 'type' }, true)
|
||||
this.propertyActiveList = propertyRuleForm
|
||||
this.propertyActiveListChangeHanlde(this.propertyActiveList)
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
//配置项表通过
|
||||
|
@ -805,7 +812,7 @@ export default {
|
|||
type: true,
|
||||
required: true,
|
||||
disabled: true,
|
||||
width: true,
|
||||
width: true
|
||||
}
|
||||
let tempArr = []
|
||||
let disabledWords = ['id', 'document_rule', 'document_rule_num', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id']
|
||||
|
@ -815,13 +822,13 @@ export default {
|
|||
}
|
||||
if (this.optionRuleForm.type === 'datepick' || this.optionRuleForm.type === 'daterange') {
|
||||
if (this.optionRuleForm.filedType != 4) {
|
||||
this.$vmNews("字段类型与数据类型不合法,请选择日期类型", "warning")
|
||||
this.$vmNews('字段类型与数据类型不合法,请选择日期类型', 'warning')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.optionRuleForm.filedType == 4) {
|
||||
if (this.optionRuleForm.type !== 'datepick' && this.optionRuleForm.type !== 'daterange') {
|
||||
this.$vmNews("字段类型与数据类型不合法", "warning")
|
||||
this.$vmNews('字段类型与数据类型不合法', 'warning')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -836,7 +843,7 @@ export default {
|
|||
ruleCode: item.elCol[0].id,
|
||||
ruleValue: this.optionRuleForm[item.elCol[0].id],
|
||||
ruleType: 2,
|
||||
formName: "optionRuleForm"
|
||||
formName: 'optionRuleForm'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -846,7 +853,7 @@ export default {
|
|||
ruleCode: item.elCol[0].id,
|
||||
ruleValue: this.typeOptionRuleForm[item.elCol[0].id],
|
||||
ruleType: 2,
|
||||
formName: "typeOptionRuleForm"
|
||||
formName: 'typeOptionRuleForm'
|
||||
})
|
||||
})
|
||||
this.propertyFormRow.forEach(item => {
|
||||
|
@ -855,7 +862,7 @@ export default {
|
|||
ruleCode: item.elCol[0].id,
|
||||
ruleValue: this.propertyRuleForm[item.elCol[0].id],
|
||||
ruleType: 2,
|
||||
formName: "propertyRuleForm"
|
||||
formName: 'propertyRuleForm'
|
||||
})
|
||||
})
|
||||
this.activedTableRow.mdmModuleDbFiledsRules = tempArr
|
||||
|
@ -864,12 +871,12 @@ export default {
|
|||
async saveHandle() {
|
||||
//判断认证规则
|
||||
if (!this.receiptsShowTableData.length) {
|
||||
this.$vmNews("单据规则不能为空", 'warning')
|
||||
this.$vmNews('单据规则不能为空', 'warning')
|
||||
return
|
||||
}
|
||||
this.mainTableData.some((mainItem, index) => {
|
||||
let flag = this.mainTableData.some((mainItem, index) => {
|
||||
if (!mainItem.dbName) {
|
||||
this.$vmNews(`数据表第${index + 1}行的英文名不能为空`, "warning")
|
||||
this.$vmNews(`数据表第${index + 1}行的英文名不能为空`, 'warning')
|
||||
return true
|
||||
}
|
||||
return mainItem.sublistMdmModuleDbFileds.some((item, index02) => {
|
||||
|
@ -879,12 +886,13 @@ export default {
|
|||
return true
|
||||
})
|
||||
})
|
||||
if (flag) return
|
||||
this.saveLoading = true
|
||||
let params = {
|
||||
id: this.$route.query.id,
|
||||
mainMdmModuleDb: this.mainTableData[0],
|
||||
sublistMdmModuleDb: [],
|
||||
mdmTableCodeRuleEntityList: this.receiptsShowTableData,
|
||||
mdmTableCodeRuleEntityList: this.receiptsShowTableData
|
||||
}
|
||||
this.mainTableData.forEach((item, index) => {
|
||||
if (index > 0) {
|
||||
|
@ -892,12 +900,12 @@ export default {
|
|||
}
|
||||
})
|
||||
const res = await getApiModuleApi({
|
||||
tl: "mdmService",
|
||||
as: "mdmService",
|
||||
dj: "saveMdmModuleDb",
|
||||
tl: 'mdmService',
|
||||
as: 'mdmService',
|
||||
dj: 'saveMdmModuleDb'
|
||||
}, params)
|
||||
if (res.status === '200') {
|
||||
this.$vmNews("保存成功!", "success")
|
||||
this.$vmNews('保存成功!', 'success')
|
||||
this.init()
|
||||
}
|
||||
this.saveLoading = false
|
||||
|
@ -905,28 +913,28 @@ export default {
|
|||
// 主表按钮
|
||||
mainOnFunc(row, item) {
|
||||
if (!row.newFlag) {
|
||||
this.$vmNews("此行不允许删除", "warning")
|
||||
this.$vmNews('此行不允许删除', 'warning')
|
||||
return
|
||||
}
|
||||
this.$confirm("确定删除?")
|
||||
this.$confirm('确定删除?')
|
||||
.then((_) => {
|
||||
this.mainTableData.splice(row.index, 1)
|
||||
})
|
||||
.catch((_) => {
|
||||
});
|
||||
})
|
||||
},
|
||||
//选中表按钮
|
||||
activedOnFunc(row) {
|
||||
if (!row.newFlag) {
|
||||
this.$vmNews("此行不允许删除", "warning")
|
||||
this.$vmNews('此行不允许删除', 'warning')
|
||||
return
|
||||
}
|
||||
this.$confirm("确定删除?")
|
||||
this.$confirm('确定删除?')
|
||||
.then((_) => {
|
||||
this.activedTableData.splice(row.index, 1)
|
||||
})
|
||||
.catch((_) => {
|
||||
});
|
||||
})
|
||||
},
|
||||
//规则表格删除
|
||||
receiptsOnFunc(row) {
|
||||
|
@ -937,19 +945,19 @@ export default {
|
|||
let type = false
|
||||
let flag = this.receiptsTableData.some((item, index) => {
|
||||
if (!item.dbType || !item.dbValue) {
|
||||
this.$vmNews(`请选择${index + 1}行的类型并填写或选择规则`, "warning")
|
||||
this.$vmNews(`请选择${index + 1}行的类型并填写或选择规则`, 'warning')
|
||||
return true
|
||||
} else if (item.dbType === '4' && index + 1 !== this.receiptsTableData.length) {
|
||||
type = true
|
||||
this.$vmNews(`流水号只允许在最后一行`, "warning")
|
||||
this.$vmNews(`流水号只允许在最后一行`, 'warning')
|
||||
return true
|
||||
} else if (item.dbType === '4') {
|
||||
type = true
|
||||
}
|
||||
})
|
||||
if (!type) {
|
||||
this.$vmNews(`请添加流水号`, "warning")
|
||||
return;
|
||||
this.$vmNews(`请添加流水号`, 'warning')
|
||||
return
|
||||
}
|
||||
if (flag) return
|
||||
|
||||
|
@ -959,11 +967,17 @@ export default {
|
|||
},
|
||||
//主表添加按钮
|
||||
addMainAddRow() {
|
||||
this.mainTableData.push({"dbName": ``, "dbType": "2", "remark": "", sublistMdmModuleDbFileds: [], newFlag: true})
|
||||
this.mainTableData.push({
|
||||
'dbName': ``,
|
||||
'dbType': '2',
|
||||
'remark': '',
|
||||
sublistMdmModuleDbFileds: [],
|
||||
newFlag: true
|
||||
})
|
||||
},
|
||||
//选中表添加按钮
|
||||
activedAddRow() {
|
||||
this.activedTableData.push({newFlag: true, disabled: false, required: false})
|
||||
this.activedTableData.push({ newFlag: true, disabled: false, required: false })
|
||||
},
|
||||
//表单输入框失焦事件(为了让中文名称可以给显示名)
|
||||
optionFormInputBlur(id, row) {
|
||||
|
@ -980,7 +994,7 @@ export default {
|
|||
created() {
|
||||
this.initSelect()
|
||||
this.init()
|
||||
this.$emit("flashActive", 1)
|
||||
this.$emit('flashActive', 1)
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
|
@ -988,7 +1002,7 @@ export default {
|
|||
return this.labelOptions
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
Loading…
Reference in New Issue