5.21修改所有已出现的bug和优化。

This commit is contained in:
hyt 2024-05-24 16:47:01 +08:00
parent 495fc24d25
commit 8ed8c085e8
17 changed files with 458 additions and 480 deletions

View File

@ -6,7 +6,7 @@
> >
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" <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 {{ item.meta.title }}</el-menu-item
> >
</template> </template>
@ -19,7 +19,7 @@
:index="item.path" :index="item.path"
:key="index" :key="index"
v-if="index >= visibleNumber" v-if="index >= visibleNumber"
><svg-icon :icon-class="item.meta.menuIcon" /> ><svg-icon :icon-class="item.meta.icon" />
{{ item.meta.title }}</el-menu-item> {{ item.meta.title }}</el-menu-item>
</template> </template>
</el-submenu> </el-submenu>

View File

@ -15,7 +15,7 @@
<!-- color: activePage == index ? '#1478f6' : ''}" v-for="(item,index) in lagerScreenMenuData" :key="index"--> <!-- color: activePage == index ? '#1478f6' : ''}" v-for="(item,index) in lagerScreenMenuData" :key="index"-->
<!-- >--> <!-- >-->
<!-- <div @click="handlerClick(item,index)" flex>--> <!-- <div @click="handlerClick(item,index)" flex>-->
<!-- <i :class="item.meta.menuIcon"></i>--> <!-- <i :class="item.meta.icon"></i>-->
<!-- <p>{{ item.meta.title }}</p>--> <!-- <p>{{ item.meta.title }}</p>-->
<!-- </div>--> <!-- </div>-->
<!-- </router-link>--> <!-- </router-link>-->
@ -273,6 +273,7 @@ export default {
.then(() => { .then(() => {
this.$store.dispatch("LogOut").then(() => { this.$store.dispatch("LogOut").then(() => {
Cookies.remove("automaticLogin"); Cookies.remove("automaticLogin");
this.$store.commit("REMOVE_ROUTER");
// location.href = '/login'; // location.href = '/login';
this.$router.replace({ path: "/login" }); this.$router.replace({ path: "/login" });
// this.$router.push("/login"); // this.$router.push("/login");

View File

@ -5,25 +5,25 @@
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<!-- <template slot="title"> --> <!-- <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="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> --> <!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
<!-- <div v-if="sidebarOpened"> <!-- <div v-if="sidebarOpened">
<i class="iconfont" :class="item.meta.menuIcon" > </i> <i class="iconfont" :class="item.meta.icon" > </i>
<span>{{isNest}}</span> <span>{{isNest}}</span>
</div> --> </div> -->
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}"> <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> <span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
</div> </div>
<div v-else> <div v-else>
<i class="iconfont" :class="item.meta.menuIcon"> </i> <i class="iconfont" :class="item.meta.icon"> </i>
<span>{{onlyOneChild.meta.title}}</span> <span>{{onlyOneChild.meta.title}}</span>
</div> </div>
<template slot="title"> <template slot="title">
<div v-if="isNest === false"> <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> <span style="margin-left: 16px;">{{item.meta.title}}</span>
</div> </div>
</template> </template>
@ -32,7 +32,7 @@
</template> </template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title"> <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':''}" <span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
class="itemSidebar">{{item.meta.title}}</span> class="itemSidebar">{{item.meta.title}}</span>
</template> </template>

View File

@ -3,7 +3,7 @@
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)" <div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
style="width:100px;" @click="goRoute(item)"> style="width:100px;" @click="goRoute(item)">
<div class="concise"> <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" <i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
@click.stop="handleClickWithDelay(item)"></i> @click.stop="handleClickWithDelay(item)"></i>
</div> </div>
@ -20,7 +20,7 @@
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index" <div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
@click="goRoute(item, route)" style="width:100px"> @click="goRoute(item, route)" style="width:100px">
<div class="concise"> <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>
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon" <i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
@click.stop="handleClickWithDelay(route)"></i> @click.stop="handleClickWithDelay(route)"></i>
@ -93,7 +93,7 @@ export default {
this.$emit("openChildren", item); this.$emit("openChildren", item);
}, },
async collectClick(val) { async collectClick(val) {
// console.log(val.meta.menuIcon); // console.log(val.meta.icon);
let params = { let params = {
mcId: val.id, mcId: val.id,
type: "", type: "",

View File

@ -30,7 +30,7 @@
@mouseenter="openChildren(item, index)" @mouseenter="openChildren(item, index)"
@click="goRouter(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 }"> <p class="newsSider-title" :class="{ active: index === activeIndex }">
{{ item.meta.title }} {{ item.meta.title }}
</p> </p>

View File

@ -29,8 +29,8 @@
class="newsSider" class="newsSider"
@mouseenter="openChildren(item, index)" @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.icon ? item.meta.icon :'el-icon-office-building'"> </i>
<!-- <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 }"> <p class="newsSider-title" :class="{ active: index === activeIndex }">
{{ item.meta.title }} {{ item.meta.title }}
</p> </p>

View File

@ -5,25 +5,25 @@
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<!-- <template slot="title"> --> <!-- <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="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> --> <!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
<!-- <div v-if="sidebarOpened"> <!-- <div v-if="sidebarOpened">
<i class="iconfont" :class="item.meta.menuIcon" > </i> <i class="iconfont" :class="item.meta.icon" > </i>
<span>{{isNest}}</span> <span>{{isNest}}</span>
</div> --> </div> -->
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}"> <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> <span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
</div> </div>
<div v-else> <div v-else>
<i class="iconfont" :class="item.meta.menuIcon"> </i> <i class="iconfont" :class="item.meta.icon"> </i>
<span>{{onlyOneChild.meta.title}}</span> <span>{{onlyOneChild.meta.title}}</span>
</div> </div>
<template slot="title"> <template slot="title">
<div v-if="isNest === false"> <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> <span style="margin-left: 16px;">{{item.meta.title}}</span>
</div> </div>
</template> </template>
@ -32,7 +32,7 @@
</template> </template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title"> <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':''}" <span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
class="itemSidebar">{{item.meta.title}}</span> class="itemSidebar">{{item.meta.title}}</span>
</template> </template>

View File

@ -3,7 +3,7 @@
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)" <div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
style="width:100px;" @click="goRoute(item)"> style="width:100px;" @click="goRoute(item)">
<div class="concise"> <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" <i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
@click.stop="handleClickWithDelay(item)"></i> @click.stop="handleClickWithDelay(item)"></i>
</div> </div>
@ -20,7 +20,7 @@
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index" <div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
@click="goRoute(item, route)" style="width:100px"> @click="goRoute(item, route)" style="width:100px">
<div class="concise"> <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>
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon" <i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
@click.stop="handleClickWithDelay(route)"></i> @click.stop="handleClickWithDelay(route)"></i>
@ -93,7 +93,7 @@ export default {
this.$emit("openChildren", item); this.$emit("openChildren", item);
}, },
async collectClick(val) { async collectClick(val) {
// console.log(val.meta.menuIcon); // console.log(val.meta.icon);
let params = { let params = {
mcId: val.id, mcId: val.id,
type: "", type: "",

View File

@ -14,7 +14,7 @@
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{ <div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c', color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
}" class="newsSider" @mouseenter="openChildren(item, index)"> }" 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 }"> <p class="newsSider-title" :class="{ active: index === activeIndex }">
{{ item.meta.title }} {{ item.meta.title }}
</p> </p>

View File

@ -14,7 +14,7 @@
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{ <div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c', color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
}" class="newsSider" @mouseenter="openChildren(item, index)"> }" 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 }"> <p class="newsSider-title" :class="{ active: index === activeIndex }">
{{ item.meta.title }} {{ item.meta.title }}
</p> </p>

View File

@ -32,21 +32,6 @@
<template v-slot:name="{ row }"> <template v-slot:name="{ row }">
<div class="nameCard"> <div class="nameCard">
<div class="image"> <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> <template>
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/> <img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
</template> </template>
@ -200,10 +185,9 @@ export default {
this.refreshLoading = false; this.refreshLoading = false;
if (res.status == 200) { if (res.status == 200) {
this.pageModel.total = res.attribute.total; this.pageModel.total = res.attribute.total;
//
res.attribute.list.map(el => { res.attribute.list.map(el => {
return request({ return request({
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.appLogo, url: "/kangarooDataCenter/entranceController/fileDownloadNew?id=" + el.appLogo,
method: "get", method: "get",
responseType: 'arraybuffer' responseType: 'arraybuffer'
}).then((res) => { }).then((res) => {
@ -252,7 +236,7 @@ export default {
computed: { computed: {
// //
funWidth() { funWidth() {
return this.funData.length * 70; return this.funData.length * 100;
}, },
}, },
components: { components: {
@ -323,12 +307,14 @@ export default {
align-items: center; align-items: center;
.image { .image {
flex: 0.25; flex: 0.35;
width: 29px; width: 40px;
height: 29px; height: 50px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 8px;
overflow: hidden;
img { img {
width: 100%; width: 100%;
@ -346,17 +332,18 @@ export default {
> .name { > .name {
text-align: left; text-align: left;
font-size: 14px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
> .version { > .version {
margin-top: 1px;
color: #ff8b0f; color: #ff8b0f;
font-size: 12px; font-size: 14px;
height: 20px; height: 20px;
line-height: 20px;
padding: 0 5px ;
border: 0.5px solid #ff8b0f; border: 0.5px solid #ff8b0f;
padding: 0 1px; border-radius: 8px;
} }
} }
} }
@ -366,7 +353,8 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
span { span {
margin-top: 5px; margin-top: 5px;
@ -374,6 +362,8 @@ export default {
padding: 2px 10px; padding: 2px 10px;
margin-left: 8px; margin-left: 8px;
color: #fff; color: #fff;
border-radius: 8px;
font-size: 16px;
} }
.state1 { .state1 {

View File

@ -13,7 +13,7 @@
</div> </div>
<!-- 轮播图--> <!-- 轮播图-->
<div class="swiper"> <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"> <el-carousel-item v-for="(item,index) in errList" :key="index">
<div class="errList"> <div class="errList">
<div class="errItem" v-for="row in errList[index]"> <div class="errItem" v-for="row in errList[index]">

View File

@ -80,8 +80,8 @@
> >
</el-input> </el-input>
<el-input-number <el-input-number
v-if="row.type === 'num'" v-if="row.tag === 'num' || (row.type === 'num' && !lookFlag)"
v-model="ruleForm[row.prop]" v-model="ruleForm[row.id]"
style="width: 100%" style="width: 100%"
:disabled="row.disabled && !newFlag ? row.disabled : false" :disabled="row.disabled && !newFlag ? row.disabled : false"
:precision="row.precisionNum ? row.precisionNum : 0" :precision="row.precisionNum ? row.precisionNum : 0"

View File

@ -46,21 +46,24 @@
</el-select> </el-select>
</template> </template>
<template v-else <template v-else
><div v-loading="selLoading">{{ showValue }}</div></template >
<div v-loading="selLoading">{{ showValue }}</div>
</template
> >
</div> </div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .el-input--mini .el-input__inner { ::v-deep .el-input--mini .el-input__inner {
height: 38px; height: 38px;
} }
.w-100 { .w-100 {
width: 100% !important; width: 100% !important;
} }
.drop >>> .el-input__inner {
.drop > > > .el-input__inner {
background: #5183ff !important; background: #5183ff !important;
color: white; color: white;
border: none; border: none;
@ -68,92 +71,52 @@
padding: 10px 22px 10px 10px; padding: 10px 22px 10px 10px;
text-align: center; text-align: center;
} }
.drop { .drop {
width: 250px; width: 250px;
} }
.drop >>> .el-select .el-input .el-select__caret {
.drop > > > .el-select .el-input .el-select__caret {
display: none; display: none;
} }
</style> </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> <script>
import debounce from "lodash/debounce"; import debounce from 'lodash/debounce'
import { getUserModuleApi } from "@/api/integrationOption/integrationOption.js"; import { getUserModuleApi } from '@/api/integrationOption/integrationOption.js'
export default { export default {
props: { props: {
ruleForm: { ruleForm: {
type: Object, type: Object,
default: {}, default: {}
}, },
selectInfo: { selectInfo: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, }
}, },
// //
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
placeholder: String, placeholder: String,
value: { value: {
type: String, type: String
}, },
itemObj: { itemObj: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, }
}, },
lookflag: { lookflag: {
type: Boolean, type: Boolean,
default: false, default: false
}, }
}, },
data() { data() {
return { return {
@ -161,26 +124,26 @@ export default {
pageModel: { pageModel: {
total: 0, total: 0,
pageIndex: 1, pageIndex: 1,
limit: 10, limit: 10
}, },
selLoading: false, selLoading: false,
showValue: "", showValue: '',
lookLoading: false, lookLoading: false
}; }
}, },
computed: { computed: {
selectValue: { selectValue: {
get() { get() {
return this.value; return this.value
}, },
set(val) { set(val) {
this.$emit("input", val); this.$emit('input', val)
}, }
}, }
}, },
created() { created() {
if (Object.keys(this.ruleForm).length && this.ruleForm[this.itemObj.id]) { 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() { mounted() {
@ -188,12 +151,12 @@ export default {
methods: { methods: {
// select // select
async getUserModuleApi(obj = {}) { async getUserModuleApi(obj = {}) {
this.selLoading = true; this.selLoading = true
const res = await getUserModuleApi( const res = await getUserModuleApi(
{ {
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "queryTemplateData", dj: 'queryTemplateData'
}, },
{ {
tableName: this.itemObj.service, tableName: this.itemObj.service,
@ -201,48 +164,48 @@ export default {
label: this.itemObj.label, label: this.itemObj.label,
pageNum: this.pageModel.pageIndex, pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit, pageSize: this.pageModel.limit,
...obj, ...obj
} }
); )
if (res.status === '200') { if (res.status === '200') {
console.log(res) console.log(res)
this.pageModel.total = res.attribute.total; this.pageModel.total = res.attribute.total
this.options = res.attribute.list; this.options = res.attribute.list
} }
this.selLoading = false; this.selLoading = false
}, },
// selectidvalue // selectidvalue
async getSelectdata(id) { async getSelectdata(id) {
this.selLoading = true; this.selLoading = true
const res = await getUserModuleApi( const res = await getUserModuleApi(
{ {
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "queryTemplateData", dj: 'queryTemplateData'
}, },
{ {
tableName: this.itemObj.service, tableName: this.itemObj.service,
id: id, id: id,
label: this.itemObj.label, label: this.itemObj.label,
value: this.itemObj.value, value: this.itemObj.value
} }
); )
if (res.status == 200 && res.attribute.length) { if (res.status == 200 && res.attribute.length) {
this.selLoading = false; this.selLoading = false
this.options = res.attribute; this.options = res.attribute
this.showValue = res.attribute[0][this.itemObj.label]; this.showValue = res.attribute[0][this.itemObj.label]
} else { } else {
this.selLoading = false; this.selLoading = false
this.options.push({ this.options.push({
[this.itemObj.label]: "请选择", [this.itemObj.label]: '请选择',
[this.itemObj.value]: id, [this.itemObj.value]: id
}); })
} }
}, },
// //
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageModel.pageIndex = val; this.pageModel.pageIndex = val
this.getUserModuleApi(); this.getUserModuleApi()
}, },
// select // select
fun(val) { fun(val) {
@ -250,18 +213,20 @@ export default {
}, },
// //
funx() { funx() {
this.getUserModuleApi(); this.getUserModuleApi()
}, },
// //
funb() {}, funb() {
hidden() {}, },
hidden() {
},
//,options //,options
filter: debounce(function (val) { filter: debounce(function(val) {
// this.pageModel.pageIndex = 1; // this.pageModel.pageIndex = 1;
// this.getUserModuleApi({ lableValue: val }); // this.getUserModuleApi({ lableValue: val });
}, 300), }, 300)
}, },
// //
watch: {}, watch: {}
}; }
</script> </script>

View File

@ -2,38 +2,38 @@
<div class="wrap"> <div class="wrap">
<div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.2"> <div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.2">
<BaseMenuTree <BaseMenuTree
:menuData="treeData" :menuData="treeData"
:filterShow="false" :filterShow="false"
:Allshow="false" :Allshow="false"
:treeButton="false" :treeButton="false"
:filterButtonShow="false" :filterButtonShow="false"
style="height: 100%" style="height: 100%"
:treeProps="treeProps" :treeProps="treeProps"
@handleNodeClick="homeHandleNodeClick" @handleNodeClick="homeHandleNodeClick"
ref="menuTree" ref="menuTree"
></BaseMenuTree> ></BaseMenuTree>
</div> </div>
<div class="main" :style="{flex:$route.query.viewType === '1'?0.8:1}" v-loading="mainLoading"> <div class="main" :style="{flex:$route.query.viewType === '1'?0.8:1}" v-loading="mainLoading">
<div class="top"> <div class="top">
<div class="search"> <div class="search">
<BaseNewForm <BaseNewForm
v-loading="searchLoading" v-loading="searchLoading"
refName="searchForm" refName="searchForm"
:formRow="searchFormRow" :formRow="searchFormRow"
:formRule="false" :formRule="false"
:ruleForm="searchForm" :ruleForm="searchForm"
:newFlag="true" :newFlag="true"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:isFunBtn="false" :isFunBtn="false"
></BaseNewForm> ></BaseNewForm>
</div> </div>
<div class="btnList"> <div class="btnList">
<div class="btnItem" v-for="item in searchButton" :key="item.buttonType"> <div class="btnItem" v-for="item in searchButton" :key="item.buttonType">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="buttonHandle(item)" @click="buttonHandle(item)"
v-btnPermission="{ btnID: item.buttonType, routeId: $route.meta.id }" v-btnPermission="{ btnID: item.buttonType, routeId: $route.meta.id }"
>{{ item.buttonName }} >{{ item.buttonName }}
</el-button> </el-button>
</div> </div>
@ -41,24 +41,24 @@
</div> </div>
<div class="table"> <div class="table">
<BaseTable <BaseTable
ref="mainTable" ref="mainTable"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:tableData="tableData" :tableData="tableData"
:tableColumn="tableColumn" :tableColumn="tableColumn"
:funData="mainFunData" :funData="mainFunData"
:funWidth="funWidth" :funWidth="funWidth"
:showIndex="true" :showIndex="true"
:tabLoading="mainTabLoading" :tabLoading="mainTabLoading"
@onFunc="tableButtonHandle" @onFunc="tableButtonHandle"
@selectValueGeT="selectValueGeTHandle" @selectValueGeT="selectValueGeTHandle"
:tableHeight="'67vh'" :tableHeight="'67vh'"
:border="false" :border="false"
> >
</BaseTable> </BaseTable>
<div class="nextPage"> <div class="nextPage">
<BasePage <BasePage
:pageModel="pageModel" :pageModel="pageModel"
@update:pageModel="currentChangeHandle" @update:pageModel="currentChangeHandle"
></BasePage> ></BasePage>
</div> </div>
</div> </div>
@ -69,15 +69,15 @@
</h1> </h1>
<div class="dialogForm" v-if="dialogShow" style="padding: 0 20px"> <div class="dialogForm" v-if="dialogShow" style="padding: 0 20px">
<BaseNewForm <BaseNewForm
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:loading="dialogCommitLoading" :loading="dialogCommitLoading"
:formRow="formRow" :formRow="formRow"
:ruleForm="ruleForm" :ruleForm="ruleForm"
:lookFlag="lookFlag" :lookFlag="lookFlag"
:newFlag="newFlag" :newFlag="newFlag"
@onSubmit="onSubmitHandele" @onSubmit="onSubmitHandele"
:isFunBtn="false" :isFunBtn="false"
ref="dialogForm" ref="dialogForm"
></BaseNewForm> ></BaseNewForm>
</div v-> </div v->
<template v-for="(item, index) in dialogTabaleInfo"> <template v-for="(item, index) in dialogTabaleInfo">
@ -86,16 +86,16 @@
{{ item.title }} {{ item.title }}
</h1> </h1>
<BaseTableForm <BaseTableForm
:lookflag="lookFlag" :lookflag="lookFlag"
:showIndex="true" :showIndex="true"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:indexOperate="true" :indexOperate="true"
:tableInfo="item" :tableInfo="item"
@newRow="dialogTableAddHandle" @newRow="dialogTableAddHandle"
@onFunc="dialogTableDeleHandle" @onFunc="dialogTableDeleHandle"
:funData="dialogfunData" :funData="dialogfunData"
:border="false" :border="false"
table-height="30vh" table-height="30vh"
></BaseTableForm> ></BaseTableForm>
</div> </div>
@ -104,8 +104,8 @@
<!-- 分发任务dialog--> <!-- 分发任务dialog-->
<baseDialog v-model="sendShow" :footerShow="false"> <baseDialog v-model="sendShow" :footerShow="false">
<baseTable <baseTable
:tableData="sendTableData" :tableData="sendTableData"
:tableColumn="sendTableColumn" :tableColumn="sendTableColumn"
> >
<template v-slot:status="{row}"> <template v-slot:status="{row}">
{{ sendDist[row.status] }} {{ sendDist[row.status] }}
@ -285,7 +285,7 @@ export default {
// } // }
// }) // })
// //
console.log(res,'res') console.log(res, 'res')
res.attribute.listList.forEach(item => { res.attribute.listList.forEach(item => {
this.mainTableName = item.dbName this.mainTableName = item.dbName
item.ruleList.forEach(ele => { item.ruleList.forEach(ele => {
@ -379,12 +379,12 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.deleRowHanlde(row.id) this.deleRowHanlde(row.id)
}) })
.catch((error) => { .catch((error) => {
}) })
} else if (item.type === 'send') { } else if (item.type === 'send') {
this.sendHandle(row.id) this.sendHandle(row.id)
} }
@ -453,15 +453,15 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.dialogTabaleInfo[index].tableData.splice(row.index, 1) this.dialogTabaleInfo[index].tableData.splice(row.index, 1)
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
})
})
.catch((error) => {
}) })
})
.catch((error) => {
})
} }
}, },
//dialog //dialog
@ -532,7 +532,7 @@ export default {
searchHandle() { searchHandle() {
let tempSearch = JSON.parse(JSON.stringify(this.searchForm)) let tempSearch = JSON.parse(JSON.stringify(this.searchForm))
Object.keys(tempSearch).forEach((key) => { Object.keys(tempSearch).forEach((key) => {
tempSearch[key.split(".")[1]] = tempSearch[key] tempSearch[key.split('.')[1]] = tempSearch[key]
}) })
console.log(tempSearch, 'tempSearch') console.log(tempSearch, 'tempSearch')
let obj = {} let obj = {}
@ -594,24 +594,25 @@ export default {
showType: '4' showType: '4'
}) })
res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => { res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => { item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') { if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) { if (!ele.ruleValue) {
item[ele.ruleCode] = false item[ele.ruleCode] = false
} else {
item[ele.ruleCode] = JSON.parse(ele.ruleValue)
}
} else { } else {
item[ele.ruleCode] = ele.ruleValue item[ele.ruleCode] = JSON.parse(ele.ruleValue)
} }
} else {
item[ele.ruleCode] = ele.ruleValue
}
item['id'] = item.enName item['id'] = item.enName
}) })
} }
) )
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
this.formRow = [] this.formRow = []
this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow) this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow)
console.log(this.formRow, 'formRow')
// //
this.dialogTabaleInfo = [] this.dialogTabaleInfo = []
res.attribute.sublistMdmModuleDb.forEach(table => { res.attribute.sublistMdmModuleDb.forEach(table => {
@ -642,6 +643,10 @@ export default {
}) })
if (data.status === '200') { if (data.status === '200') {
this.ruleForm = data.attribute[this.mainTableName] this.ruleForm = data.attribute[this.mainTableName]
console.log(this.ruleForm,
'123'
)
console.log(this.ruleForm, this.mainTableName, data.attribute, '123')
this.dialogTabaleInfo.forEach(table => { this.dialogTabaleInfo.forEach(table => {
table.tableData = [] table.tableData = []
table.tableData = data.attribute[table.name] table.tableData = data.attribute[table.name]
@ -699,6 +704,7 @@ export default {
} }
this.dialogTabaleInfo.push({ ...tempObj }) this.dialogTabaleInfo.push({ ...tempObj })
}) })
console.log(this.dialogTabaleInfo,'dialogTabaleInfo')
// //
const data = await getUserModuleApi({ const data = await getUserModuleApi({
tl: 'mdmService', tl: 'mdmService',
@ -714,6 +720,7 @@ export default {
table.tableData = [] table.tableData = []
table.tableData = data.attribute[table.name] || [] table.tableData = data.attribute[table.name] || []
}) })
console.log(this.dialogTabaleInfo,'dialogTabaleInfo')
} }
this.dialogShow = true this.dialogShow = true
} }

View File

@ -7,16 +7,16 @@
</div> </div>
<div class="addbox"> <div class="addbox">
<baseNewForm <baseNewForm
ref="mainForm" ref="mainForm"
:spanNumber="24" :spanNumber="24"
:formRow="formRow" :formRow="formRow"
:ruleForm="ruleForm" :ruleForm="ruleForm"
:isFunBtn="false" :isFunBtn="false"
:lookFlag="lookFlag" :lookFlag="lookFlag"
:formRule="!lookFlag" :formRule="!lookFlag"
@onSubmit="onSubmitHandle" @onSubmit="onSubmitHandle"
@onChangeRadio="onChangeRadioHandle" @onChangeRadio="onChangeRadioHandle"
@onSelect="selectChangeHandle" @onSelect="selectChangeHandle"
></baseNewForm> ></baseNewForm>
</div> </div>
</header> </header>
@ -55,10 +55,10 @@
<footer> <footer>
<div class="btn"> <div class="btn">
<el-button <el-button
type="primary" type="primary"
@click="commitForm" @click="commitForm"
:loading="commitLoading" :loading="commitLoading"
v-if="!lookFlag" v-if="!lookFlag"
>提交 >提交
</el-button </el-button
> >
@ -67,11 +67,11 @@
</footer> </footer>
<el-dialog title="生成 cron" :visible.sync="showCron" width="70%"> <el-dialog title="生成 cron" :visible.sync="showCron" width="70%">
<FishCrontab <FishCrontab
class="crontab" class="crontab"
@hide="showCron = false" @hide="showCron = false"
@fill="crontabFill" @fill="crontabFill"
:expression="expression" :expression="expression"
:fiveTimes="true" :fiveTimes="true"
></FishCrontab> ></FishCrontab>
</el-dialog> </el-dialog>
</div> </div>
@ -114,7 +114,7 @@ export default {
id: 'taskName', id: 'taskName',
row: 8, row: 8,
required: true, required: true,
disabled: false, disabled: false
}, },
{ {
type: 'input', type: 'input',
@ -630,12 +630,12 @@ export default {
// //
async initSelectPlug() { async initSelectPlug() {
const res = await getApiModuleApi( const res = await getApiModuleApi(
{ {
tl: 'sysApplicationService', tl: 'sysApplicationService',
as: '', as: '',
dj: 'queryEntity' dj: 'queryEntity'
}, },
{} {}
) )
if (res.status == 200) { if (res.status == 200) {
res.attribute.forEach((item) => { res.attribute.forEach((item) => {
@ -661,14 +661,14 @@ export default {
// //
async searchTaskHandle(id) { async searchTaskHandle(id) {
const res = await getApiModuleApi( const res = await getApiModuleApi(
{ {
tl: 'integrationTaskService', tl: 'integrationTaskService',
as: '', as: '',
dj: 'getEntity' dj: 'getEntity'
}, },
{ {
id: this.$route.query.id id: this.$route.query.id
} }
) )
if (res.status == 200) { if (res.status == 200) {
this.ruleForm = res.attribute this.ruleForm = res.attribute
@ -697,8 +697,8 @@ export default {
this.showCron = true this.showCron = true
this.$nextTick(() => { this.$nextTick(() => {
document document
.querySelector('.crontab tbody') .querySelector('.crontab tbody')
.setAttribute('style', 'vertical-align:none !important;') .setAttribute('style', 'vertical-align:none !important;')
}) })
}, },
// //
@ -718,12 +718,12 @@ export default {
let obj = { ...this.ruleForm } let obj = { ...this.ruleForm }
if (!this.$route.query.id) { if (!this.$route.query.id) {
const res = await getApiModuleApi( const res = await getApiModuleApi(
{ {
tl: 'integrationTaskService', tl: 'integrationTaskService',
as: '', as: '',
dj: 'saveEntity' dj: 'saveEntity'
}, },
obj obj
) )
this.commitLoading = false this.commitLoading = false
if (res.status == 200) { if (res.status == 200) {
@ -738,12 +738,12 @@ export default {
} else { } else {
obj['id'] = this.$route.query.id obj['id'] = this.$route.query.id
const res = await getApiModuleApi( const res = await getApiModuleApi(
{ {
tl: 'integrationTaskService', tl: 'integrationTaskService',
as: '', as: '',
dj: 'updateEntity' dj: 'updateEntity'
}, },
obj obj
) )
this.commitLoading = false this.commitLoading = false
if (res.status == 200) { if (res.status == 200) {
@ -790,10 +790,10 @@ export default {
sonSelectChangeHandle(val, row) { sonSelectChangeHandle(val, row) {
console.log(val, row) console.log(val, row)
if ( if (
val != 'Object' && val != 'Object' &&
val != 'ObjectCom' && val != 'ObjectCom' &&
val != 'Map' && val != 'Map' &&
row[0].children row[0].children
) { ) {
this.$delete(row[0], 'children') this.$delete(row[0], 'children')
} }
@ -802,22 +802,22 @@ export default {
tableButtonHandle(row, item, data) { tableButtonHandle(row, item, data) {
if (item.type === 'dele') { if (item.type === 'dele') {
this.$confirm('确认删除?') this.$confirm('确认删除?')
.then(() => { .then(() => {
this.idWatch(data, row.id) this.idWatch(data, row.id)
}) })
.catch(() => { .catch(() => {
}) })
} else if (item.type === 'addattr') { } else if (item.type === 'addattr') {
console.log( console.log(
row.concreteType, row.concreteType,
row.concreteType != 'Object', row.concreteType != 'Object',
row.concreteType != 'Map' row.concreteType != 'Map'
) )
if ( if (
row.concreteType && row.concreteType &&
row.concreteType != 'Object' && row.concreteType != 'Object' &&
row.concreteType != 'Map' && row.concreteType != 'Map' &&
row.concreteType != 'ObjectCom' row.concreteType != 'ObjectCom'
) { ) {
this.$notify({ this.$notify({
title: '添加失败', title: '添加失败',
@ -886,6 +886,7 @@ export default {
.taskAdd { .taskAdd {
width: 100%; width: 100%;
overflow: auto;
.addbox { .addbox {
background-color: #fff; background-color: #fff;

View File

@ -117,7 +117,8 @@
:labelPosition="'left'" :labelPosition="'left'"
@onSelect="selectChangeHanlde" @onSelect="selectChangeHanlde"
@inputBlur="optionFormInputBlur" @inputBlur="optionFormInputBlur"
@onSubmit="optionOnSubmit"> @onSubmit="optionOnSubmit"
>
</baseNewForm> </baseNewForm>
<baseNewForm <baseNewForm
ref="typeOptionForm" ref="typeOptionForm"
@ -127,7 +128,8 @@
:ruleForm="typeOptionRuleForm" :ruleForm="typeOptionRuleForm"
:labelPosition="'left'" :labelPosition="'left'"
@onSelect="typeSelectChangeHanlde" @onSelect="typeSelectChangeHanlde"
@onSubmit="typeOptionOnSubmit"> @onSubmit="typeOptionOnSubmit"
>
</baseNewForm> </baseNewForm>
<baseNewForm <baseNewForm
ref="propertyForm" ref="propertyForm"
@ -136,7 +138,8 @@
:formRow="propertyFormRow" :formRow="propertyFormRow"
:ruleForm="propertyRuleForm" :ruleForm="propertyRuleForm"
:labelPosition="'left'" :labelPosition="'left'"
@onSubmit="propertyOnSubmit"> @onSubmit="propertyOnSubmit"
>
</baseNewForm> </baseNewForm>
</div> </div>
<div class="smtitle"> <div class="smtitle">
@ -170,7 +173,8 @@
:formRow="mainOptionRow" :formRow="mainOptionRow"
:ruleForm="mainOptionForm" :ruleForm="mainOptionForm"
:labelPosition="'left'" :labelPosition="'left'"
@onSubmit="mainOptionOnSubmit"> @onSubmit="mainOptionOnSubmit"
>
</baseNewForm> </baseNewForm>
</div> </div>
</template> </template>
@ -186,15 +190,18 @@
:border="false" :border="false"
:funData="receiptsFunData" :funData="receiptsFunData"
tableHeight="30vh" tableHeight="30vh"
@onFunc="receiptsOnFunc"> @onFunc="receiptsOnFunc"
>
<template #dbType="{row}"> <template #dbType="{row}">
<el-select v-model="row['dbType']" placeholder="请选择" <el-select v-model="row['dbType']" placeholder="请选择"
@change="(val)=>ruleTypeSeleceChangHandle(val,row)"> @change="(val)=>ruleTypeSeleceChangHandle(val,row)"
>
<el-option <el-option
v-for="item in ruleTypeOptions" v-for="item in ruleTypeOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -210,7 +217,8 @@
v-for="item in dateOptions" v-for="item in dateOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -234,12 +242,12 @@
</template> </template>
<script> <script>
import BaseTable from "@/views/intergrationTask/compoments/baseTable.vue"; import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import configData from "./configData"; import configData from './configData'
import {getApiModuleApi} from "@/api/apiChunks/index.js"; import { getApiModuleApi } from '@/api/apiChunks/index.js'
import baseNewForm from "../compoments/baseNewForm"; import baseNewForm from '../compoments/baseNewForm'
import {deepClone} from "@/utils/index.js"; import { deepClone } from '@/utils/index.js'
import baseDialog from "@/views/integrationOption/compoments/baseDialog"; import baseDialog from '@/views/integrationOption/compoments/baseDialog'
export default { export default {
data() { data() {
@ -262,61 +270,61 @@ export default {
typeOptionRuleForm: {},//type typeOptionRuleForm: {},//type
propertyRuleForm: {},// propertyRuleForm: {},//
mainTableColumn: [ mainTableColumn: [
{title: '英文名', id: 'dbName'}, { title: '英文名', id: 'dbName' },
{title: '表类型', id: 'dbType'}, { title: '表类型', id: 'dbType' },
{title: '表说明', id: 'remark'}, { title: '表说明', id: 'remark' }
], ],
mainActivedRow: false, // mainActivedRow: false, //
activedTableRow: false, // activedTableRow: false, //
activedTableColumn: [ activedTableColumn: [
{title: '中文名', id: 'chName'}, { title: '中文名', id: 'chName' },
{title: '英文名', id: 'enName'}, { title: '英文名', id: 'enName' },
{title: '字段类型', id: 'filedType'}, { title: '字段类型', id: 'filedType' },
{title: '长度', id: 'filedLength'}, { title: '长度', id: 'filedLength' }
],// ],//
mainFunData: [ mainFunData: [
{ {
text: "删除", text: '删除',
color: "red" color: 'red'
} }
],// ],//
activedFunData: [ activedFunData: [
{ {
text: "删除", text: '删除',
color: "red" color: 'red'
} }
],// ],//
propertyActiveList: [],//v-model) propertyActiveList: [],//v-model)
propertyList: [ propertyList: [
{ {
label: "大于", label: '大于',
id: "up" id: 'up'
}, { }, {
label: "小于", label: '小于',
id: "low" id: 'low'
}, },
{ {
label: "正则", label: '正则',
id: "pattern" id: 'pattern'
}, },
{label: "正则提示", id: "message"} { label: '正则提示', id: 'message' }
],// ],//
//radiolist //radiolist
propertyDist: { propertyDist: {
up: { up: {
type: "select", type: 'select',
id: "up", id: 'up',
title: "大于", title: '大于',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, },
low: { low: {
type: "select", type: 'select',
id: "low", id: 'low',
title: "小于", title: '小于',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
@ -324,129 +332,129 @@ export default {
options: [] options: []
}, },
pattern: { pattern: {
type: "input", type: 'input',
id: "pattern", id: 'pattern',
title: "正则", title: '正则',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16
}, },
message: { message: {
type: "input", type: 'input',
id: "message", id: 'message',
title: "正则提示", title: '正则提示',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16
} }
}, },
// //
typeDist: { typeDist: {
select: [ select: [
{ {
type: "select", type: 'select',
id: "service", id: 'service',
title: "服务名称", title: '服务名称',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, },
{ {
type: "select", type: 'select',
id: "label", id: 'label',
title: "label", title: 'label',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, { }, {
type: "input", type: 'input',
id: "value", id: 'value',
title: "value", title: 'value',
row: 24, row: 24,
disabled: true, disabled: true,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
} }
], ],
radio: [ radio: [
{ {
type: "select", type: 'select',
id: "service", id: 'service',
title: "服务名称", title: '服务名称',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, },
{ {
type: "select", type: 'select',
id: "label", id: 'label',
title: "label", title: 'label',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, { }, {
type: "input", type: 'input',
id: "value", id: 'value',
title: "value", title: 'value',
row: 24, row: 24,
disabled: true, disabled: true,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
} }
], ],
treeselect: [ treeselect: [
{ {
type: "select", type: 'select',
id: "service", id: 'service',
title: "服务名称", title: '服务名称',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, },
{ {
type: "select", type: 'select',
id: "label", id: 'label',
title: "label", title: 'label',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, { }, {
type: "input", type: 'input',
id: "value", id: 'value',
title: "value", title: 'value',
row: 24, row: 24,
disabled: true, disabled: true,
required: false, required: false,
fontSize: 16, fontSize: 16,
options: [], options: []
}, },
{ {
type: "select", type: 'select',
id: "upId", id: 'upId',
title: "upId", title: 'upId',
row: 24, row: 24,
disabled: false, disabled: false,
required: true, required: true,
fontSize: 16, fontSize: 16,
options: [], options: []
}, }
], ]
}, },
serviceOptions: [], serviceOptions: [],
labelOptions: [], labelOptions: [],
@ -455,67 +463,67 @@ export default {
receiptsTableData: [{}],// receiptsTableData: [{}],//
receiptsFunData: [ receiptsFunData: [
{ {
text: "删除", text: '删除',
color: "red", color: 'red'
} }
], ],
receiptsTableColumn: [ receiptsTableColumn: [
{ {
title: "类型", title: '类型',
id: "dbType" id: 'dbType'
}, },
{ {
title: "格式规则", title: '格式规则',
id: "dbValue" id: 'dbValue'
} }
], ],
ruleTypeOptions: [ ruleTypeOptions: [
{ {
label: "连接符号", label: '连接符号',
value: "1" value: '1'
}, { }, {
label: "字符串", label: '字符串',
value: "2" value: '2'
}, { }, {
label: "日期", label: '日期',
value: "3" value: '3'
}, { }, {
label: "流水号", label: '流水号',
value: "4" value: '4'
}, }
], ],
dateOptions: [ dateOptions: [
{ {
label: "yyyy-MM-dd", label: 'yyyy-MM-dd',
value: "yyyy-MM-dd" value: 'yyyy-MM-dd'
}, { }, {
label: "yyyyMMdd", label: 'yyyyMMdd',
value: "yyyyMMdd" value: 'yyyyMMdd'
}, { }, {
label: "yyyy-MM-dd HH:mm:ss", label: 'yyyy-MM-dd HH:mm:ss',
value: "yyyy-MM-dd HH:mm:ss" value: 'yyyy-MM-dd HH:mm:ss'
}, { }, {
label: "yyyyMMddHHmmss", label: 'yyyyMMddHHmmss',
value: "yyyyMMddHHmmss" value: 'yyyyMMddHHmmss'
}, { }, {
label: "yyyyMMddHHmmssSSS", label: 'yyyyMMddHHmmssSSS',
value: "yyyyMMddHHmmssSSS" value: 'yyyyMMddHHmmssSSS'
}, }
], ],
receiptsShowTableData: [], receiptsShowTableData: [],
// //
dataTypeDist: {}, dataTypeDist: {}
}; }
}, },
methods: { methods: {
// //
async initSelect() { async initSelect() {
// //
const type = await getApiModuleApi({ const type = await getApiModuleApi({
tl: "generalServiceImpl", tl: 'generalServiceImpl',
as: "dictionaryshop", as: 'dictionaryshop',
dj: "selectDictionaryshop", dj: 'selectDictionaryshop'
}, {tab_name: "mdm", column_name: "mdm_filed_type"}) }, { tab_name: 'mdm', column_name: 'mdm_filed_type' })
this.optionFormRow[2].elCol[0].options = [] this.optionFormRow[2].elCol[0].options = []
type.attribute.forEach(item => { type.attribute.forEach(item => {
// //
@ -527,10 +535,10 @@ export default {
}) })
// //
const service = await getApiModuleApi({ const service = await getApiModuleApi({
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "queryMdmModuleServer", dj: 'queryMdmModuleServer'
}, {remark: ""}) }, { remark: '' })
service.attribute.forEach(item => { service.attribute.forEach(item => {
this.serviceOptions.push({ this.serviceOptions.push({
id: item.dbName, id: item.dbName,
@ -542,21 +550,21 @@ export default {
async init() { async init() {
this.mainLoading = true this.mainLoading = true
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "queryMdmModuleDb" dj: 'queryMdmModuleDb'
}, {id: this.$route.query.id}) }, { id: this.$route.query.id })
this.mainTableData = [] this.mainTableData = []
this.receiptsShowTableData = res.attribute.mdmTableCodeRuleEntityList this.receiptsShowTableData = res.attribute.mdmTableCodeRuleEntityList
if (res.attribute.mainMdmModuleDb.id) { if (res.attribute.mainMdmModuleDb.id) {
this.mainTableData.push({...res.attribute.mainMdmModuleDb}) this.mainTableData.push({ ...res.attribute.mainMdmModuleDb })
} else { } else {
let tempObj = {dbType: "1", sublistMdmModuleDbFileds: [{}]} let tempObj = { dbType: '1', sublistMdmModuleDbFileds: [{}] }
this.mainTableData.push(tempObj) this.mainTableData.push(tempObj)
} }
res.attribute.sublistMdmModuleDb.forEach(item => { res.attribute.sublistMdmModuleDb.forEach(item => {
if (item.id) { if (item.id) {
this.mainTableData.push({...item}) this.mainTableData.push({ ...item })
} }
}) })
this.mainLoading = false this.mainLoading = false
@ -567,7 +575,7 @@ export default {
}, },
// //
integerNumber(val, row) { integerNumber(val, row) {
row['dbValue'] = row['dbValue'].replace(/[^\d]/g, "") row['dbValue'] = row['dbValue'].replace(/[^\d]/g, '')
}, },
// //
openReceiptsHandle() { openReceiptsHandle() {
@ -577,7 +585,7 @@ export default {
}, },
// //
ruleTypeSeleceChangHandle(val, row) { ruleTypeSeleceChangHandle(val, row) {
this.$set(row, 'dbValue', "") this.$set(row, 'dbValue', '')
if (val === '1') { if (val === '1') {
row['dbValue'] = '-' row['dbValue'] = '-'
} }
@ -588,7 +596,7 @@ export default {
this.typeOptionFormRow = [] this.typeOptionFormRow = []
if (!init) { if (!init) {
this.typeOptionRuleForm = { this.typeOptionRuleForm = {
value: "id" value: 'id'
} }
} }
if (val && this.typeDist[val]) { if (val && this.typeDist[val]) {
@ -614,10 +622,10 @@ export default {
if (row.id === 'service') { if (row.id === 'service') {
if (val) { if (val) {
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "queryMdmModuleServerFiled", dj: 'queryMdmModuleServerFiled'
}, {dbName: val}) }, { dbName: val })
this.labelOptions = [] this.labelOptions = []
res.attribute.forEach(item => { res.attribute.forEach(item => {
this.labelOptions.push({ this.labelOptions.push({
@ -632,7 +640,7 @@ export default {
this.typeOptionFormRow.forEach(item => { this.typeOptionFormRow.forEach(item => {
if (item.elCol[0].id === 'label' || item.elCol[0].id === 'upId') { if (item.elCol[0].id === 'label' || item.elCol[0].id === 'upId') {
if (!initFlag) { 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) item.elCol[0].options = deepClone(this.labelOptions)
} }
@ -649,13 +657,13 @@ export default {
// //
let flag = this.activedTableData.some(item => { let flag = this.activedTableData.some(item => {
if (item['enName'] === this.optionRuleForm['enName'] && item.index != this.optionRuleForm.index) { if (item['enName'] === this.optionRuleForm['enName'] && item.index != this.optionRuleForm.index) {
this.$vmNews("英文名不允许重复", 'warning') this.$vmNews('英文名不允许重复', 'warning')
return true return true
} else { } else {
return false return false
} }
}) })
if (flag) return; if (flag) return
this.$refs.optionForm.submitForm() this.$refs.optionForm.submitForm()
}, },
// //
@ -668,13 +676,13 @@ export default {
// //
let flag = this.mainTableData.some(item => { let flag = this.mainTableData.some(item => {
if (item['dbName'] === this.mainOptionForm['dbName'] && item.index != this.mainOptionForm.index) { if (item['dbName'] === this.mainOptionForm['dbName'] && item.index != this.mainOptionForm.index) {
this.$vmNews("英文名不允许重复", 'warning') this.$vmNews('英文名不允许重复', 'warning')
return true return true
} else { } else {
return false return false
} }
}) })
if (flag) return; if (flag) return
// mainActivedRow // mainActivedRow
this.$set(this.mainActivedRow, 'dbName', this.mainOptionForm['dbName']) this.$set(this.mainActivedRow, 'dbName', this.mainOptionForm['dbName'])
this.$set(this.mainActivedRow, 'remark', this.mainOptionForm['remark']) this.$set(this.mainActivedRow, 'remark', this.mainOptionForm['remark'])
@ -695,7 +703,7 @@ export default {
}) })
if (val === 'up' || val === 'low') { if (val === 'up' || val === 'low') {
this.activedTableData.forEach(item => { 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 if (this.activedTableRow.id === ele.id) return false
ele.mdmModuleDbFiledsRules.forEach(ele02 => { ele.mdmModuleDbFiledsRules.forEach(ele02 => {
if (ele02.ruleValue === 'datepick') { 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 {
//typeruleForm //typeruleForm
this.typeOptionFormRow = [] this.typeOptionFormRow = []
this.typeOptionRuleForm = { this.typeOptionRuleForm = {
value: "id" value: 'id'
} }
this.propertyFormRow = [] this.propertyFormRow = []
this.propertyRuleForm = {} this.propertyRuleForm = {}
@ -755,10 +763,10 @@ export default {
this.$refs.optionForm.resetForm() this.$refs.optionForm.resetForm()
this.optionRuleForm = deepClone(val) this.optionRuleForm = deepClone(val)
console.log(this.optionRuleForm, 'this.optionRuleForm') console.log(this.optionRuleForm, 'this.optionRuleForm')
let dom = document.querySelector(".optionForm") let dom = document.querySelector('.optionForm')
dom.scrollTo({ dom.scrollTo({
top: 0, top: 0,
behavior: 'smooth', behavior: 'smooth'
}) })
if (!val.mdmModuleDbFiledsRules) return if (!val.mdmModuleDbFiledsRules) return
val.mdmModuleDbFiledsRules.forEach(item => { val.mdmModuleDbFiledsRules.forEach(item => {
@ -779,13 +787,12 @@ export default {
} }
}) })
if (this.typeOptionRuleForm.service) { 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.propertyActiveList = propertyRuleForm
this.propertyActiveListChangeHanlde(this.propertyActiveList) this.propertyActiveListChangeHanlde(this.propertyActiveList)
}) })
}, },
// //
@ -805,7 +812,7 @@ export default {
type: true, type: true,
required: true, required: true,
disabled: true, disabled: true,
width: true, width: true
} }
let tempArr = [] let tempArr = []
let disabledWords = ['id', 'document_rule', 'document_rule_num', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id'] 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.type === 'datepick' || this.optionRuleForm.type === 'daterange') {
if (this.optionRuleForm.filedType != 4) { if (this.optionRuleForm.filedType != 4) {
this.$vmNews("字段类型与数据类型不合法,请选择日期类型", "warning") this.$vmNews('字段类型与数据类型不合法,请选择日期类型', 'warning')
return return
} }
} }
if (this.optionRuleForm.filedType == 4) { if (this.optionRuleForm.filedType == 4) {
if (this.optionRuleForm.type !== 'datepick' && this.optionRuleForm.type !== 'daterange') { if (this.optionRuleForm.type !== 'datepick' && this.optionRuleForm.type !== 'daterange') {
this.$vmNews("字段类型与数据类型不合法", "warning") this.$vmNews('字段类型与数据类型不合法', 'warning')
return return
} }
} }
@ -836,7 +843,7 @@ export default {
ruleCode: item.elCol[0].id, ruleCode: item.elCol[0].id,
ruleValue: this.optionRuleForm[item.elCol[0].id], ruleValue: this.optionRuleForm[item.elCol[0].id],
ruleType: 2, ruleType: 2,
formName: "optionRuleForm" formName: 'optionRuleForm'
}) })
} }
}) })
@ -846,7 +853,7 @@ export default {
ruleCode: item.elCol[0].id, ruleCode: item.elCol[0].id,
ruleValue: this.typeOptionRuleForm[item.elCol[0].id], ruleValue: this.typeOptionRuleForm[item.elCol[0].id],
ruleType: 2, ruleType: 2,
formName: "typeOptionRuleForm" formName: 'typeOptionRuleForm'
}) })
}) })
this.propertyFormRow.forEach(item => { this.propertyFormRow.forEach(item => {
@ -855,7 +862,7 @@ export default {
ruleCode: item.elCol[0].id, ruleCode: item.elCol[0].id,
ruleValue: this.propertyRuleForm[item.elCol[0].id], ruleValue: this.propertyRuleForm[item.elCol[0].id],
ruleType: 2, ruleType: 2,
formName: "propertyRuleForm" formName: 'propertyRuleForm'
}) })
}) })
this.activedTableRow.mdmModuleDbFiledsRules = tempArr this.activedTableRow.mdmModuleDbFiledsRules = tempArr
@ -864,12 +871,12 @@ export default {
async saveHandle() { async saveHandle() {
// //
if (!this.receiptsShowTableData.length) { if (!this.receiptsShowTableData.length) {
this.$vmNews("单据规则不能为空", 'warning') this.$vmNews('单据规则不能为空', 'warning')
return return
} }
this.mainTableData.some((mainItem, index) => { let flag = this.mainTableData.some((mainItem, index) => {
if (!mainItem.dbName) { if (!mainItem.dbName) {
this.$vmNews(`数据表第${index + 1}行的英文名不能为空`, "warning") this.$vmNews(`数据表第${index + 1}行的英文名不能为空`, 'warning')
return true return true
} }
return mainItem.sublistMdmModuleDbFileds.some((item, index02) => { return mainItem.sublistMdmModuleDbFileds.some((item, index02) => {
@ -879,12 +886,13 @@ export default {
return true return true
}) })
}) })
if (flag) return
this.saveLoading = true this.saveLoading = true
let params = { let params = {
id: this.$route.query.id, id: this.$route.query.id,
mainMdmModuleDb: this.mainTableData[0], mainMdmModuleDb: this.mainTableData[0],
sublistMdmModuleDb: [], sublistMdmModuleDb: [],
mdmTableCodeRuleEntityList: this.receiptsShowTableData, mdmTableCodeRuleEntityList: this.receiptsShowTableData
} }
this.mainTableData.forEach((item, index) => { this.mainTableData.forEach((item, index) => {
if (index > 0) { if (index > 0) {
@ -892,12 +900,12 @@ export default {
} }
}) })
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "mdmService", tl: 'mdmService',
as: "mdmService", as: 'mdmService',
dj: "saveMdmModuleDb", dj: 'saveMdmModuleDb'
}, params) }, params)
if (res.status === '200') { if (res.status === '200') {
this.$vmNews("保存成功!", "success") this.$vmNews('保存成功!', 'success')
this.init() this.init()
} }
this.saveLoading = false this.saveLoading = false
@ -905,28 +913,28 @@ export default {
// //
mainOnFunc(row, item) { mainOnFunc(row, item) {
if (!row.newFlag) { if (!row.newFlag) {
this.$vmNews("此行不允许删除", "warning") this.$vmNews('此行不允许删除', 'warning')
return return
} }
this.$confirm("确定删除?") this.$confirm('确定删除?')
.then((_) => { .then((_) => {
this.mainTableData.splice(row.index, 1) this.mainTableData.splice(row.index, 1)
}) })
.catch((_) => { .catch((_) => {
}); })
}, },
// //
activedOnFunc(row) { activedOnFunc(row) {
if (!row.newFlag) { if (!row.newFlag) {
this.$vmNews("此行不允许删除", "warning") this.$vmNews('此行不允许删除', 'warning')
return return
} }
this.$confirm("确定删除?") this.$confirm('确定删除?')
.then((_) => { .then((_) => {
this.activedTableData.splice(row.index, 1) this.activedTableData.splice(row.index, 1)
}) })
.catch((_) => { .catch((_) => {
}); })
}, },
// //
receiptsOnFunc(row) { receiptsOnFunc(row) {
@ -937,19 +945,19 @@ export default {
let type = false let type = false
let flag = this.receiptsTableData.some((item, index) => { let flag = this.receiptsTableData.some((item, index) => {
if (!item.dbType || !item.dbValue) { if (!item.dbType || !item.dbValue) {
this.$vmNews(`请选择${index + 1}行的类型并填写或选择规则`, "warning") this.$vmNews(`请选择${index + 1}行的类型并填写或选择规则`, 'warning')
return true return true
} else if (item.dbType === '4' && index + 1 !== this.receiptsTableData.length) { } else if (item.dbType === '4' && index + 1 !== this.receiptsTableData.length) {
type = true type = true
this.$vmNews(`流水号只允许在最后一行`, "warning") this.$vmNews(`流水号只允许在最后一行`, 'warning')
return true return true
} else if (item.dbType === '4') { } else if (item.dbType === '4') {
type = true type = true
} }
}) })
if (!type) { if (!type) {
this.$vmNews(`请添加流水号`, "warning") this.$vmNews(`请添加流水号`, 'warning')
return; return
} }
if (flag) return if (flag) return
@ -959,11 +967,17 @@ export default {
}, },
// //
addMainAddRow() { addMainAddRow() {
this.mainTableData.push({"dbName": ``, "dbType": "2", "remark": "", sublistMdmModuleDbFileds: [], newFlag: true}) this.mainTableData.push({
'dbName': ``,
'dbType': '2',
'remark': '',
sublistMdmModuleDbFileds: [],
newFlag: true
})
}, },
// //
activedAddRow() { activedAddRow() {
this.activedTableData.push({newFlag: true, disabled: false, required: false}) this.activedTableData.push({ newFlag: true, disabled: false, required: false })
}, },
// //
optionFormInputBlur(id, row) { optionFormInputBlur(id, row) {
@ -980,7 +994,7 @@ export default {
created() { created() {
this.initSelect() this.initSelect()
this.init() this.init()
this.$emit("flashActive", 1) this.$emit('flashActive', 1)
}, },
watch: {}, watch: {},
computed: { computed: {
@ -988,7 +1002,7 @@ export default {
return this.labelOptions return this.labelOptions
} }
} }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">