应用中心 脚本管理、数据源管理修改与开发bug修改

This commit is contained in:
hyt 2024-06-25 13:41:35 +08:00
parent f227e0fc4b
commit b9ce505ced
25 changed files with 418 additions and 250 deletions

View File

@ -0,0 +1 @@
<svg t="1719277109538" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4273" width="200" height="200"><path d="M919.113143 325.485714H104.813714v-67.803428h814.299429v-133.12a36.571429 36.571429 0 0 0-36.571429-36.571429H141.385143a36.571429 36.571429 0 0 0-36.571429 36.571429L103.862857 865.645714a36.425143 36.425143 0 0 0 36.571429 36.571429h673.865143a33.938286 33.938286 0 1 1 0 67.876571h-705.097143-0.146286a73.142857 73.142857 0 0 1-73.069714-73.142857L36.937143 93.184a73.142857 73.142857 0 0 1 73.142857-73.142857h803.693714a73.142857 73.142857 0 0 1 73.142857 73.142857v703.268571a33.938286 33.938286 0 0 1-67.803428 0V325.485714zM206.628571 215.844571a33.938286 33.938286 0 1 1 0-67.803428 33.938286 33.938286 0 0 1 0 67.803428z m203.556572 0a33.938286 33.938286 0 1 1 0-67.803428 33.938286 33.938286 0 0 1 0 67.803428z m-101.814857 0a33.938286 33.938286 0 1 1 0-67.803428 33.938286 33.938286 0 0 1 0 67.803428z m34.889143 250.148572c7.168-7.094857 26.112-7.094857 33.28 0 7.168 7.094857 7.168 29.476571 0 37.156571L265.874286 610.742857 373.76 712.923429c7.168 7.094857 8.118857 27.355429 0 35.328-9.801143 9.728-29.842286 8.192-36.571429 1.609142l-126.025142-125.805714a18.432 18.432 0 0 1 0-25.965714l132.096-132.096z m343.478857 0l132.096 132.096a18.432 18.432 0 0 1 0 26.038857l-126.098286 125.732571c-6.656 6.582857-25.6 10.752-36.571429 0-10.313143-10.24-7.094857-31.305143 0-38.4l108.397715-100.717714-111.908572-108.690286c-7.168-7.68-9.508571-26.624 0-36.059428 9.289143-9.142857 26.916571-7.094857 34.084572 0z m-135.68-26.331429c3.657143-9.508571 21.430857-15.506286 32.768-11.264 10.825143 4.022857 17.188571 19.017143 14.189714 28.525715l-119.808 329.947428c-3.657143 9.508571-20.699429 13.238857-30.281143 9.728-10.166857-3.584-21.211429-17.554286-17.554286-27.062857l120.685715-329.874286z" p-id="4274"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -718,7 +718,7 @@ export default {
timeoutPeriod: 10000,
currentLimiting: 100,
requestMethod: '1',
extensionApi: '1'
extensionApi: '2'
}, //2
stepThreeRadio: 1, //穿
stepThreeRadioOptions: [
@ -2199,7 +2199,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
.wrap {

View File

@ -1026,7 +1026,7 @@ export default {
<style scoped lang='scss'>
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
.apiWrap {

View File

@ -292,7 +292,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {

View File

@ -387,7 +387,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {

View File

@ -207,7 +207,7 @@ const settingMenu = [
},
{
title: "脚本管理",
icon: "appMenu06",
icon: "appMenu07",
path: 'scriptAdmin'
},
]

View File

@ -226,6 +226,10 @@ const dataSettingFormRow = [
{
id: '3',
label: 'mysql'
},
{
id: '4',
label: 'dm'
}
]
}]
@ -242,7 +246,8 @@ const dataSettingFormRow = [
}, {
title: '密码',
id: 'password',
type: 'input',
type: 'password',
tag:"elInput",
changeRemind: true,
row: 12,
required: true,

View File

@ -388,7 +388,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {

View File

@ -147,6 +147,7 @@ export default {
},
//
inserterAdd() {
this.ruleForm = {}
this.plugInDialog = true;
// this.$router.push({ path: "/inserterAdmin/inserterAdd" });
},

View File

@ -139,7 +139,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
@ -203,4 +203,4 @@ export default {
}
}
}
</style>
</style>

View File

@ -59,7 +59,7 @@ const formRow = [
id: 'scriptData',
row: 24,
disabled: false,
required: false,
required: true,
fontSize: 16
}
]

View File

@ -3,17 +3,17 @@
<header>
<div class="left">
<el-input
placeholder="脚本"
v-model="searchForm.scriptName"
@change="searchBtnHandle"
placeholder="脚本"
v-model="searchForm.scriptName"
@change="searchBtnHandle"
>
<i slot="suffix" class="el-input__icon el-icon-search" @click="searchBtnHandle"></i>
</el-input>
</div>
<div class="right">
<el-button
icon="el-icon-back"
@click="
icon="el-icon-back"
@click="
$router.replace({ path: '/applicationList/applicationListAdmin' })
"
>返回
@ -27,16 +27,16 @@
</header>
<main>
<BaseTable
ref="mainTable"
:tableData="tableData"
:tableColumn="tableColumn"
:funData="funData"
:funWidth="funWidth"
:showIndex="true"
:tabLoading="mainTabLoading"
@onFunc="tableButtonHandle"
:tableHeight="'70vh'"
:border="false"
ref="mainTable"
:tableData="tableData"
:tableColumn="tableColumn"
:funData="funData"
:funWidth="funWidth"
:showIndex="true"
:tabLoading="mainTabLoading"
@onFunc="tableButtonHandle"
:tableHeight="'70vh'"
:border="false"
>
<template #scriptStatus="{row}">
{{ row.scriptStatus == 1 ? '启用' : '停用' }}
@ -44,38 +44,38 @@
<!-- 启用/停用-->
<template #scriptStatus="{row}">
<el-switch
v-model="row.scriptStatus"
active-value="1"
inactive-value="0"
@change="(val)=>{swithChangeHandle(val,row)}"
v-model="row.scriptStatus"
active-value="1"
inactive-value="0"
@change="(val)=>{swithChangeHandle(val,row)}"
>
</el-switch>
</template>
</BaseTable>
<div class="page">
<basePage
:pageModel="pageModel"
@update:pageModel="currentChangeHandle"
:pageModel="pageModel"
@update:pageModel="currentChangeHandle"
></basePage>
</div>
</main>
<footer></footer>
<baseDialog
:title="'插件配置'"
v-model="plugInDialog"
@confirm="plugInConfirm"
:width="'50%'"
:title="'脚本配置'"
v-model="plugInDialog"
@confirm="plugInConfirm"
:width="'50%'"
>
<div v-if="plugInDialog">
<baseNewForm
ref="dataSettingForm"
:spanNumber="24"
:isFunBtn="false"
:lookFlag="lookFlag"
:formRule="!lookFlag"
:formRow="formRow"
:ruleForm="ruleForm"
@onSubmit="onSubmit"
ref="dataSettingForm"
:spanNumber="24"
:isFunBtn="false"
:lookFlag="lookFlag"
:formRule="!lookFlag"
:formRow="formRow"
:ruleForm="ruleForm"
@onSubmit="onSubmit"
></baseNewForm>
</div>
</baseDialog>
@ -205,6 +205,7 @@ export default {
//
inserterAdd() {
this.plugInDialog = true
this.ruleForm = {}
// this.$router.push({ path: "/inserterAdmin/inserterAdd" });
},
//
@ -220,17 +221,17 @@ export default {
this.refreshLoading = true
this.openLoading('detail')
const res = await getApiModuleApi(
{
tl: 'sysApplicationService',
as: '',
dj: 'queryAppScriptPage'
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
...obj,
appId: this.$route.query.id
}
{
tl: 'sysApplicationService',
as: '',
dj: 'queryAppScriptPage'
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
...obj,
appId: this.$route.query.id
}
)
this.refreshLoading = false
if (res.status == 200) {
@ -249,20 +250,20 @@ export default {
this.plugInDialog = true
} else if (item.type === 'dele') {
this.$confirm('确认删除?')
.then(async() => {
this.openLoading('submit')
const res = await getApiModuleApi({
tl: 'sysApplicationService',
as: '',
dj: 'deleteAppScript'
}, { id: val.id })
if (res.status === '200') {
this.$vmNews('删除脚本成功', 'success')
this.initMainTableData(this.searchForm)
}
})
.catch(() => {
})
.then(async() => {
this.openLoading('submit')
const res = await getApiModuleApi({
tl: 'sysApplicationService',
as: '',
dj: 'deleteAppScript'
}, { id: val.id })
if (res.status === '200') {
this.$vmNews('删除脚本成功', 'success')
this.initMainTableData(this.searchForm)
}
})
.catch(() => {
})
}
},
//

View File

@ -139,7 +139,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
@ -203,4 +203,4 @@ export default {
}
}
}
</style>
</style>

View File

@ -134,7 +134,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;

View File

@ -286,7 +286,7 @@ export default {
}
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
@ -302,6 +302,7 @@ export default {
background-color: #fbfbfb;
width: 100%;
overflow: auto;
margin-left: 5px;
> .btn {
display: flex;

View File

@ -24,7 +24,7 @@
:tabLoading="mainTabLoading"
:tableColumn="mainTableColumn"
:border="false"
tableHeight="68vh"
tableMaxHeight="600"
:highlightCurrent="true"
@radioChange="mainOnClick"
>
@ -36,7 +36,7 @@
<div class="settingBtn" @click="mainTableEditHandle(row)">
<img src="./images/设置.png" alt="">
</div>
<div class="deleBtn" @click="mainDeleOnFunc">
<div class="deleBtn" @click="mainDeleOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</div>
@ -63,7 +63,7 @@
:tabLoading="activedTabLoading"
:tableColumn="activedTableColumn"
:border="false"
tableHeight="73vh"
tableMaxHeight="650"
:highlightCurrent="true"
@radioChange="activedOnClick"
@onFunc="activedOnFunc"
@ -82,7 +82,7 @@
</div>
</template>
</BaseTable>
<div class="mainAddRow">
<div class="mainAddRow" v-if="mainTempClick.id">
<el-link
v-if="mainTempClick.id"
type="primary"
@ -407,7 +407,7 @@ export default {
this.$refs.mainTable.$refs.mainOptionForm.$refs['ruleForm'].validate(async(valid) => {
if (valid) {
//
let blacklist = ['id', 'document_rule', 'document_rule_num', 'data_status', 'add_status', 'update_status', 'delete_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id']
let blacklist = ['id', 'document_rule', 'document_rule_num', 'data_status', 'add_status', 'update_status', 'delete_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id','data_id']
let form = this.$refs.mainTable.mainOptionForm
//
if (blacklist.includes(form.dbName)) {
@ -516,7 +516,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
@ -526,9 +526,9 @@ export default {
.wrap {
display: flex;
background-color: #fff;
margin-left: 15px;
margin-left: 5px;
border-radius: 8px;
height: calc(100%);
.mainAddRow {
margin-top: 30px;
border: 1px dotted #ccc;

View File

@ -1075,7 +1075,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {

View File

@ -604,7 +604,7 @@ export default {
width: true
}
let tempArr = []
let disabledWords = ['id', 'formmain_id', 'data_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id']
let disabledWords = ['id', 'formmain_id', 'data_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id','data_id']
if (disabledWords.includes(this.optionRuleForm.enName)) {
this.$vmNews(`暂存失败,英文名${this.optionRuleForm.enName}不合法。`)
return

View File

@ -1,47 +1,81 @@
<template>
<div class="displayInfo">
<div class="btn">
<div class="chunk">
<el-button
icon="el-icon-back"
@click="
$router.replace({ path: '/integrationOption/masterDataOptions' })
"
>返回
</el-button
>
</div>
<div class="chunk">
<el-button
icon="el-icon-first-aid-kit"
type="primary"
@click="saveHandle"
:loading="saveLoading"
>保存
</el-button
>
</div>
</div>
<div class="main" v-loading="mainLoading">
<div class="title">显示类型</div>
<div class="radio">
<el-radio-group v-model="displayType">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'right'"
labelWidth="100px"
@onSubmit="onSubmit"
>
</baseNewForm>
<div class="typeSetting">
<div class="btn">
<div class="chunk">
<el-button
v-if="!editFlag"
icon="el-icon-edit"
type="primary"
@click="editFlag=true"
>编辑
</el-button>
<el-button
v-if="editFlag"
icon="el-icon-close"
@click="getRuleForm"
:loading="saveLoading"
>取消
</el-button>
<el-button
v-if="editFlag"
icon="el-icon-first-aid-kit"
type="primary"
@click="saveHandle"
:loading="saveLoading"
>保存
</el-button>
</div>
</div>
<template v-if="!editFlag">
<div class="title">显示类型</div>
<div class="radio">
<el-radio-group v-model="displayType" :disabled="true">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'right'"
labelWidth="100px"
@onSubmit="onSubmit"
:lookFlag="true"
>
</baseNewForm>
</div>
</template>
<template v-else>
<div class="title">显示类型</div>
<div class="radio">
<el-radio-group v-model="displayType">
<el-radio label="1">树形</el-radio>
<el-radio label="2">列表</el-radio>
</el-radio-group>
</div>
<div class="form" v-if="displayType == 1">
<baseNewForm
ref="optionForm"
:spanNumber="24"
:isFunBtn="false"
:formRow="formRow"
:ruleForm="ruleForm"
:labelPosition="'right'"
labelWidth="100px"
@onSubmit="onSubmit"
>
</baseNewForm>
</div>
</template>
</div>
<div class="main">
<div class="content">
@ -249,7 +283,8 @@ export default {
'新增': ['addFiled', 'dbAddFiled', 3],
'修改': ['editFiled', 'dbEditFiled', 4],
'查看': ['showFiled', 'dbShowFiled', 5]
}//
},//
editFlag: false
}
},
methods: {
@ -291,6 +326,7 @@ export default {
viewName: this.displayType
})
this.$vmNews('保存成功', 'success')
this.editFlag = false
this.getRuleForm()
} else {
this.openLoading('submit')
@ -301,6 +337,7 @@ export default {
})
this.$vmNews('保存成功', 'success')
this.editFlag = false
this.getRuleForm()
}
@ -315,6 +352,7 @@ export default {
console.log(res.attribute, 'res.attribute', res)
this.ruleForm = res.attribute ? res.attribute : {}
this.displayType = this.ruleForm.viewName ? this.ruleForm.viewName : '1'
this.editFlag = false
},
//
saveHandle() {
@ -326,6 +364,10 @@ export default {
},
//
settingHandle(key) {
if (!this.ruleForm.id) {
this.$vmNews('请先添加显示类型后再配置按钮')
return
}
this.activeTitle = key
this.mainTableDialogShow = true
this.$nextTick(() => {
@ -390,7 +432,7 @@ export default {
}
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-transfer-panel__list {
@ -405,6 +447,7 @@ export default {
background-color: #fbfbfb;
width: 100%;
position: relative;
margin-left: 5px;
> .btn {
display: flex;
@ -416,28 +459,46 @@ export default {
}
> .main {
background-color: #fff;
border-right: 8px;
height: 85vh;
overflow: auto;
margin-top: 10px;
padding: 0px 15px;
.typeSetting {
background-color: #fff;
padding: 15px 10px;
margin-bottom: 10px;
border-radius: 16px;
> .title {
font-weight: 600;
margin: 15px 0;
> .btn {
display: flex;
justify-content: flex-end;
}
> .title {
font-weight: 600;
margin-left: 20px;
margin-bottom: 25px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
> .radio {
margin: 20px 20px;
}
> .tabIndex {
margin-top: 10px;
}
}
> .radio {
margin: 15px 20px;
}
> .tabIndex {
margin-top: 10px;
}
.main {
border-radius: 16px;
background-color: #fff;
overflow: auto;
padding: 15px 10px;
> .content {
margin-top: 1vh;
@ -447,7 +508,7 @@ export default {
display: inline-block;
width: 340px;
margin-left: 8px;
height: 68vh;
height: 58vh;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #EBEBEB;
@ -511,7 +572,7 @@ export default {
}
.showCheckBoxList {
height: 45vh;
height: 40vh;
overflow: auto;
}

View File

@ -378,7 +378,7 @@ export default {
}
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-transfer-panel__list {

View File

@ -282,10 +282,11 @@ export default {
text-align: center;
height: 50px;
line-height: 50px;
}
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
@ -298,6 +299,7 @@ export default {
}
.wrap {
margin-left: 5px;
background-color: #fbfbfb;
width: 100%;
overflow: auto;

View File

@ -329,7 +329,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
.monitoring {

View File

@ -4,17 +4,17 @@
<div class="chunk" :class="{acivted:activeName==='1'}" @click="tabsHandleClick('1')">下发日志</div>
<div class="chunk" :class="{acivted:activeName==='2'}" @click="tabsHandleClick('2')">写入日志</div>
</div>
<div class="table">
<div class="table" v-loading="tableLoading">
<baseTable :tableData="tableData" :tabLoading="tabLoading"
:tableColumn="tableColumn" :border="false" tableHeight="70vh"
:tableColumn="tableColumn" :border="false" tableHeight="73vh"
>
<!-- 状态-->
<!-- 状态-->
<template #dataType="{row}">
{{ row.dataType == 1 ? '成功' : '失败'}}
{{ row.dataType == 1 ? '成功' : '失败' }}
</template>
<!-- 操作类型-->
<!-- 操作类型-->
<template #optionType="{row}">
{{row.optionType}}
{{ row.optionType }}
</template>
</baseTable>
</div>
@ -35,72 +35,98 @@ export default {
return {
activeName: '1',
tableData: [],
tableColumn: [],
tableColumn: [
{
title: '目标应用',
id: 'targetApp'
},
{
title: '目标api',
id: 'targetApi'
},
{
title: '源数据',
id: 'sourceData',
tooltip: true
},
{
title: '状态',
id: 'dataType'
},
{
title: '返回信息',
id: 'remark',
tooltip: true
},
{
title: '操作类型',
id: 'optionType'
}
],
tabLoading: false,
tableColumnTypeOne: [
{
title: "目标应用",
id: "targetApp",
title: '目标应用',
id: 'targetApp'
},
{
title: "目标api",
id: "targetApi",
title: '目标api',
id: 'targetApi'
},
{
title: "源数据",
id: "sourceData",
tooltip: true,
title: '源数据',
id: 'sourceData',
tooltip: true
},
{
title: "状态",
id: "dataType",
title: '状态',
id: 'dataType'
},
{
title: "返回信息",
id: "remark",
tooltip: true,
title: '返回信息',
id: 'remark',
tooltip: true
},
{
title: "操作类型",
id: "optionType",
},
title: '操作类型',
id: 'optionType'
}
],//
tableColumnTypeTwo: [
{
title: "来源名称",
id: "sourceName",
title: '来源名称',
id: 'sourceName'
},
{
title: "编码",
id: "code",
title: '编码',
id: 'code'
},
{
title: "源数据",
id: "sourceData",
tooltip: true,
title: '源数据',
id: 'sourceData',
tooltip: true
},
{
title: "状态",
id: "dataType",
title: '状态',
id: 'dataType'
},
{
title: "返回信息",
id: "remark",
tooltip: true,
title: '返回信息',
id: 'remark',
tooltip: true
},
{
title: "创建时间",
id: "create_time",
title: '创建时间',
id: 'create_time'
},
{
title: "操作类型",
id: "optionType",
title: '操作类型',
id: 'optionType'
},
{
title: "操作人",
id: "optionName",
},
title: '操作人',
id: 'optionName'
}
],//
pageModel: {
@ -108,11 +134,12 @@ export default {
total: 10,
limit: 10
},
optionTypeDist:{
'1':"新增",
'2':"修改",
'3':"删除",
}
optionTypeDist: {
'1': '新增',
'2': '修改',
'3': '删除'
},
tableLoading: false
}
},
methods: {
@ -162,8 +189,9 @@ export default {
<style scoped lang="scss">
.logsDeatil {
margin-left: 10px;
margin-left: 5px;
background-color: #fff;
padding: 10px;
.tabs {
display: flex;

View File

@ -1,28 +1,29 @@
<script src="configData.js"></script>
<template>
<div class="wrap">
<div class="btn">
<div class="title">主数据信息</div>
<div class="chunkList">
<div class="chunk">
<el-button icon="el-icon-back" @click="
$router.replace({ path: '/integrationOption/masterDataOptions' })
"
>返回
</el-button>
</div>
<div class="chunk">
<el-button v-if="showForm" icon="el-icon-first-aid-kit" type="primary" @click="saveHandle"
:loading="saveLoading"
>保存
</el-button>
<el-button v-else icon="el-icon-first-aid-kit" type="primary" @click="showForm=true">编辑
</el-button>
<div class="main">
<div class="btn">
<div class="chunkList">
<div class="chunk">
</div>
<div class="chunk">
<el-button
v-if="showForm"
icon="el-icon-close"
@click="showForm=false"
>取消
</el-button>
<el-button v-if="showForm" icon="el-icon-first-aid-kit" type="primary" @click="saveHandle"
:loading="saveLoading"
>保存
</el-button>
<el-button v-if="!showForm" icon="el-icon-first-aid-kit" type="primary" @click="showForm=true">编辑
</el-button>
</div>
</div>
</div>
</div>
<div class="main">
<div class="title">主数据信息</div>
<!-- 展示页-->
<template v-if="!showForm">
<div class="planInfo">
@ -36,6 +37,7 @@
</div>
</div>
</template>
<template v-if="showForm">
<!-- 编辑页-->
<div class="upload">
@ -72,7 +74,20 @@
></baseNewForm>
</div>
</template>
</div>
<div class="rule">
<div class="title">数据源</div>
<div class="line">
<div class="name">单据规则</div>
<template v-if="!receiptsTableData.length">
<div class="value">尚未设置</div>
</template>
<template v-else>
<div class="value">
<div class="receiptsItem" v-for="(item,index) in receiptsTableData">{{ item.dbValue }}</div>
</div>
</template>
</div>
</div>
</div>
</template>
@ -100,7 +115,8 @@ export default {
imgLoading: false,
saveLoading: false,
showForm: false,
billid: ''
billid: '',
receiptsTableData: []
}
},
methods: {
@ -138,8 +154,8 @@ export default {
},
async beforeUpload(file) {
if (
file.type.split('/')[1] != 'jpeg' &&
file.type.split('/')[1] != 'png'
file.type.split('/')[1] != 'jpeg' &&
file.type.split('/')[1] != 'png'
) {
this.$message({
type: 'warning',
@ -246,8 +262,16 @@ export default {
return
}
this.imgUrl =
'data:image/png/jpg;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''))
'data:image/png/jpg;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''))
})
},
//
async getRuleHandle() {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'getMdmTableCodeRule', '', {
mdmId: this.billid
})
this.receiptsTableData = res.attribute
}
},
@ -261,6 +285,7 @@ export default {
if (this.$route.query.id) {
this.billid = this.$route.query.id
this.initEditFormData()
this.getRuleHandle()
}
}
}
@ -268,7 +293,7 @@ export default {
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
@ -276,40 +301,43 @@ export default {
}
.wrap {
background-color: #fff;
width: 100%;
overflow: auto;
border-radius: 8px;
margin-left: 10px;
> .btn {
display: flex;
justify-content: space-between;
align-items: center;
.title {
margin-left: 32px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
.chunkList {
display: flex;
> .chunk {
margin-left: 10px;
}
}
margin-left: 5px;
.title {
margin-bottom: 32px;
margin-left: 32px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
> .main {
margin-top: 10px;
background-color: #fff;
border-radius: 16px;
> .btn {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 15px 10px;
.chunkList {
display: flex;
> .chunk {
margin-left: 10px;
}
}
}
> .planInfo {
margin-top: 17px;
@ -409,5 +437,36 @@ export default {
padding: 10px 20px;
}
}
> .rule {
padding: 30px 0;
margin-top: 10px;
background-color: #fff;
border-radius: 16px;
.line{
margin-left: 32px;
display: flex;
.name{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 18px;
color: #999999;
line-height: 25px;
text-align: left;
font-style: normal;
}
.value{
display: flex;
margin-left: 15px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 18px;
color: #333333;
line-height: 25px;
text-align: left;
font-style: normal;
}
}
}
}
</style>

View File

@ -11,6 +11,7 @@
</template>
</div>
<div class="appName">{{ name }}</div>
<div class="version" v-if="code">编码{{ code }}</div>
</div>
<div class="menuList">
<div class="item" v-for="(item, index) in settingMunu" :key="index" @click="menuClick(index, item)">
@ -44,6 +45,7 @@ export default {
settingMunu: configData.settingMenu,
query: this.$route.query,
name: '',
code: '',
imgUrl: '',
versionNumber: '',
imgLoading: false,
@ -71,6 +73,7 @@ export default {
}, { id: this.billid })
if (res.status === '200') {
this.name = res.attribute.mdmName
this.code = res.attribute.mdmCode
//logo
this.imgLoading = true
return request({
@ -84,7 +87,7 @@ export default {
return
}
this.imgUrl =
'data:image/png/jpg;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''))
'data:image/png/jpg;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''))
})
}
},
@ -158,12 +161,18 @@ export default {
font-size: 18px;
}
> .version {
margin-top: 1px;
.version {
margin-top: 10px;
font-size: 12px;
padding: 1px 2px;
border: 1px solid #ff8b0f;
color: #ff8b0f;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
text-align: left;
font-style: normal;
}
}