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">
<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>

View File

@ -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");

View File

@ -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>

View File

@ -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: "",

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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: "",

View File

@ -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>

View File

@ -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>

View File

@ -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 {

View File

@ -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]">

View File

@ -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"

View File

@ -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
},
// selectidvalue
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>

View File

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

View File

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

View File

@ -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 {
//typeruleForm
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">