合并代码

This commit is contained in:
曹瑞 2024-06-28 19:33:47 +08:00
commit 07b75be748
163 changed files with 20142 additions and 9001 deletions

View File

@ -74,7 +74,7 @@
"vue-meta": "2.4.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuedraggable": "^2.24.3",
"vuex": "3.6.0",
"xlsx": "^0.17.0"
},

View File

@ -106,26 +106,16 @@ export default {
</style>
<style lang="scss">
.el-table__header-wrapper {
border-radius: 10px !important;
background: #f7f7f7 !important;
}
.el-table__body-wrapper {
// border-radius: 15px !important;
// margin-top: 5px;
}
.el-table__body {
padding-top: 5px;
.el-button--primary{
background-color: #3877f5 !important;
}
.el-table {
width: 100%;
margin-bottom: 20px;
&::before {
display: none;
}
.el-table__body {
//-webkit-border-horizontal-spacing: 13px; //
-webkit-border-vertical-spacing: 7px; //
}
//
thead th {
font-size: 14px;
@ -141,21 +131,20 @@ export default {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
padding: 10px 0;
border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
border-top: 0px solid rgba(0, 0, 0, 0.1) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
background: #fff;
&:first-child {
border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
border-left: 0px solid rgba(0, 0, 0, 0.1) !important;
// border-radius: 5px 0 0 5px;
border-radius: 10px 0 0 10px;
}
}
.el-table__row > td {
font-size: 12px;
color: #333333;
&:last-child {
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
border-right: 0px solid rgba(0, 0, 0, 0.1) !important;
// border-radius: 0 5px 5px 0;
border-radius: 0 10px 10px 0;
right: 1px;
}
}

View File

@ -9,8 +9,6 @@ export function login(login_name, password) {
const data = {
loginCode:login_name,
password,
}
return request({
url: 'kangarooDataCenterV3/entranceController/option',

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

@ -0,0 +1 @@
<svg t="1718845590777" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4246" width="200" height="200"><path d="M819.9 472.9L675 723.9l1.7 99.4 86.9-48.3 144.9-251-88.6-51.1zM871.1 384.3L837 443.4l88.6 51.1 34.1-59.1-88.6-51.1zM544.3 703h-288c-17.7 0-32 14.3-32 32s14.3 32 32 32h288c17.7 0 32-14.3 32-32s-14.3-32-32-32zM256.3 511c-17.7 0-32 14.3-32 32s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-384zM256.3 319c-17.7 0-32 14.3-32 32s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-384zM288 64h64v160h-64zM384 128h128v64H384zM544 64h64v160h-64z" p-id="4247" ></path><path d="M768 864c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V224c0-17.7 14.3-32 32-32h96v-64h-96c-53 0-96 43-96 96v640c0 53 43 96 96 96h576c53 0 96-43 96-96V686.7L768 798v66zM832 224c0-53-43-96-96-96h-96v64h96c17.7 0 32 14.3 32 32v311l64-111.3V224z" p-id="4248"></path></svg>

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -0,0 +1,242 @@
<!-- 柱状图折线图 -->
<template>
<div style="width: 100%">
<span class="Breadcrumbs" v-if="Breadcrumbs">
<div v-for="(item, index) in breadcrumbsList" :key="index">
<span class="title">{{ item.title }}</span>
<span class="Separator" v-show="index + 1 != breadcrumbsList.length"
>/</span
>
</div>
</span>
<div :style="proportion" ref="echarts" id="echarts"></div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
data() {
return {
myEcharts: null,
option: {},
sidebarRetract: null,
breadcrumbsList: [
{
title: "首页",
},
{
title: "活动管理",
},
],
};
},
components: {},
computed: {},
mounted() {
this.myEcharts = echarts.init(this.$refs.echarts);
this.getEcharts();
window.addEventListener("resize", this.change);
},
watch: {
"$store.getters.sidebarRetract": {
deep: true,
handler(val) {
this.change();
},
},
DataCollection: {
deep: true,
handler(newVal, oldVal) {
this.getEcharts();
},
},
},
props: {
//
Breadcrumbs: {
type: Boolean,
default: false,
},
//
proportion: {
type: Object,
default: () => {
return {
width: "700px",
height: "700px",
};
},
},
//
title: {
type: String,
default: "",
},
//
DataCollection: {
type: Object,
require: true,
default: () => {
return {};
},
},
// // ['', '']
// columnHeader: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// // ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
// Dimension: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// series: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// }
},
methods: {
change() {
this.myEcharts.resize();
},
getEcharts() {
let _this = this;
const colors = [
"#224ef5",
"#e33722",
"#ffcc2c",
"#C1232B",
"#B5C334",
"#FCCE10",
"#E87C25",
"#27727B",
"#FE8463",
"#9BCA63",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
];
this.option = {
color: colors,
title: {
text: "", //
subtext: "",
},
tooltip: {
trigger: "axis",
},
grid: {
left: "2%",
right: "2%",
bottom: "10%",
top: "2%",
containLabel: true,
},
legend: {
data: this.DataCollection.title,
align: "right",
right: 5,
textStyle: {
color: "#000",
},
itemWidth: 10,
itemHeight: 10,
itemGap: 35,
x: "center",
y: "bottom",
padding: [20, 0, 0, 0],
},
toolbox: {
show: false,
feature: {
mark: { show: true }, //
dataView: { show: true, readOnly: false }, //线
magicType: { show: true, type: ["line", "bar"] }, //
restore: { show: true }, //
saveAsImage: { show: true }, //
},
},
calculable: true,
xAxis: [
{
type: "category",
axisLabel: { interval: 0, rotate: 60 },
data: this.DataCollection.parameter,
},
],
yAxis: [
{
type: "value",
axisLine: {
show: true,
lineStyle: {
color: "#000",
},
},
"splitLine": {
"lineStyle": {
"type": "dashed", // 线
"color": "#ccc", // 线
"length": 10, // 线
"interval": 5 // 线
}
}
},
],
series: this.DataCollection.series,
};
this.myEcharts.setOption(this.option);
this.myEcharts.on("click", function (params) {
_this.echartsClick(params);
});
},
echartsClick(e) {
console.log("点击", e);
},
},
};
</script>
<style scoped lang="scss">
.Breadcrumbs {
margin: 10px 0 10px 10px;
display: flex;
font-size: 13px;
.title {
cursor: pointer;
}
.Separator {
display: inline-block;
margin: 0 9px;
color: #c0c4cc;
font-weight: 700;
}
}
</style>

View File

@ -0,0 +1,252 @@
<!-- 柱状图折线图 -->
<template>
<div style="width: 100%">
<span class="Breadcrumbs" v-if="Breadcrumbs">
<div v-for="(item, index) in breadcrumbsList" :key="index">
<span class="title">{{ item.title }}</span>
<span class="Separator" v-show="index + 1 != breadcrumbsList.length"
>/</span
>
</div>
</span>
<div :style="proportion" ref="echarts" id="echarts"></div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
data() {
return {
myEcharts: null,
option: {},
sidebarRetract: null,
breadcrumbsList: [
{
title: "首页",
},
{
title: "活动管理",
},
],
};
},
components: {},
computed: {},
mounted() {
this.myEcharts = echarts.init(this.$refs.echarts);
this.getEcharts();
window.addEventListener("resize", this.change);
},
watch: {
"$store.getters.sidebarRetract": {
deep: true,
handler(val) {
this.change();
},
},
DataCollection: {
deep: true,
handler(newVal, oldVal) {
this.getEcharts();
},
},
},
props: {
//
Breadcrumbs: {
type: Boolean,
default: false,
},
//
proportion: {
type: Object,
default: () => {
return {
width: "700px",
height: "700px",
};
},
},
//
title: {
type: String,
default: "",
},
//
DataCollection: {
type: Object,
require: true,
default: () => {
return {};
},
},
// // ['', '']
// columnHeader: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// // ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
// Dimension: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// series: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// }
},
methods: {
change() {
this.myEcharts.resize();
},
getEcharts() {
let _this = this;
const colors = [
"#224ef5",
"#e33722",
"#ffcc2c",
"#C1232B",
"#B5C334",
"#FCCE10",
"#E87C25",
"#27727B",
"#FE8463",
"#9BCA63",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
];
this.option = {
color: colors,
title: {
text: "", //
subtext: "",
},
tooltip: {
trigger: "axis",
},
grid: {
left: "2%",
right: "2%",
bottom: "10%",
top: "2%",
containLabel: true,
},
legend: {
data: this.DataCollection.title,
align: "right",
right: 5,
textStyle: {
color: "#fff",
},
itemWidth: 10,
itemHeight: 10,
itemGap: 35,
x: "center",
y: "bottom",
padding: [20, 0, 0, 0],
},
toolbox: {
show: false,
feature: {
mark: { show: true }, //
dataView: { show: true, readOnly: false }, //线
magicType: { show: true, type: ["line", "bar"] }, //
restore: { show: true }, //
saveAsImage: { show: true }, //
},
},
calculable: true,
xAxis: [
{
type: "category",
axisLabel: { interval: 0, rotate: 60,color:'#01E5EB' },
axisLine: {
show: true,
lineStyle: {
color: "#01E5EB",
},
},
data: this.DataCollection.parameter,
},
],
yAxis: [
{
type: "value",
axisLine: {
show: true,
lineStyle: {
color: "#01E5EB",
},
},
axisLabel:{
color:'#01E5EB'
},
"splitLine": {
"lineStyle": {
"type": "dashed", // 线
"color": "#5679ac", // 线
"length": 10, // 线
"interval": 5 // 线
}
}
},
],
series: this.DataCollection.series,
};
this.myEcharts.setOption(this.option);
this.myEcharts.on("click", function (params) {
_this.echartsClick(params);
});
},
echartsClick(e) {
console.log("点击", e);
},
},
};
</script>
<style scoped lang="scss">
.Breadcrumbs {
margin: 10px 0 10px 10px;
display: flex;
font-size: 13px;
.title {
cursor: pointer;
}
.Separator {
display: inline-block;
margin: 0 9px;
color: #c0c4cc;
font-weight: 700;
}
}
</style>

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

@ -324,7 +324,7 @@ export default {
pageModel: {
total: 0,
pageIndex: 1,
pageSize: 10,
pageSize: 100,
},
//
clearState: 0,
@ -545,7 +545,7 @@ export default {
},
refresh() {
this.ruleForm = Object.assign({}, "");
this.$emit("onQuery", this.mergeParam(true));
this.$emit("onQuery", this.mergeParam(true),this.ruleForm);
},
testEnter() {
if (this.enterClickType) {

View File

@ -5,91 +5,118 @@
-->
<template>
<el-form validate-on-rule-change :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm"
label-width="100px">
label-width="100px"
>
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" style="margin-bottom: 17px;">
<el-col v-for="(row, indexRow) in item.elCol" :span="row.span ? row.span : spanNumber" :key="indexRow">
<el-form-item :prop="row.prop" :style="`display: flex;margin-bottom: ${marginBottom}px;`"
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')">
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')"
>
<!-- <span class="label" slot="label" style="width: 25%;">{{row.label}}</span> -->
<div class="single label" v-if="row.label" slot="label"
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex>
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex
>
<span class="label">{{ row.label }}</span>
</div>
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin" :disabled="row.disabled ? row.disabled : false">
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable
auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin"
:disabled="row.disabled ? row.disabled : false"
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input>
<el-input v-model="ruleForm[row.prop]" clearable :disabled="row.disabled ? row.disabled : false"
:rows="row.rows ? row.rows : 2" :type="row.type ? row.type : 'text'" :maxlength="row.maxlength ? row.maxlength : ''"
<el-input v-model="ruleForm[row.prop]" clearable :disabled="row.disabled || disabled"
:rows="row.rows ? row.rows : 2" :type="row.type ? row.type : 'text'"
:maxlength="row.maxlength ? row.maxlength : ''"
:placeholder="!row.placeholder ? '请输入' : row.placeholder" v-if="row.tag === 'elInput'"
@blur="searchByStationName(row.prop)" min="1" @input="row.rules ? integerNumber(row) : ''">
@blur="searchByStationName(row.prop)" min="1" @input="row.rules ? integerNumber(row) : ''"
@change="row.changeRemind?changeRemind(row):''"
>
</el-input>
<el-input-number v-if="row.tag === 'elInputNumber'" v-model="ruleForm[row.prop]"style="width: 100%;"
:disabled="row.disabled ? row.disabled : false" :precision="row.precisionNum ? row.precisionNum : 0"
<el-input-number v-if="row.tag === 'elInputNumber'" v-model="ruleForm[row.prop]" style="width: 100%;"
:disabled="row.disabled ? row.disabled : false"
:precision="row.precisionNum ? row.precisionNum : 0"
:step="row.stepNum ? row.stepNum : 1" @change="handleChange" :min="0"
:max="row.maxNum ? row.maxNum : 99999"
:label="!row.placeholder ? '描述文字' : row.placeholder"></el-input-number>
:label="!row.placeholder ? '描述文字' : row.placeholder"
></el-input-number>
<!-- <div v-if="row.prop=='address'" id="container"
style="display:none;margin-top:30px;width: 730px;margin:0 auto;height: 590px;border: 1px solid gray;overflow:hidden;">
</div> -->
<el-switch v-if="row.tag === 'elSwitch'" v-model="ruleForm[row.prop]" :active-text="row.activeText"
@change="switchChange($event, index, indexRow, row)" :inactive-text="row.inactiveText"
:active-value="row.activeValue ? row.activeValue : true"
:inactive-value="row.inactiveValue || row.inactiveValue == 0 ? row.inactiveValue : false">
:inactive-value="row.inactiveValue || row.inactiveValue == 0 ? row.inactiveValue : false"
>
</el-switch>
<el-date-picker v-model="ruleForm[row.prop]" v-if="row.tag === 'elDatePicker'" class="w-100"
:class="{ one: row.type ? 'date' : row.type }" :disabled="row.disabled ? row.disabled : false"
:value-format="!row.valueFormat ? 'yyyy-MM-dd' : row.valueFormat" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :type="!row.type ? 'date' : row.type"
:placeholder="!row.placeholder ? '请选择' : row.placeholder">
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
>
</el-date-picker>
<el-radio-group v-model="ruleForm[row.prop]" v-if="row.tag === 'elRadio'" @input="changeRadio($event,index,indexRow,row)"
:disabled="row.disabled ? row.disabled : false">
<el-radio-group v-model="ruleForm[row.prop]" v-if="row.tag === 'elRadio'"
@input="changeRadio($event,index,indexRow,row)"
:disabled="row.disabled ? row.disabled : false"
>
<el-radio v-for="el in row.options" :label="el.value" :key="el.value">{{ el.label }}</el-radio>
</el-radio-group>
<div @click="elDialogClick(row, index, indexRow)" @mouseover="elDialogHover(row)"
@mouseleave="elDialogLeave(row)" v-if="row.tag === 'elDialog'" class="elDialog"
:style="{ 'background-color': row.disabled ? '#F5FAF7' : '#fff', 'curpur': row.disabled ? 'pointer' : 'default' }">
:style="{ 'background-color': row.disabled ? '#F5FAF7' : '#fff', 'curpur': row.disabled ? 'pointer' : 'default' }"
>
<!-- ,background-color:row.disabled?'#c0c4cc':'#fff' -->
<p :style="{ color: ruleForm[row.prop] ? '#000' : '#c0c4cc' }" class="showText"
@click="elDialogClick(row, index, indexRow)">{{ ruleForm[row.prop] ? ruleForm[row.prop] :
'请点击选择' }}
@click="elDialogClick(row, index, indexRow)"
>{{
ruleForm[row.prop] ? ruleForm[row.prop] :
'请点击选择'
}}
<!-- <el-input v-model="ruleForm[row.prop]"></el-input> -->
</p>
<!-- <i class="el-icon-more " v-if="row.elDialogHoverType"></i> -->
<i class="el-icon-more " @click="elDialogClick(row, index, indexRow)"
v-if="!row.disabled && !ruleForm[row.prop]"></i>
v-if="!row.disabled && !ruleForm[row.prop]"
></i>
<i class="el-icon-circle-close " v-if="!row.disabled && ruleForm[row.prop] && row.elDialogHoverType"
@click.stop="resetField(row.prop)" style="margin-left: 10px;"></i>
@click.stop="resetField(row.prop)" style="margin-left: 10px;"
></i>
</div>
<div v-if="row.tag === 'elLook'">
{{ ruleForm[row.prop] }}
</div>
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
@change="selectChange($event, index, indexRow, row.options)" :disabled="row.disabled?row.disabled:false"
@change="selectChange($event, index, indexRow, row.options,row)"
:disabled="row.disabled?row.disabled:false"
:clearable="row.clearable ? row.clearable : true"
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag === 'elSelect'">
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag === 'elSelect'"
>
<el-option v-for="(el, index) in row.options"
:key="!row.optionValue ? el['value'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
:value="!row.optionValue ? el['value'] : el[row.optionValue]">
:value="!row.optionValue ? el['value'] : el[row.optionValue]"
>
</el-option>
</el-select>
<el-select class="w-100" v-model="ruleForm[row.prop]" multiple :disabled="row.disabled?row.disabled:false"
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
v-if="row.tag === 'elMultiple'">
v-if="row.tag === 'elMultiple'"
>
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
:value="!row.optionValue ? el['value'] : el[row.optionValue]">
:value="!row.optionValue ? el['value'] : el[row.optionValue]"
>
</el-option>
</el-select>
<treeselect v-if="row.tag === 'elTreeSelect'" v-model="ruleForm[row.prop]" :normalizer="normalizer"
:options="delTreeChildren(row.options)" :multiple="row.multiple?row.multiple:false"
:disabled="row.disabled?row.disabled:false" @clear="treeSelectClear" ref="selectTree"
:placeholder="!row.placeholder?'请选择':row.placeholder" @select="selectTree" />
:placeholder="!row.placeholder?'请选择':row.placeholder" @select="selectTree"
/>
<slot :name="row.slotName" v-if="row.tag === 'elSlot'" :row="ruleForm"></slot>
<!-- <upload-file v-if="row.tag === 'uploadFile'" :showImgPath="ruleForm[row.prop]" ref="imgFile"
@onImage="row.prop == 'beforeImgList'? getbeforeImgList:row.prop == 'materialsList'? getmaterialsList:row.prop == 'getmaterialsListAfter'?getmaterialsListAfter:getImage "></upload-file> -->
@ -115,6 +142,7 @@
import {
checkMobile
} from '@/utils/util'
export default {
components: {
// uploadFile,
@ -155,7 +183,7 @@ export default {
default: true
},
formdata: {
type: Object,
type: Object
},
justifyContent: {
type: String,
@ -164,12 +192,12 @@ export default {
marginBottom: {
type: String,
default: '0'
},
}
},
data() {
return {
//
ruleForm: {},
ruleForm: {}
}
},
watch: {
@ -177,16 +205,20 @@ export default {
immediate: true, //
deep: true, //
handler(newVal, oldVal) {
this.$emit('dataChanges')
this.$emit('dataChanges', newVal, oldVal)
}
}
},
created() { },
created() {
},
mounted() {
// this.ruleForm = this.formdata
},
computed: {},
methods: {
changeRemind() {
this.$emit('changeRemind', this.ruleForm)
},
integerNumber(row) {
// row.rules?(v)=>()):''
// @input="(v)=>(row.row.number=v.replace(/[^\d]/g,''))"
@ -230,36 +262,36 @@ export default {
if (type == 'address') {
let address = this.ruleForm[type]
let that = this
var map = new BMap.Map("container");
map.centerAndZoom(address, 18);
map.enableScrollWheelZoom(); //
map.enableContinuousZoom(); //
map.addControl(new BMap.NavigationControl()); //
map.addControl(new BMap.OverviewMapControl()); //
var map = new BMap.Map('container')
map.centerAndZoom(address, 18)
map.enableScrollWheelZoom() //
map.enableContinuousZoom() //
map.addControl(new BMap.NavigationControl()) //
map.addControl(new BMap.OverviewMapControl()) //
map.addControl(new BMap.OverviewMapControl({
isOpen: true,
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
})); //
var localSearch = new BMap.LocalSearch(map);
localSearch.enableAutoViewport(); //
map.clearOverlays(); //
})) //
var localSearch = new BMap.LocalSearch(map)
localSearch.enableAutoViewport() //
map.clearOverlays() //
var keyword = address
localSearch.setSearchCompleteCallback(function (searchResult) {
var poi = searchResult.getPoi(0);
map.centerAndZoom(poi.point, 13);
localSearch.setSearchCompleteCallback(function(searchResult) {
var poi = searchResult.getPoi(0)
map.centerAndZoom(poi.point, 13)
var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point
.lat)); //
map.addOverlay(marker);
var content = keyword + "<br/><br/>经度:" + poi.point.lng + "<br/>纬度:" + poi.point.lat;
.lat)) //
map.addOverlay(marker)
var content = keyword + '<br/><br/>经度:' + poi.point.lng + '<br/>纬度:' + poi.point.lat
that.ruleForm['lng'] = poi.point.lng
that.ruleForm['lat'] = poi.point.lat
var infoWindow = new BMap.InfoWindow("<p style='font-size:14px;'>" + content + "</p>");
marker.addEventListener("click", function () {
this.openInfoWindow(infoWindow);
});
var infoWindow = new BMap.InfoWindow('<p style=\'font-size:14px;\'>' + content + '</p>')
marker.addEventListener('click', function() {
this.openInfoWindow(infoWindow)
})
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //
});
localSearch.search(keyword);
})
localSearch.search(keyword)
}
},
@ -269,21 +301,21 @@ export default {
},
//
getImage(imagePath) {
let licenseImg = imagePath.join(",")
let licenseImg = imagePath.join(',')
},
//
getbeforeImgList(imagePath) {
let licenseImg = imagePath.join(",")
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
},
//
getmaterialsList(imagePath) {
let licenseImg = imagePath.join(",")
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsList', licenseImg)
},
//
getmaterialsListAfter(imagePath) {
let licenseImg = imagePath.join(",")
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
},
revealPhoto(licenseImg) {
@ -298,10 +330,12 @@ export default {
let newJson = [].concat.apply([], jsonData)
newJson.forEach(item => {
if (this.ruleForm.factoryInFlag == 1) {
for (let i = 0; i < this.formRow[8].elCol.length; i++) { }
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
}
}
if (this.ruleForm.factoryInFlag == 0) {
for (let i = 0; i < this.formRow[8].elCol.length; i++) { }
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
}
}
this.$set(this.ruleForm, item.prop, echoData[item.prop])
})
@ -349,15 +383,15 @@ export default {
resetField(field) {
if (this.ruleForm[field]) {
this.$set(this.ruleForm, field, '')
this.$refs['ruleForm'].clearValidate(field); //
this.$refs['ruleForm'].clearValidate(field) //
}
},
resetFields() {
this.choiceAssignment({})
this.$refs.ruleForm.resetFields();
this.$refs.ruleForm.resetFields()
},
// , index indexRow
selectChange(val, index, indexRow, options) {
selectChange(val, index, indexRow, options, row) {
let obj = {}
options.forEach((item) => {
if (item.value == val) {
@ -365,7 +399,10 @@ export default {
}
})
this.$emit('onSelect', val, index, indexRow, obj)
this.$forceUpdate();
if (row.changeRemind) {
this.$emit('changeRemind', this.ruleForm)
}
this.$forceUpdate()
},
switchChange(val, index, indexRow, row) {
this.$emit('switchChange', val, index, indexRow, row)
@ -380,10 +417,10 @@ export default {
if (valid) {
this.$emit('onSubmit', this.ruleForm)
} else {
console.log('error submit!!');
return false;
console.log('error submit!!')
return false
}
});
})
},
//
resetForm(formName) {
@ -408,10 +445,10 @@ export default {
// row.elDialogHoverType = false
},
// input
changeRadio(val, index, indexRow, row){
changeRadio(val, index, indexRow, row) {
this.$emit('onChangeRadio', val, index, indexRow, row)
},
normalizer(node,row) {
normalizer(node, row) {
//children=null
if (node.children == null || node.children == 'null') {
delete node.children
@ -424,10 +461,10 @@ export default {
selectTree(node, instanceId) {
this.$emit('selectTree', node)
},
treeSelectClear(){
treeSelectClear() {
this.$refs.selectTree.clear()
}
},
}
}
</script>
<style>
@ -442,15 +479,16 @@ export default {
flex: 1
}
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before {
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
margin-right: 0;
content: ''
}
</style>
<style scoped lang='scss'>
::v-deep textarea.el-textarea__inner{
<style scoped lang="scss">
::v-deep textarea.el-textarea__inner {
min-height: 100px !important;
}
.label {
/* @include fontBase(16px, #333333) ; */
color: #333;
@ -460,7 +498,7 @@ export default {
padding-right: 5px;
}
>>>.el-form-item__label {
> > > .el-form-item__label {
width: 100px;
text-align: right !important;
margin-right: 10px !important;

View File

@ -410,7 +410,7 @@ export default {
pageModel: {
total: 0,
page: 1,
limit: 20,
pageSize: 100,
},
//
clearState: 0,
@ -600,7 +600,7 @@ export default {
}
let page = {
page: this.pageModel.page,
limit: this.pageModel.limit,
limit: this.pageModel.pageSize,
};
for (let i in this.model) {
if (!this.model[i]) {

View File

@ -36,7 +36,7 @@
<script>
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
import baseTree from "@/components/base/BaseMenuTree/index.vue"
import baseLayout from "@/components/base/baseLayout"
import baseLayout from "@/components/base/baseNewLayout"
export default {
components: {
baseLayout,

View File

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

View File

@ -5,7 +5,7 @@
-->
<template>
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" @handleConfirmClick="personConfirmClick"
:dialogVisible.sync="personDialog" class="userDialog" title="选择人员" width="1000px" top="10vh" :footerShow="true">
:dialogVisible.sync="personDialog" class="userDialog" title="选择人员" width="1200px" top="10vh" :footerShow="true">
<div class="organizationBody">
<base-layout title="组织机构" style="width: 20%;border-radius: 5px;height: 350px;overflow: auto; "
:operateButtonSwitch="false" :bottonShow="false" :isPage="false" :mainColor="mainColor"
@ -21,6 +21,9 @@
<base-table ref="personCustomtable" :border="true" :showIndex="false" :slotrow="true"
@radioChange="radioChange" :tabLoading.sync="personLoading" :tableHeight="personTableHeight"
:tableData="personTableData" :tableColumn="tableColumn">
<template #state="{row}">
<div>{{ row.row.state == 1 ? '停用' : '启用'}}</div>
</template>
</base-table>
</div>
</base-layout>
@ -32,7 +35,7 @@
import { authApi } from "@/api/apis/auth";
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
import baseTree from "@/components/base/BaseMenuTree/index.vue"
import baseLayout from "@/components/base/baseLayout"
import baseLayout from "@/components/base/baseNewLayout"
import baseTable from "@/components/base/baseTable"
import {
PersonList

View File

@ -17,12 +17,12 @@
<div flex="cross:center main:justify" class="rightConcat">
<span style="font-size: 16px">{{ title }}</span>
<span v-if="footerShow" flex="main:right">
<el-button @click="handleClose" v-if="closeShow"></el-button>
<el-button @click="handleClose" v-if="closeShow"></el-button>
<el-button
type="primary"
@click="handleConfirmClick"
v-if="submitShow"
></el-button
></el-button
>
</span>
<slot name="buttonPlus"></slot>
@ -110,7 +110,7 @@ export default {
/* padding-bottom:16px; */
padding: 16px 0;
overflow-y: auto;
border-bottom: 1px solid #ddd;
border-bottom: 1px solid #eee;
margin-bottom: 20px;
}
</style>

View File

@ -4,7 +4,7 @@ import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/dragWidth'
import dialogDragHeight from './dialog/dragHeight'
import clipboard from './module/clipboard'
import btnPermission from "@/directive/permission/btnPermission";
const install = function(Vue) {
Vue.directive('hasRole', hasRole)
Vue.directive('hasPermi', hasPermi)
@ -12,6 +12,7 @@ const install = function(Vue) {
Vue.directive('dialogDrag', dialogDrag)
Vue.directive('dialogDragWidth', dialogDragWidth)
Vue.directive('dialogDragHeight', dialogDragHeight)
Vue.directive("btnPermission", btnPermission);
}
if (window.Vue) {

View File

@ -0,0 +1,17 @@
import store from "@/store";
export default {
inserted(el, bindling) {
let perVal = bindling.value.btnID;
let routeId = bindling.value.routeId;
if (perVal && routeId) {
let perObj = store.getters.getButtonPre;
if (Object.keys(perObj).length) {
let hasPer = perObj[routeId] && perObj[routeId].includes(perVal);
if (!hasPer) {
el.parentNode.removeChild(el);
}
}
}
},
};

View File

@ -0,0 +1,11 @@
import btnPermission from "@/directive/permission/btnPermission";
const directives = {
btnPermission,
};
export default {
install(Vue) {
Object.keys(directives).forEach((key) => {
Vue.directive(key, directives[key]);
});
},
};

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,8 @@ export default {
.then(() => {
this.$store.dispatch("LogOut").then(() => {
Cookies.remove("automaticLogin");
this.$store.commit("REMOVE_ROUTER");
this.$store.dispatch("tagsView/delAllViews");
// 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

@ -5,7 +5,8 @@
settings.sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground,
}">
}"
>
<!-- <news-sider
v-if="!isConciseMode"
:collectionsData="collectionsData"
@ -16,25 +17,30 @@
ref="newsSiderRef"
/> -->
<news-sider-app :collectionsData="collectionsData" :sidebarRouters="sidebarRouters" @openChildren="openChildren"
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef" />
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef"
/>
<!-- @mouseleave="closeOpenWin" -->
</div>
<!-- v-if="childrenList.length > 0 && sidebar.childrenHide" -->
<div @mouseleave="closeOpenWin" class="sidebar_box"
:style="'width:' + childrenWidth + 'px;' + 'padding:' + childrenPadding">
:style="'width:' + childrenWidth + 'px;' + 'padding:' + childrenPadding"
>
<div flex="cross:center main:justify;" style="margin: 15px 0; justify-content: space-between; over-flow: auto">
<div flex="cross:center">
<p>{{ childrenList }}</p>
<el-autocomplete v-model="state" placeholder="请输入内容" :fetch-suggestions="querySearch"
:trigger-on-focus="false" @select="handleSelect" class="navbarSearch" suffix-icon="el-icon-search">
:trigger-on-focus="false" @select="handleSelect" class="navbarSearch"
suffix-icon="el-icon-search"
>
</el-autocomplete>
<i class="el-icon-close" style="font-size: 24px; cursor: pointer; margin-left: 15px" @click="closeOpenWin" />
<i class="el-icon-close" style="font-size: 24px; cursor: pointer; margin-left: 15px" @click="closeOpenWin"/>
</div>
</div>
<div flex="dir:top" flex-wrap style="height: calc(100% - 70px)">
<children-sider ref="childrenSider" v-for="(route, index) in menuList" :key="route.path + index" :item="route"
@refreshSider="refreshSider" @openChildren="openChildren" @clearActive="clearActive"
@closeOpenWin="closeOpenWin" :fatherPath="fatherPath" :lastPath="lastPath" style="width: 200px" />
@refreshSider="refreshSider" @openChildren="openChildren" @clearActive="clearActive"
@closeOpenWin="closeOpenWin" :fatherPath="fatherPath" :lastPath="lastPath" style="width: 200px"
/>
<!-- <children-app-sider
v-if="isConciseMode"
v-for="(route, index) in childrenList"
@ -52,440 +58,444 @@
</template>
<script>
import {
mapGetters,
mapState
} from "vuex";
import Logo from "./Logo";
import newsSider from "./newsSider";
import childrenSider from "./childrenSider";
import newsSiderApp from "./newsSiderApp";
import childrenAppSider from "./childrenAppSider";
import variables from "@/assets/styles/variables.scss";
import {
GetMyCollectionData
} from "@/api/apis/menuManage";
import router from "@/router";
import loginVue from "../../../views/login.vue";
import {
mapGetters,
mapState
} from 'vuex'
import Logo from './Logo'
import newsSider from './newsSider'
import childrenSider from './childrenSider'
import newsSiderApp from './newsSiderApp'
import childrenAppSider from './childrenAppSider'
import variables from '@/assets/styles/variables.scss'
import {
GetMyCollectionData
} from '@/api/apis/menuManage'
import router from '@/router'
import loginVue from '../../../views/login.vue'
export default {
components: {
Logo,
newsSider,
childrenSider,
newsSiderApp,
childrenAppSider,
export default {
components: {
Logo,
newsSider,
childrenSider,
newsSiderApp,
childrenAppSider
},
computed: {
...mapState(['settings', 'sidebar']),
...mapGetters(['sidebarRouters', 'sidebar']),
activeMenu() {
const route = this.$route
const {
meta,
path
} = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
let pathUrl = path + '?id=' + meta.id
return path
},
computed: {
...mapState(["settings", "sidebar"]),
...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() {
const route = this.$route;
const {
meta,
path
} = route;
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu;
showLogo() {
return this.$store.state.settings.sidebarLogo
},
conciseMenu() {
return true
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
},
defaultTheme() {
return this.$store.state.settings.theme
}
},
watch: {
defaultTheme: {
handler: function(val, oldVal) {
this.theme = val
this.changeBgColor(val)
},
immediate: true
},
conciseMenu: {
handler: function(val, oldVal) {
this.isConciseMode = val
// this.changeBgColor(val);
},
immediate: true
},
sidebar: {
handler: function(val, oldVal) {
if (val.opened) {
this.state = ''
}
let pathUrl = path + "?id=" + meta.id;
return path;
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
conciseMenu() {
return true;
},
variables() {
return variables;
},
isCollapse() {
return !this.sidebar.opened;
},
defaultTheme() {
return this.$store.state.settings.theme;
},
deep: true
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val;
this.changeBgColor(val);
},
immediate: true,
},
conciseMenu: {
handler: function (val, oldVal) {
this.isConciseMode = val;
// this.changeBgColor(val);
},
immediate: true,
},
sidebar: {
handler: function (val, oldVal) {
if (val.opened) {
this.state = "";
}
},
deep: true,
},
siderBoxHeight: {
immediate: true,
handler() {
this.handleResize();
},
},
siderBoxHeight: {
immediate: true,
handler() {
this.handleResize()
}
}
},
created() {
},
data() {
return {
childrenPadding: 0,
childrenWidth: 0,
childrenList: [],
state: '',
fatherPath: '',
routePath: '',
lastPath: '',
hoverType: false,
firstNum: true,
windowHeight: 0,
siderBoxHeight: null,
isSearch: false,
collectionsData: [], //
valForm: {},
isConciseMode: false,
siderSHowType: false,
menuList: []
// clientHeight: document.body.clientHeight
}
},
mounted() {
// this.GetMyCollectionData();
this.siderBoxHeight = this.$refs.siderBox.offsetHeight
},
methods: {
handleResize() {
// const siderBoxHeight = this.$refs.siderBox.offsetHeight;
this.windowHeight = this.siderBoxHeight - 110
},
created() {},
data() {
return {
childrenPadding: 0,
childrenWidth: 0,
childrenList: [],
state: "",
fatherPath: "",
routePath: "",
lastPath: "",
hoverType: false,
firstNum: true,
windowHeight: 0,
siderBoxHeight: null,
isSearch: false,
collectionsData: [], //
valForm: {},
isConciseMode: false,
siderSHowType: false,
menuList: [],
// clientHeight: document.body.clientHeight
};
clearActive() {
this.$refs.newsSiderRef.activeIndex = null
},
mounted() {
// this.GetMyCollectionData();
this.siderBoxHeight = this.$refs.siderBox.offsetHeight;
},
methods: {
handleResize() {
// const siderBoxHeight = this.$refs.siderBox.offsetHeight;
this.windowHeight = this.siderBoxHeight - 110;
},
clearActive() {
this.$refs.newsSiderRef.activeIndex = null;
},
getRoute() {
this.$store.dispatch("app/changeChildrenHide");
let path = this.$route.path;
this.routePath = "/" + path.split("/")[1];
this.fatherPath = this.routePath;
this.lastPath = path.split("/")[path.split("/").length - 1];
getRoute() {
this.$store.dispatch('app/changeChildrenHide')
let path = this.$route.path
this.routePath = '/' + path.split('/')[1]
this.fatherPath = this.routePath
this.lastPath = path.split('/')[path.split('/').length - 1]
this.sidebarRouters.forEach((el) => {
if (el.path.split("/")[1] == path.split("/")[1] && el.children) {
this.childrenList = el.children;
this.$emit(
"openChildren",
this.childrenList.length > 0 ? true : false
);
}
});
},
refreshSider() {
this.GetMyCollectionData(true);
},
changeBgColor(val) {
document
.getElementsByTagName("body")[0]
.style.setProperty("--bg-color", val);
},
hoverChilden() {
this.hoverType = true;
this.firstNum = false;
},
openChildren(val) {
this.valForm = val;
this.getRoute();
this.isSearch = false;
this.state = "";
if (val.id != "129") {
if (!val.children) {
this.childrenWidth = 0;
this.childrenPadding = 0;
this.childrenList = [];
} else {
const setCollect = (arr) => {
arr.forEach((el) => {
el.collect = false;
this.matchMyCollection(el);
if (el.children != null && el.children && el.children.length) {
setCollect(el.children);
}
});
};
setCollect(val.children);
this.childrenList = val.children;
this.fatherPath = val.path;
}
this.sidebarRouters.forEach((el) => {
if (el.path.split('/')[1] == path.split('/')[1] && el.children) {
this.childrenList = el.children
this.$emit(
'openChildren',
this.childrenList.length > 0 ? true : false
)
}
})
},
refreshSider() {
this.GetMyCollectionData(true)
},
changeBgColor(val) {
document
.getElementsByTagName('body')[0]
.style.setProperty('--bg-color', val)
},
hoverChilden() {
this.hoverType = true
this.firstNum = false
},
openChildren(val) {
this.valForm = val
this.getRoute()
this.isSearch = false
this.state = ''
if (val.id != '129') {
if (!val.children) {
this.childrenWidth = 0
this.childrenPadding = 0
this.childrenList = []
} else {
this.childrenList = val.children;
}
let menuList = [];
function changeMenuData(data, path) {
data.forEach((el) => {
let menuPath = path + "/" + el.path;
let level = el.children ? 2 : 3;
let arr = {
collect: el.collect,
meta: el.meta,
name: el.name,
path: menuPath,
hidden: el.hidden == "true" ? true : false || false,
level: level,
};
// if(!arr.hidden){
// }
menuList.push(arr);
if (el.children && el.children.length > 0) {
changeMenuData(el.children, menuPath);
}
});
}
changeMenuData(this.childrenList, this.fatherPath);
this.menuList = menuList;
this.changeWidth();
// let chilrenSum = 0
// let notChildrenSum = 0
// function getWidth(data) {
// data.forEach(el => {
// if (!el.children) {
// notChildrenSum = notChildrenSum + 1
// }
// if (el.children && el.children.length > 0) {
// // chilrenSum = chilrenSum + 1
// getWidth(el.children)
// }
// })
// }
// getWidth(this.childrenList)
// let childrenHight = notChildrenSum * 50 + chilrenSum * 34
// // let windowHight = this.$refs.siderBox.offsetHeight - 110
// // console.log(windowHight, "windowHight");
// if (this.childrenList.length > 0) {
// this.childrenWidth = (Math.floor(childrenHight / this.windowHeight) + 1) * 250
// // console.log(this.childrenWidth, "this.childrenWidth");
// this.childrenPadding = '0 20px 20px '
// } else {
// this.childrenWidth = 0
// this.childrenPadding = 0
// }
this.$store.dispatch("app/changeChildrenHide", true);
this.$emit("openChildren", this.childrenList.length > 0 ? true : false);
},
changeWidth() {
let secondNumber = 0;
let thirdNumber = 0;
this.menuList.forEach((el) => {
if (el.level == 2 && !el.hidden) {
secondNumber = secondNumber + 1;
} else if (el.level == 3 && !el.hidden) {
thirdNumber = thirdNumber + 1;
}
});
this.$nextTick(() => {
let childrenHight = thirdNumber * 50 + secondNumber * 35;
let windowHight = this.$refs.siderBox.offsetHeight - 51;
if (this.childrenList.length > 0) {
this.childrenPadding = "20px ";
windowHight = windowHight - 40;
this.childrenWidth =
(Math.floor(childrenHight / windowHight) + 1) * 320;
} else {
this.childrenWidth = 0;
this.childrenPadding = 0;
}
this.$emit("changeWidth", this.childrenWidth);
});
},
//
async GetMyCollectionData(collectType) {
let res = await GetMyCollectionData({});
if (res.code == 1) {
const putCollectData = (res) => {
res.forEach((el) => {
el.collect = true;
const setCollect = (arr) => {
arr.forEach((el) => {
el.collect = false
this.matchMyCollection(el)
if (el.children != null && el.children && el.children.length) {
putCollectData(el.children);
setCollect(el.children)
}
});
};
putCollectData(res.data);
this.collectionsData = res.data;
this.childrenList = [];
if (collectType) {
setTimeout(() => {
if (this.valForm.id != "129") {
this.openChildren(this.valForm);
} else {
this.openChildren(this.collectionsData[0]);
}
}, 1);
})
}
setCollect(val.children)
this.childrenList = val.children
this.fatherPath = val.path
}
},
//
matchMyCollection(item) {
const isCollectData = (res) => {
res.forEach((el) => {
if (el.id === item.id) {
item.collect = true;
}
if (el.children != null && el.children && el.children.length) {
isCollectData(el.children);
}
});
};
isCollectData(this.collectionsData);
},
//
closeOpenWin() {
if (this.isSearch != true) {
this.$refs.newsSiderRef.activeIndex = null;
this.childrenWidth = 0;
this.childrenPadding = 0;
this.$store.dispatch("app/changeChildrenHide", false);
}
},
routerClick() {
this.isSearch = false;
this.closeOpenWin();
},
createList(row) {
let children = [];
const parseList = (arr, centerPath) => {
arr.forEach((el) => {
let path;
if (!centerPath) {
path = this.fatherPath + "/" + el.path;
} else {
path = this.fatherPath + "/" + centerPath + "/" + el.path;
}
let arr = {
value: el.meta.title,
path: path,
};
children.push(arr);
if (el.children != null && el.children && el.children.length) {
parseList(el.children, el.path);
}
});
};
parseList(row);
return children;
},
getRestaurants(row) {
let children = [];
const restaurants = (arr, fatherPath) => {
arr.forEach((el) => {
let path = "";
el.fullpath = fatherPath ? fatherPath + "/" + el.path : el.path;
} else {
this.childrenList = val.children
}
let menuList = []
let arr = {
value: el.meta.title,
path: el.fullpath,
};
children.push(arr);
if (el.children != null && el.children && el.children.length) {
restaurants(el.children, el.fullpath);
}
});
};
restaurants(row);
return children;
},
querySearch(queryString, cb) {
this.isSearch = true;
var restaurants = this.getRestaurants(this.sidebarRouters);
var results = queryString ?
restaurants.filter(this.createFilter(queryString)) :
restaurants;
cb(results);
},
function changeMenuData(data, path) {
data.forEach((el) => {
let menuPath = path + '/' + el.path
let level = el.children ? 2 : 3
let arr = {
collect: el.collect,
meta: el.meta,
name: el.name,
path: menuPath,
hidden: el.hidden == 'true' ? true : false || false,
level: level
}
// if(!arr.hidden){
// }
menuList.push(arr)
if (el.children && el.children.length > 0) {
changeMenuData(el.children, menuPath)
}
})
}
createFilter(queryString) {
return (restaurant) => {
return restaurant.value.toLowerCase().indexOf(queryString) !== -1;
};
},
handleSelect(item) {
changeMenuData(this.childrenList, this.fatherPath)
this.menuList = menuList
this.changeWidth()
// let chilrenSum = 0
// let notChildrenSum = 0
let routeData = this.$router.resolve({
path: item.path,
});
window.open(routeData.href, "_self");
this.routerClick();
this.$refs.newsSiderRef.activeIndex = null;
this.childrenPadding = 0;
this.$store.dispatch("app/changeChildrenHide", false);
},
collectClick(item) {},
// function getWidth(data) {
// data.forEach(el => {
// if (!el.children) {
// notChildrenSum = notChildrenSum + 1
// }
// if (el.children && el.children.length > 0) {
// // chilrenSum = chilrenSum + 1
// getWidth(el.children)
// }
// })
// }
// getWidth(this.childrenList)
// let childrenHight = notChildrenSum * 50 + chilrenSum * 34
// // let windowHight = this.$refs.siderBox.offsetHeight - 110
// // console.log(windowHight, "windowHight");
// if (this.childrenList.length > 0) {
// this.childrenWidth = (Math.floor(childrenHight / this.windowHeight) + 1) * 250
// // console.log(this.childrenWidth, "this.childrenWidth");
// this.childrenPadding = '0 20px 20px '
// } else {
// this.childrenWidth = 0
// this.childrenPadding = 0
// }
this.$store.dispatch('app/changeChildrenHide', true)
this.$emit('openChildren', this.childrenList.length > 0 ? true : false)
},
};
changeWidth() {
let secondNumber = 0
let thirdNumber = 0
this.menuList.forEach((el) => {
if (el.level == 2 && !el.hidden) {
secondNumber = secondNumber + 1
} else if (el.level == 3 && !el.hidden) {
thirdNumber = thirdNumber + 1
}
})
this.$nextTick(() => {
let childrenHight = thirdNumber * 50 + secondNumber * 35
let windowHight = this.$refs.siderBox.offsetHeight - 51
if (this.childrenList.length > 0) {
this.childrenPadding = '20px '
windowHight = windowHight - 40
this.childrenWidth =
(Math.floor(childrenHight / windowHight) + 1) * 320
} else {
this.childrenWidth = 0
this.childrenPadding = 0
}
this.$emit('changeWidth', this.childrenWidth)
})
},
//
async GetMyCollectionData(collectType) {
let res = await GetMyCollectionData({})
if (res.code == 1) {
const putCollectData = (res) => {
res.forEach((el) => {
el.collect = true
if (el.children != null && el.children && el.children.length) {
putCollectData(el.children)
}
})
}
putCollectData(res.data)
this.collectionsData = res.data
this.childrenList = []
if (collectType) {
setTimeout(() => {
if (this.valForm.id != '129') {
this.openChildren(this.valForm)
} else {
this.openChildren(this.collectionsData[0])
}
}, 1)
}
}
},
//
matchMyCollection(item) {
const isCollectData = (res) => {
res.forEach((el) => {
if (el.id === item.id) {
item.collect = true
}
if (el.children != null && el.children && el.children.length) {
isCollectData(el.children)
}
})
}
isCollectData(this.collectionsData)
},
//
closeOpenWin() {
if (this.isSearch != true) {
this.$refs.newsSiderRef.activeIndex = null
this.childrenWidth = 0
this.childrenPadding = 0
this.$store.dispatch('app/changeChildrenHide', false)
}
},
routerClick() {
this.isSearch = false
this.closeOpenWin()
},
createList(row) {
let children = []
const parseList = (arr, centerPath) => {
arr.forEach((el) => {
let path
if (!centerPath) {
path = this.fatherPath + '/' + el.path
} else {
path = this.fatherPath + '/' + centerPath + '/' + el.path
}
let arr = {
value: el.meta.title,
path: path
}
children.push(arr)
if (el.children != null && el.children && el.children.length) {
parseList(el.children, el.path)
}
})
}
parseList(row)
return children
},
getRestaurants(row) {
let children = []
const restaurants = (arr, fatherPath) => {
console.log(arr, 'arr')
arr.forEach((el) => {
let path = ''
el.fullpath = fatherPath ? fatherPath + '/' + el.path : el.path
console.log(el, 'el')
let arr = {
value: el.meta ? el.meta.title : '',
path: el.fullpath
}
children.push(arr)
if (el.children != null && el.children && el.children.length) {
restaurants(el.children, el.fullpath)
}
})
}
restaurants(row)
return children
},
querySearch(queryString, cb) {
this.isSearch = true
var restaurants = this.getRestaurants(this.sidebarRouters)
var results = queryString ?
restaurants.filter(this.createFilter(queryString)) :
restaurants
console.log(results, 'results')
cb(results)
},
createFilter(queryString) {
return (restaurant) => {
return restaurant.value.toLowerCase().indexOf(queryString) !== -1
}
},
handleSelect(item) {
let routeData = this.$router.resolve({
path: item.path
})
window.open(routeData.href, '_self')
this.routerClick()
this.$refs.newsSiderRef.activeIndex = null
this.childrenPadding = 0
this.$store.dispatch('app/changeChildrenHide', false)
},
collectClick(item) {
}
}
}
</script>
<style lang="scss">
$activeColor: var(--bg-color, "#00aaff");
$activeColor: var(--bg-color, "#00aaff");
.el-tree-node__content:hover,
.el-upload-list__item:hover {
// color: white;
// background-color: $activeColor !important;
background-color: #ecf5ff !important;
.el-tree-node__content:hover,
.el-upload-list__item:hover {
// color: white;
// background-color: $activeColor !important;
background-color: #ecf5ff !important;
}
.el-tree-node:focus > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.el-tree-node.is-current > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.navbarSearch {
// width: 200px !important;
::v-deep .el-input--medium .el-input__inner {
border: 1px solid #bbbbbb;
border-radius: 15px;
background-color: transparent;
}
.el-tree-node:focus>.el-tree-node__content {
color: white;
background-color: $activeColor !important;
::v-deep .el-input__suffix {
color: #1890ff;
font-size: 24px;
}
}
.el-tree-node.is-current>.el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
::v-deep .sidebar-container {
z-index: 9000 !important;
}
.navbarSearch {
// width: 200px !important;
::v-deep .el-input--medium .el-input__inner {
border: 1px solid #bbbbbb;
border-radius: 15px;
background-color: transparent;
}
::v-deep .el-input__suffix {
color: #1890ff;
font-size: 24px;
}
}
::v-deep .sidebar-container {
z-index: 9000 !important;
}
.sidebar_box {
background-color: white;
height: 98%;
// padding: 26px 0;
// border-left: 4px solid #eef0f3;
// max-width: 500px;
// min-width: 800px;
// padding: 0 30px 20px 30px;
// width: calc(100% - 300px);
transition: width 0.3s;
}
.sidebar_box {
background-color: white;
height: 98%;
// padding: 26px 0;
// border-left: 4px solid #eef0f3;
// max-width: 500px;
// min-width: 800px;
// padding: 0 30px 20px 30px;
// width: calc(100% - 300px);
transition: width 0.3s;
}
</style>

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

@ -370,7 +370,7 @@ export default {
//width: 16px;
//height: 16px;
left: -14px;
top: -3px;
top: 0px;
position: absolute;
vertical-align: 2px;
border-radius: 50%;

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

@ -38,7 +38,11 @@ import nodeWrap from '@/components/nodeWrap'
import { delTreeChildren } from '@/utils/util'
Vue.use(nodeWrap)
Vue.component('NodeWrap', nodeWrap) // 初始化组件
// 柱状图、折线图组件
import BarChart from "@/components/Echarts/BarChart";
import BarChartBlack from "@/components/Echarts/BarChartBlack.vue";
Vue.component("BarChart", BarChart);
Vue.component("BarChartBlack", BarChartBlack);
import followWorkShow from '@/components/nodeWrapShow'
Vue.use(followWorkShow)
Vue.component('FollowWorkShow', followWorkShow) // 初始化组件
@ -62,6 +66,8 @@ Vue.directive('enterNumber', {
})
}
})
import Directives from "@/directive/permission/index";
Vue.use(Directives);
import { download } from '@/utils/request'
import { openLoading, closeLoading } from '@/utils/loading'

View File

@ -1,76 +1,130 @@
import router from "./router";
import store from "./store";
import { Message } from "element-ui";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import { getToken, getCompanyId } from "@/utils/auth";
import { isRelogin, getButtonLish } from "@/utils/request";
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken, getCompanyId } from '@/utils/auth'
import { isRelogin, getButtonLish } from '@/utils/request'
import { authApi } from '@/api/apis/auth'
import { getInfo } from '@/utils/auth'
NProgress.configure({
showSpinner: false,
});
showSpinner: false
})
const whiteList = [
"/login",
"/test",
"/auth-redirect",
"/bind",
"/contractAssistant",
"/register",
"/systemInit",
"/databaseLogin",
];
'/login',
'/test',
'/auth-redirect',
'/bind',
'/contractAssistant',
'/register',
'/systemInit',
'/databaseLogin',
'/apiLogs'
]
router.beforeEach((to, from, next) => {
NProgress.start();
NProgress.start()
if (getToken()) {
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/
if (to.path === "/login") {
if (to.path === '/login') {
next({
path: "/",
});
NProgress.done();
path: '/'
})
NProgress.done()
} else {
let routeList = localStorage.getItem("routeList")
? localStorage.getItem("routeList")
: null;
let routeList = localStorage.getItem('routeList')
? localStorage.getItem('routeList')
: null
// store.dispatch("GenerateRoutes").then((accessRoutes) => {
// next()
// })
if (store.getters.permission_routes.length == 0) {
store.dispatch("GenerateRoutes").then((accessRoutes) => {
store.dispatch('GenerateRoutes').then((accessRoutes) => {
// 根据roles权限生成可访问的路由表
// for (let i = 0, length = accessRoutes.length; i < length; i += 1) {
// const element = accessRoutes[i];
// // router.addRoutes(accessRoutes); // 动态添加可访问路由表
// }
router.addRoutes(accessRoutes); // 动态添加可访问路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
// router.addRoutes(accessRoutes) // 动态添加可访问路由表
localStorage.setItem("routeList", JSON.stringify(accessRoutes));
next({
...to,
replace: true,
}); // hack方法 确保addRoutes已完成
});
localStorage.setItem('routeList', JSON.stringify(accessRoutes))
//获取当前已获取的权限按钮
let perObj = store.getters.getButtonPre
//获取当前权限按钮
if (to.meta.id && !perObj[to.meta.id]) {
let userId = JSON.parse(getInfo()).id
authApi('sysButtonConfigService', '', 'getUserButton', '', {
menuId: to.meta.id,
userId: userId
}).then((res) => {
// 处理接口 格式为:{路由id:[按钮id,按钮id],....}
let tempObj = {}
let tempArr = []
res.attribute.forEach((item) => {
tempArr.push(item.nameEn)
})
tempObj.id = to.meta.id
tempObj.value = tempArr
store.commit('perButton/SET_BUTTONOBJ', tempObj)
next({
...to,
replace: true
})
})
} else {
next({
...to,
replace: true
})
}
// next({
// ...to,
// replace: true
// }) // hack方法 确保addRoutes已完成
})
} else {
next();
//获取当前已获取的权限按钮
let perObj = store.getters.getButtonPre
if (to.meta.id && !perObj[to.meta.id]) {
let userId = JSON.parse(getInfo()).id
authApi('sysButtonConfigService', '', 'getUserButton', '', {
menuId: to.meta.id,
userId: userId
}).then((res) => {
// 处理接口 格式为:{路由id:[按钮id,按钮id],....}
let tempObj = {}
let tempArr = []
res.attribute.forEach((item) => {
tempArr.push(item.nameEn)
})
tempObj.id = to.meta.id
tempObj.value = tempArr
store.commit('perButton/SET_BUTTONOBJ', tempObj)
next()
})
} else {
next()
}
}
}
} else {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next();
next()
} else {
next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
NProgress.done();
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
NProgress.done()
}
}
});
})
router.afterEach(() => {
NProgress.done();
});
NProgress.done()
})

File diff suppressed because it is too large Load Diff

View File

@ -36,5 +36,6 @@ const getters = {
copyerConfig: state => state.flowPath.copyerConfig,
conditionDrawer: state => state.flowPath.conditionDrawer,
conditionsConfig: state => state.flowPath.conditionsConfig,
getButtonPre: (state) => state.perButton.buttonObj,
}
export default getters

View File

@ -9,6 +9,7 @@ import settings from './modules/settings'
import getters from './getters'
import approval from './modules/approval'
import flowPath from "./modules/flowPath"
import perButton from "@/store/modules/perButton";
Vue.use(Vuex)
@ -21,7 +22,8 @@ const store = new Vuex.Store({
permission,
settings,
approval,
flowPath
flowPath,
perButton
},
getters
})

View File

@ -0,0 +1,23 @@
const state = {
buttonObj: {},
};
const mutations = {
//保存按钮
SET_BUTTONOBJ(state, data) {
if (!data.id) return;
state.buttonObj[data.id] = data.value;
},
//清空按钮
CLEAN_BUTTONOBJ(state, data) {
state.buttonObj = {};
},
};
const actions = {};
export default {
namespaced: true,
state,
mutations,
actions,
};

View File

@ -29,7 +29,6 @@ const permission = {
name: 'applicationEdit',
hidden: true,
meta: {
title: '应用编辑',
hidden: true
}
},
@ -39,7 +38,6 @@ const permission = {
name: 'exploit',
hidden: true,
meta: {
title: '开发管理',
hidden: true
}
},
@ -49,7 +47,6 @@ const permission = {
name: 'authority',
hidden: true,
meta: {
title: '权限管理',
hidden: true
}
@ -59,7 +56,6 @@ const permission = {
name: 'appApiAdmin',
component: () => import('@/views/applicationList/apiList/apiAdmin'),
meta: {
title: 'API管理',
hidden: true
}
},
@ -68,7 +64,14 @@ const permission = {
name: 'inserterAdmin',
component: () => import('@/views/applicationList/inserterAdmin'),
meta: {
title: '插件管理',
hidden: true
}
},
{
path: 'scriptAdmin',
name: 'scriptAdmin',
component: () => import('@/views/applicationList/scriptAdmin'),
meta: {
hidden: true
}
},
@ -79,7 +82,6 @@ const permission = {
hidden: 'true',
component: () => import('@/views/applicationList/apiList/apiAdd'),
meta: {
title: 'API新增'
}
},
@ -89,7 +91,6 @@ const permission = {
hidden: 'true',
component: () => import('@/views/applicationList/apiList/apiView'),
meta: {
title: 'API查看'
}
}
]
@ -106,17 +107,17 @@ const permission = {
name: 'masterDataEdit',
hidden: true,
meta: {
title: '基本信息',
title: '',
hidden: true
}
},
{
path: 'dataOrigin',
component: () => import('@/views/masterDataOptions/dataOrigin'),
name: 'dataOrigin',
name: 'masterDataEdit',
hidden: true,
meta: {
title: '数据源',
title: '',
hidden: true
}
},
@ -126,7 +127,7 @@ const permission = {
name: 'displayInfo',
hidden: true,
meta: {
title: '显示信息',
title: '',
hidden: true
}
@ -136,7 +137,7 @@ const permission = {
name: 'authorily',
component: () => import('@/views/masterDataOptions/authority'),
meta: {
title: '配置权限',
title: '',
hidden: true
}
},
@ -145,10 +146,19 @@ const permission = {
name: 'distribute',
component: () => import('@/views/masterDataOptions/distribute'),
meta: {
title: '分发设置',
title: '',
hidden: true
}
}
},
{
path: 'logsDeatil',
name: 'logsDeatil',
component: () => import('@/views/masterDataOptions/logsDeatil'),
meta: {
title: '',
hidden: true
}
},
]
}
})

View File

@ -64,7 +64,11 @@ const user = {
resolve();
})
.catch((error) => {
console.log(123)
//
commit("LogOut")
reject(error);
});
});
},
@ -98,6 +102,7 @@ const user = {
// 退出系统
LogOut({ commit, state }) {
console.log("触发推出")
return new Promise((resolve, reject) => {
commit("SET_TOKEN", "");
commit("SET_ROLES", []);

View File

@ -21,6 +21,9 @@ export function openLoading(loadingName) {
case 'del':
loadingText = '删除'
break;
case 'test':
loadingText = '校验数据'
break;
}
appLoading = Loading.service({
text: "正在" + loadingText + ",请稍候",
@ -36,4 +39,4 @@ export function closeLoading() {
if (appLoading) {
appLoading.close();
}
}
}

View File

@ -1,298 +1,321 @@
import axios from "axios";
import axios from 'axios'
import {
Notification,
MessageBox,
Message,
Loading
} from "element-ui";
import store from "@/store";
Notification,
MessageBox,
Message,
Loading
} from 'element-ui'
import store from '@/store'
import {
getToken,
setToken,
removeCompanyId,
removeToken,
removeInfo,
} from "@/utils/auth";
import errorCode from "@/utils/errorCode";
getToken,
setToken,
removeCompanyId,
removeToken,
removeInfo
} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import {
tansParams,
blobValidate
} from "@/utils/ruoyi";
tansParams,
blobValidate
} from '@/utils/ruoyi'
import { closeLoading, openLoading } from '@/utils/loading'
import cache from "@/plugins/cache";
import cache from '@/plugins/cache'
import {
saveAs
} from "file-saver";
import route from "../router/index";
saveAs
} from 'file-saver'
import route from '../router/index'
// import configKey from '@/assets/js/configKey.js'
let downloadLoadingInstance;
let downloadLoadingAxios;
let downloadLoadingInstance
let downloadLoadingAxios
// 是否显示重新登录
export let isRelogin = {
show: false,
};
let timer = null;
show: false
}
let timer = null
// 是否正在刷新的标记
let isRefreshing = false;
let isRefreshing = false
//重试队列
let requests = [];
let requests = []
// 在模块作用域定义一个全局标志变量
let isHandlingTokenInvalid = false
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: "http://192.168.2.240:8066/",
// 超时
timeout: 2 * 60 * 1000,
});
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: "http://192.168.2.240:8066/",
// 超时
timeout: 2 * 60 * 1000
})
// request拦截器
service.interceptors.request.use(
(config) => {
// do something bedocument.getElementById("")fore request is sent
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
(config) => {
// do something bedocument.getElementById("")fore request is sent
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
config.headers["secretkey"] = configKey.secretkey;
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
config.headers['secretkey'] = configKey.secretkey
// if (store.getters.token) {
// if (window.localStorage.userToken) {
let token = getToken();
if (token) {
config.headers["token"] = token;
}
// if (store.getters.token) {
// if (window.localStorage.userToken) {
let token = getToken()
if (token) {
config.headers['token'] = token
}
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
openLoading('submit')
} else if (config.url.indexOf('getById') != -1) {
openLoading('detail')
} else if (config.url.indexOf('deleteById') != -1) {
openLoading('del')
} else if (config.url.indexOf('changerState') != -1) {
openLoading('submit')
}
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
openLoading('submit')
} else if (config.url.indexOf('getById') != -1) {
openLoading('detail')
} else if (config.url.indexOf('deleteById') != -1) {
openLoading('del')
} else if (config.url.indexOf('changerState') != -1) {
openLoading('submit')
}
// 生成请求的唯一标识符
const requestIdentifier = `${config.url}-${config.method}`;
// 判断是否已存在相同的请求
const isDuplicateRequest = requests.includes(requestIdentifier);
// 如果存在相同请求,取消当前请求
if (isDuplicateRequest) {
// return Promise.reject(new Error("Duplicate request"));
}
// 将请求的唯一标识符添加到请求队列中
requests.push(requestIdentifier);
// 设置计时器,在秒后移除请求的唯一标识符
clearTimeout(timer);
timer = setTimeout(() => {
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 移除请求的唯一标识符
}
}, 2000);
return config;
},
// 生成请求的唯一标识符
const requestIdentifier = `${config.url}-${config.method}`
// 判断是否已存在相同的请求
const isDuplicateRequest = requests.includes(requestIdentifier)
// 如果存在相同请求,取消当前请求
if (isDuplicateRequest) {
// return Promise.reject(new Error("Duplicate request"));
}
// 将请求的唯一标识符添加到请求队列中
requests.push(requestIdentifier)
// 设置计时器,在秒后移除请求的唯一标识符
clearTimeout(timer)
timer = setTimeout(() => {
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 移除请求的唯一标识符
}
}, 2000)
return config
},
(error) => {
// do something with request error
// 请求发生错误时清除唯一标识符
const requestIdentifier = `${error.config.url}-${error.config.method}`;
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 清除唯一标识符
}
return Promise.reject(error);
}
);
(error) => {
// do something with request error
// 请求发生错误时清除唯一标识符
const requestIdentifier = `${error.config.url}-${error.config.method}`
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 清除唯一标识符
}
return Promise.reject(error)
}
)
// 响应拦截器
service.interceptors.response.use(
(res) => {
// 请求完成时清除唯一标识符
const requestIdentifier = `${res.config.url}-${res.config.method}`;
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 清除唯一标识符
}
// downloadLoadingAxios.close()
// 未设置状态码则默认成功状态
const code = res.data.status || '200';
// 获取错误信息
const msg = res.data.msg;
closeLoading();
// 二进制数据则直接返回
if (
res.request.responseType === "blob" ||
res.request.responseType === "arraybuffer"
) {
return res.data;
}
(res) => {
// 请求完成时清除唯一标识符
const requestIdentifier = `${res.config.url}-${res.config.method}`
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 清除唯一标识符
}
// downloadLoadingAxios.close()
// 未设置状态码则默认成功状态
const code = res.data.status || '200'
// 获取错误信息
const msg = res.data.msg
closeLoading()
// 二进制数据则直接返回
if (
res.request.responseType === 'blob' ||
res.request.responseType === 'arraybuffer'
) {
return res.data
}
if (code === '500') {
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => {
if (msg === 'token无效') {
store.dispatch('LogOut').then(() => {
route.replace({
path: "/login"
});;
})
}
if (code === '500') {
// 判断是否在处理 token 无效情况
if (msg === 'token无效' && isHandlingTokenInvalid) return
if (msg === 'token无效' && !isHandlingTokenInvalid) {
isHandlingTokenInvalid = true;
MessageBox.confirm('登录失效!请重新登录。', '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
});
// 重置标志变量
isHandlingTokenInvalid = false;
});
})
.catch(() => {
// 处理取消逻辑
isHandlingTokenInvalid = false;
});
} else {
// 其他错误处理
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
});
}
return Promise.reject(new Error(msg));
} else if (code == '1002') {
})
.catch(() => { });
return Promise.reject(new Error(msg));
} else if (code == '1002') {
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
})
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => {
store.dispatch('LogOut').then(() => {
route.replace({
path: "/login"
});;
})
})
.catch(() => { });
} else if (code !== '200') {
})
})
.catch(() => {
})
} else if (code !== '200') {
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => { })
.catch(() => { });
return Promise.reject("error");
} else {
return res.data;
}
},
(error) => {
let response = error.response;
closeLoading();
// downloadLoadingAxios.close()
// if (response.status == 401) {
// if (response.data.code == 1002) {
// if (!isRefreshing) {
// isRefreshing = true;
// setToken(response.data.data[0]);
// response.headers.token = response.data.data[0];
// // token 刷新后将数组的方法重新执行
// requests.forEach((cb) => cb(token));
// requests = []; // 重新请求完清空
// return service(response.config);
// isRefreshing = false;
// } else {
// // 返回未执行 resolve 的 Promise
// return new Promise((resolve) => {
// // 用函数形式将 resolve 存入,等待刷新后再执行
// requests.push((token) => {
// response.headers.token = `${token}`;
// resolve(service(response.config));
// });
// });
// }
// return response && response.data;
// } else {
// Message({
// message: response.data.message,
// type: "error",
// showClose: true,
// duration: 0,
// });
// if (response.data.code == -1) {} else {
// store.dispatch("LogOut").then(() => {
// route.replace({
// path: "/login",
// });
// });
// }
// }
// } else {
// let {
// message
// } = error;
// if (message == "Network Error") {
// message = "后端接口连接异常";
// } else if (message.includes("timeout")) {
// message = "系统接口请求超时";
// } else if (message.includes("Request failed with status code")) {
// message = "系统接口" + message.substr(message.length - 3) + "异常";
// }
// MessageBox.confirm(message, "系统提示", {
// confirmButtonText: "确定",
// showCancelButton: false,
// showClose: false,
// closeOnClickModal: false,
// closeOnPressEscape: false,
// type: "error",
// })
// .then(() => {})
// .catch(() => {});
// }
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
})
.catch(() => {
})
return Promise.reject('error')
} else {
return res.data
}
},
(error) => {
let response = error.response
closeLoading()
// downloadLoadingAxios.close()
// if (response.status == 401) {
// if (response.data.code == 1002) {
// if (!isRefreshing) {
// isRefreshing = true;
// setToken(response.data.data[0]);
// response.headers.token = response.data.data[0];
// // token 刷新后将数组的方法重新执行
// requests.forEach((cb) => cb(token));
// requests = []; // 重新请求完清空
// return service(response.config);
// isRefreshing = false;
// } else {
// // 返回未执行 resolve 的 Promise
// return new Promise((resolve) => {
// // 用函数形式将 resolve 存入,等待刷新后再执行
// requests.push((token) => {
// response.headers.token = `${token}`;
// resolve(service(response.config));
// });
// });
// }
// return response && response.data;
// } else {
// Message({
// message: response.data.message,
// type: "error",
// showClose: true,
// duration: 0,
// });
// if (response.data.code == -1) {} else {
// store.dispatch("LogOut").then(() => {
// route.replace({
// path: "/login",
// });
// });
// }
// }
// } else {
// let {
// message
// } = error;
// if (message == "Network Error") {
// message = "后端接口连接异常";
// } else if (message.includes("timeout")) {
// message = "系统接口请求超时";
// } else if (message.includes("Request failed with status code")) {
// message = "系统接口" + message.substr(message.length - 3) + "异常";
// }
// MessageBox.confirm(message, "系统提示", {
// confirmButtonText: "确定",
// showCancelButton: false,
// showClose: false,
// closeOnClickModal: false,
// closeOnPressEscape: false,
// type: "error",
// })
// .then(() => {})
// .catch(() => {});
// }
return Promise.reject(error);
}
);
return Promise.reject(error)
}
)
// 通用下载方法
export function download(url, params, filename, config) {
downloadLoadingInstance = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
return service
.post(url, params, {
transformRequest: [
(params) => {
return tansParams(params);
},
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
responseType: "blob",
...config,
})
.then(async (data) => {
const isLogin = await blobValidate(data);
if (isLogin) {
const blob = new Blob([data]);
saveAs(blob, filename);
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg =
errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
Message.error(errMsg);
}
downloadLoadingInstance.close();
})
.catch((r) => {
Message.error("下载文件出现错误,请联系管理员!");
downloadLoadingInstance.close();
});
downloadLoadingInstance = Loading.service({
text: '正在下载数据,请稍候',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
return service
.post(url, params, {
transformRequest: [
(params) => {
return tansParams(params)
}
],
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
responseType: 'blob',
...config
})
.then(async(data) => {
const isLogin = await blobValidate(data)
if (isLogin) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {
const resText = await data.text()
const rspObj = JSON.parse(resText)
const errMsg =
errorCode[rspObj.code] || rspObj.msg || errorCode['default']
Message.error(errMsg)
}
downloadLoadingInstance.close()
})
.catch((r) => {
Message.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close()
})
}
export default service;
export default service

View File

@ -5,7 +5,7 @@
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成前台任务'"
:title="dialogTitle + ' 接口管理'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
@ -162,8 +162,8 @@ export default {
if (type == 'add') {
this.dialogTitle = '新增'
this.dialogType = 'add'
this.$nextTick(()=>{
this.$set(this.$refs.basicsForm.ruleForm,'state','0')
this.$nextTick(() => {
this.$set(this.$refs.basicsForm.ruleForm, 'state', '0')
})
}
@ -220,7 +220,7 @@ export default {
return
} else {
let params = {
...this.$refs.basicsForm.ruleForm,
...this.$refs.basicsForm.ruleForm
}
if (this.dialogType == 'add') {
this.openLoading('submit')

View File

@ -0,0 +1,272 @@
/**
* @desc 消息管理日志
* @date 2023-08-31
*/
// 表头
const tableColumnData = [
{
label: '发送者应用',
prop: 'sendAppName',
tooltip: true,
},
{
label: '源数据',
prop: 'sourceData',
tooltip: true,
},
{
label: '目标数据',
prop: 'targetData',
tooltip: true,
},
{
label: '状态',
prop: 'status',
tooltip: true,
},
{
label: '错误状态',
prop: 'errorStatus',
tooltip: true,
},
{
label: '返回信息',
prop: 'returnData',
tooltip: true,
}, {
label: '创建时间',
prop: 'createTime',
tooltip: true,
},
{
label: '备注',
prop: 'remark',
tooltip: true,
},
]
const tableVersionColumn = [
{
label: '接收者名称',
prop: 'receiveName',
},
{
label: '接收者编码',
prop: 'receiveCode',
},
{
label: '接收者应用',
prop: 'receiveApp',
},
{
label: '接收者',
prop: 'receiveApi',
},
{
label: '数据类型',
prop: 'dataType',
},
{
label: '备注',
prop: 'remark',
},
]
// 基本信息内容
const formRow = [
{
elCol: [{
label: '消息管理名称',
prop: 'theme',
tag: 'elInput',
disabled: true,
span: 24
}]
},
{
elCol: [{
label: '发送者应用',
prop: 'sendApp',
tag: 'elSelect',
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
}, {
label: '发送者',
prop: 'sendApi',
tag: 'elSelect',
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'apiName',
}]
},
{
elCol: [{
label: '接收者应用',
prop: 'receiveApp',
tag: 'elSelect',
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
}, {
label: '接收者',
prop: 'receiveApi',
tag: 'elSelect',
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'apiName',
}]
},
{
elCol: [{
label: '源数据',
prop: 'sourceData',
tag: 'elSlot',
slotName: "sourceData",
span: 24,
}]
},
{
elCol: [{
label: '目标数据',
prop: 'targetData',
tag: 'elSlot',
slotName: "targetData",
span: 24,
}]
},
{
elCol: [{
label: '状态',
prop: 'status',
tag: 'elRadio',
disabled: true,
span: 24,
options: [
{value: "1", label: "待发送"},
{value: "2", label: "发送中"},
{value: "3", label: "发送成功"},
{value: "4", label: "发送失败"},
],
},]
},
{
elCol: [{
label: '错误状态',
prop: 'error_status',
tag: 'elRadio',
disabled: true,
span: 24,
options: [
{value: "1", label: "需要重新发送"},
{value: "2", label: "不需要重新发送"},
],
},]
},
{
elCol: [{
label: '返回信息',
prop: 'returnData',
tag: 'elInput',
type: 'textarea',
disabled: true,
span: 24,
}]
},
]
const basicsRules = {
sourceData: [{
required: true,
message: '请输入源数据',
trigger: 'blur'
}],
targetData: [{
required: true,
message: '请输入目标数据',
trigger: 'blur'
}],
}
// 查看
const formRowShow = [
{
elCol: [{
label: '发送者应用',
prop: 'sendApp',
tag: 'elSelect',
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
},]
},
{
elCol: [{
label: '源数据',
prop: 'sourceData',
tag: 'elInput',
disabled: true,
type: 'textarea',
span: 24,
}]
},
{
elCol: [{
label: '目标数据',
prop: 'targetData',
tag: 'elInput',
disabled: true,
type: 'textarea',
span: 24,
}]
},
{
elCol: [{
label: '状态',
prop: 'status',
tag: 'elRadio',
disabled: true,
span: 24,
options: [
{value: "1", label: "待发送"},
{value: "2", label: "发送中"},
{value: "3", label: "发送成功"},
{value: "4", label: "发送失败"},
],
},]
},
{
elCol: [{
label: '错误状态',
prop: 'errorStatus',
tag: 'elRadio',
disabled: true,
span: 24,
options: [
{value: "1", label: "需要重新发送"},
{value: "2", label: "不需要重新发送"},
],
},]
},
{
elCol: [{
label: '返回信息',
prop: 'returnData',
tag: 'elInput',
type: 'textarea',
disabled: true,
span: 24,
}]
},
]
export default {
tableColumnData,
formRow,
basicsRules,
formRowShow,
tableVersionColumn
}

339
src/views/apiLogs/index.vue Normal file
View File

@ -0,0 +1,339 @@
<template>
<div>
<base-layout
ref="baseLayout"
@onFuncBtn="onFuncBtn"
:querySwitch="true"
:searchList="requirementList"
@search="handleSearchEvent"
:isPage="true"
@pageChange="handlePageChange"
@onElSelect="onElSelect"
:bodyHight="''"
>
<div slot="main" slot-scope="{ tableHeight }">
<base-table
ref="baseTable"
:showIndex="true"
:funWidth="215"
:funData="funData"
@onFunc="onFunc"
:tabLoading.sync="tabLoading"
:tableHeight="'80vh'"
:tableData="tableData"
:tableColumn="tableColumnData"
>
<template v-slot:status="{ row }">
<div style="width: 100%">
<span v-if="row.status == '1'">待发送</span>
<span v-else-if="row.status == '2'">发送中</span>
<span v-else-if="row.status == '3'">发送成功</span>
<span v-else-if="row.status == '4'">发送失败</span>
<span v-else></span>
</div>
</template>
<template v-slot:errorStatus="{ row }">
<div style="width: 100%">
<span>{{
row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送"
}}</span>
</div>
</template>
</base-table>
</div>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
</div>
</template>
<script>
import baseLayout from "@/components/base/baseLayout";
import baseTable from "@/components/base/baseTable";
import rightDialog from "./rightDialog";
import configData from "./configData";
import {authApi} from "@/api/apis/auth";
import {getApiModuleApi} from "@/api/apiChunks/index.js";
export default {
components: {
baseLayout,
baseTable,
rightDialog,
},
props: {
receiveApi: {
type: String,
default: ""
}
},
data() {
return {
buttonList: [
{
menuName: "刷新",
icon: "el-icon-refresh",
btnFunction: "resetLoad",
},
], //
requirementList: [
{
placeholder: "发送者应用",
prop: "sendApp",
tag: "elSelect",
options: [],
optionValue: "id",
optionLabel: "name",
},
{
placeholder: "接受者应用",
prop: "receiveApp",
tag: "elSelect",
options: [],
optionValue: "id",
optionLabel: "name",
},
{
placeholder: "接受者api",
prop: "receiveApi",
tag: "elSelect",
options: [],
optionValue: "id",
optionLabel: "apiName",
},
{
placeholder: "开始日期",
prop: "createTimeStart",
tag: "elDatePicker",
},
{
placeholder: "结束日期",
prop: "createTimeEnd",
tag: "elDatePicker",
},
{
placeholder: "状态",
prop: "status",
tag: "elSelect",
options: [
{id: "3", label: "发送成功"},
{id: "4", label: "发送失败"},
],
error_status_dist: {
1: "需要重新发送",
2: "不需要重新发送",
},
optionValue: "id",
optionLabel: "label",
},
{
placeholder: "源数据",
prop: "sourceData",
tag: "elInput",
},
{
placeholder: "目标数据",
prop: "targetData",
tag: "elInput",
},
{
placeholder: "返回信息",
prop: "returnData",
tag: "elInput",
},
], //list
tabLoading: false,
tableColumnData: configData.tableColumnData, //
funData: [
{
color: "#6a9af1",
text: "查看",
},
],
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 100,
},
queryModel: {
theme: "",
sendApp: "",
sendApi: "",
receiveApp: "",
receiveApi: "",
status: "",
targetData: '',
sourceData: '',
returnData: ''
},
};
},
created() {
// this.GetMessageLogTableData();
this.initSelect()
},
methods: {
async onElSelect(event, index, indexItem, model, row) {
console.log(event, index, indexItem, model, row)
if (row.placeholder === '接受者应用') {
this.$set(this.queryModel, 'receiveApi', '')
this.$set(this.$refs.baseLayout.ruleForm, 'receiveApi', "")
if (event) {
const res = await authApi('sysApplicationService', 'application', 'thirdInterfacequeryAppApi', '', {
appId: event
})
if(res.status ==200){
this.requirementList[2].options = res.attribute
}
} else {
this.requirementList[2].options = []
}
}
},
//
async GetMessageLogTableData() {
this.tabLoading = true;
let param = {
...this.pageModel,
...this.queryModel,
};
let res = await authApi(
"sysApplicationService",
"application",
"thirdInterfacequeryAppApiLog",
"",
param
);
this.tabLoading = false;
console.log(res, 112312312)
if (res.status == "200") {
this.tableData = res.attribute.list;
this.$refs.baseLayout.setPageTotal(res.attribute.total);
}
},
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex;
this.pageModel.pageSize = val.pageSize;
this.GetMessageLogTableData();
},
//
onFuncBtn(btn) {
this[btn.btnFunction]();
},
//
onFunc(index, row) {
//
if (index == 0) {
this.openLoading("detail");
this.$refs.rightDialog.openDialog("show", row);
}
//
if (index == 1) {
this.openLoading("detail");
this.$refs.rightDialog.openDialog("edit", row);
}
//
if (index == 2) {
this.$confirm("确认重新发送吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("detail");
this.messageResendData(row.id);
})
.catch(() => {
this.$message({
type: "info",
message: "取消重新发送",
});
});
}
},
async messageResendData(id) {
let param = {
id: id,
};
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"resendData",
"",
param
);
if (res.status == "200") {
this.$vmNews("重新发送成功!", "success");
this.resetTable();
}
},
//
resetTable() {
this.pageModel.pageNum = 1;
this.$refs.baseLayout.pageClear();
this.GetMessageLogTableData();
},
//
handleSearchEvent(form) {
let data = this.$refs.baseLayout.ruleForm;
this.queryModel = {...data}
if (!data.sendApp) {
this.$vmNews("请选择发送者应用")
return
}
if (!data.receiveApp) {
this.$vmNews("请选择接受者应用")
return
}
if (!data.receiveApi) {
this.$vmNews("请选择接受者api")
return
}
if (!data.status) {
this.$vmNews("请选择状态")
return
}
this.resetTable();
},
async initSelect() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "thirdInterfacequeryApp"
}, {
"pageNum": 1,
"pageSize": 999
})
console.log(res, 'res')
this.requirementList[0].options = res.attribute.list
this.requirementList[1].options = res.attribute.list
},
// async onElSelect(val, b, c, d, row) {
// if (row.prop === 'sendApp') {
// this.requirementList[1].options = []
// this.$set(this.$refs.baseLayout.ruleForm, 'sendApi', "")
// const res = await getApiModuleApi({
// tl: "sysApplicationService",
// as: "application",
// dj: "queryAppApi",
// }, {
// "pageNum": 1,
// "pageSize": 999,
// appId: val
// })
// this.requirementList[1].options = res.attribute.list
// console.log(res)
// }
// }
},
};
</script>
<style scoped>
.clickTitle {
color: #409eff;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,282 @@
<template>
<div>
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
:size="'65%'"
@handleConfirmClick="handleConfirmClick"
>
<base-form
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
:rules="basicsRules"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
style="padding-bottom:20px;"
>
<div slot="sourceData" class="code-json-editor">
<vue-json-editor
class="editor"
v-model="sourceData"
:showBtns="false"
:mode="'code'"
@json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave"
@has-error="onSourceDataError"
/>
</div>
<div slot="targetData" class="code-json-editor">
<vue-json-editor
class="editor"
v-model="targetData"
:showBtns="false"
:mode="'code'"
@json-change="onTargetDataChange"
@json-save="onTargetDataSave"
@has-error="onTargetDataError"
/>
</div>
</base-form>
</base-right-dialog>
</div>
</template>
<script>
import vueJsonEditor from "vue-json-editor";
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import configData from "./configData";
import { authApi } from "@/api/apis/auth";
import {getApiModuleApi} from "@/api/apiChunks/index.js";
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
vueJsonEditor,
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
formRow: configData.formRow,
basicsRules: configData.basicsRules,
vLoading: false,
submitShow: true,
sourceData: {},
sourceDataFlag: true,
targetData: {},
targetDataFlag: true,
};
},
methods: {
openDialog(type, row) {
this.querysysAppService();
// this.querysysAppApiService();
this.formRow = configData.formRow;
this.submitShow = true;
//
if (type == "edit") {
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.messageLogGetById(row.id);
}
//
if (type == "show") {
this.submitShow = false;
this.formRow = configData.formRowShow;
this.dialogTitle = "查看";
this.dialogType = "show";
this.messageLogGetById(row.id);
}
this.dialogVisible = true;
},
//
async messageLogGetById(id) {
let params = {
id: id,
};
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"thirdInterfacequeryEntity",
"",
params
);
if (res.status == "200") {
this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute);
});
}
},
//
onSourceDataJsonChange(value) {
this.onSourceDataSave(value);
},
onSourceDataSave(value) {
this.sourceData = value;
this.sourceDataFlag = true;
},
onSourceDataError(value) {
this.sourceDataFlag = false;
},
checkSourceDataJson() {
if (this.sourceDataFlag === false) {
return false;
} else {
return true;
}
},
//
onTargetDataChange(value) {
this.onTargetDataSave(value);
},
onTargetDataSave(value) {
this.targetData = value;
this.targetDataFlag = true;
},
onTargetDataError(value) {
this.targetDataFlag = false;
},
checkTargetDataJson() {
if (this.targetDataFlag === false) {
return false;
} else {
return true;
}
},
//
handleDialogClose() {
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
},
//
handleConfirmClick() {
let checkSource = this.checkSourceDataJson();
if (!checkSource) {
this.$vmNews("源数据格式应为JSON格式", "warning");
return;
}
let checkTarget = this.checkTargetDataJson();
if (!checkTarget) {
this.$vmNews("目标数据格式应为JSON格式", "warning");
return;
}
let params = {
...this.$refs.basicsForm.ruleForm,
sourceData: this.sourceData,
targetData: this.targetData,
};
if (this.dialogType == "edit") {
this.openLoading("submit");
this.messageLogUpdateDto(params);
}
},
//
async messageLogUpdateDto(params) {
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"updateEntity",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
}
},
//
async querysysAppService() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "thirdInterfacequeryApp"
}, {
"pageNum": 1,
"pageSize": 999
})
this.formRow[0].elCol[0].options = res.attribute.list
// if (res.status == "200") {
// this.formRow[1].elCol[0].options = res.attribute.list;
// this.formRow[2].elCol[0].options = res.attribute.list;
// }
},
//
async querysysAppApiService() {
let params = {
pageSize: 9999,
pageNum: 1,
};
let res = await authApi(
"appApiService",
"appApi",
"queryPage",
"",
params
);
if (res.status == "200") {
// this.formRow[1].elCol[1].options = res.attribute.list;
// this.formRow[2].elCol[1].options = res.attribute.list;
}
},
},
};
</script>
<style lang="less" scoped>
.code-json-editor {
/* jsoneditor右上角默认有一个链接,加css去掉 */
/deep/ .jsoneditor-poweredBy {
display: none !important;
}
/deep/ .ace-jsoneditor {
height: 150px !important;
}
}
</style>
<style scoped lang="scss">
::v-deep textarea.el-textarea__inner {
min-height: 150px !important;
}
.dialogList {
padding: 16px 0;
border-top: 1px solid #dcdfe6;
display: flex;
flex-direction: column;
}
.updateBtn {
border: 1px solid #ebedf1;
padding: 5px 0;
border-radius: 3px;
text-align: center;
font-size: 14px;
cursor: pointer;
width: 100px;
}
.updateBtn:hover {
color: #1890ff;
border-color: #badeff;
background-color: #e8f4ff;
}
::v-deep .el-table__body-wrapper.is-scrolling-none {
height: auto !important;
}
::v-deep .app-container {
height: auto !important;
}
</style>

View File

@ -99,7 +99,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
code: "",
@ -225,4 +225,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -107,7 +107,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
code: "",
@ -244,4 +244,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

File diff suppressed because it is too large Load Diff

View File

@ -239,6 +239,7 @@
v-model="logDialog"
@confirm="logConfirm"
:width="'80%'"
:footerShow="false"
>
<div>
<logTableChunk v-if="logDialog" :receiveApi="receiveApi"></logTableChunk>
@ -686,7 +687,8 @@ export default {
}
// json
let bodyIn = JSON.parse(res.attribute.api.bodyIn)
let bodyFlag = bodyIn[0].parameterType !== "complex"
console.log(bodyIn, 'bodyIn')
let bodyFlag = bodyIn[0] && bodyIn[0].parameterType !== "complex"
let queryObj = {};
let headerObj = {};
let bodyObj
@ -704,6 +706,7 @@ export default {
bodyObj[item.interfaceKey] = item.interfaceValue === null ? "" : item.interfaceValue;
}
})
console.log(1,res.attribute.api)
//
if (res.attribute.api.needLogin == 1) {
this.getDebugInfoHandle(
@ -731,7 +734,7 @@ export default {
this.$set(json, "query", {});
}
if (
JSON.parse(res.attribute.api.bodyIn)
JSON.parse(res.attribute.api.bodyIn).length
) {
if (!bodyFlag) {
this.DebugDataHandle(bodyObj, bodyIn[0].children)
@ -986,7 +989,7 @@ export default {
computed: {
//
funWidth() {
return this.mainFunData.length * 70;
return this.mainFunData.length * 90;
},
},
components: {
@ -1023,7 +1026,7 @@ export default {
<style scoped lang='scss'>
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
.apiWrap {

View File

@ -250,6 +250,7 @@ export default {
},
authDataHandle(obj, arr) {
arr.forEach((item) => {
console.log(item, 'item')
if (item.parameterType === "authport") {
obj[item.parameterName] = this.authDataReturn(item.example);
}
@ -297,12 +298,16 @@ export default {
//
async init() {
//url
console.log(1)
this.getApiModuleApiHanlde(0, false, this.stepOneForm.destinationAddress)
console.log(222)
if (this.stepZeroForm.needLogin === '1') {
this.getApiModuleApiHanlde(this.stepZeroForm.authenticationPort, true)
console.log(333)
}
},
async getApiModuleApiHanlde(id, flag, address = {}) {
console.log(11123)
const res = await getApiModuleApi(
{
tl: "sysApplicationService",
@ -311,12 +316,15 @@ export default {
},
{id: id, appId: this.$route.query.id}
);
console.log(77)
let tempUrl = res.attribute.app.interfaceAddress ? res.attribute.app.interfaceAddress : ""
if (flag) {
console.log(tempUrl, 'tempUrl')
this.authMethod = res.attribute.api.requestMethod == 1 ? 'post' : 'get';
this.authInterfaceAddress = tempUrl + res.attribute.api.destinationAddress;
let bodyIn = JSON.parse(res.attribute.api.bodyIn)
let bodyFlag = bodyIn[0].parameterType !== "complex"
console.log(bodyIn, '1')
let bodyFlag = bodyIn[0] && bodyIn[0].parameterType !== "complex"
let headerObj = {}
let bodyObj
let queryObj = {}
@ -343,7 +351,8 @@ export default {
this.$set(this.authInfo, 'query', deepClone(queryObj))
this.$set(this.authInfo, 'body', deepClone(bodyObj))
} else {
let bodyFlag = this.bodyEntTableInfo[0].parameterType !== "complex"
console.log(88, this.bodyEntTableInfo)
let bodyFlag = this.bodyEntTableInfo.length && this.bodyEntTableInfo[0].parameterType !== "complex"
let headerObj = {}
let bodyObj
let queryObj = {}
@ -362,19 +371,26 @@ export default {
this.interfaceAddress = tempUrl + address;
this.headerDisposeHandle(headerObj, this.headersTableInfo)
this.queryDisposeHandle(queryObj, this.queryTableInfo)
if (!bodyFlag) {
this.bodyDisposeHandle(bodyObj, this.bodyEntTableInfo[0].children)
if (this.bodyEntTableInfo.length) {
if (!bodyFlag) {
this.bodyDisposeHandle(bodyObj, this.bodyEntTableInfo[0].children)
} else {
this.bodyDisposeHandle(bodyObj[0], this.bodyEntTableInfo[0].children)
}
} else {
this.bodyDisposeHandle(bodyObj[0], this.bodyEntTableInfo[0].children)
bodyObj = {}
}
this.$set(this.resultInfo, 'headers', deepClone(headerObj))
this.$set(this.resultInfo, 'query', deepClone(queryObj))
this.$set(this.resultInfo, 'body', deepClone(bodyObj))
console.log(33)
}
},
headerDisposeHandle(header, arr) {
arr.forEach(item => {
console.log(item, 'item3')
if (item.parameterType === "authport") {
header[item.parameterName] = "";
} else {
@ -441,11 +457,13 @@ export default {
// });
// },
jsonParseHandle(parameterType, example, concreteType = false) {
console.log(parameterType, 'parameterType1')
let parameterTypeDist = {
authport: "",
fundamentallist: [example],
}[parameterType]
return parameterTypeDist || (()=>{
return parameterTypeDist || (() => {
if (concreteType === "Number" && this.isNumberOrFloat(example)) return example * 1;
if (example === "false" || example === "true") return JSON.parse(example)
return example
@ -458,6 +476,7 @@ export default {
},
bodyDisposeHandle(obj, arr) {
arr.forEach((item) => {
console.log(item, 'item2')
const {parameterName, concreteType, parameterType, example, children} = item;
if (parameterName && concreteType) {
if (!["Object", "ObjectCom", "Map"].includes(concreteType)) {

View File

@ -124,11 +124,11 @@ export default {
},
methods: {
onSubmitHandle(){
}
},
};
</script>
<style>
</style>
</style>

View File

@ -7,63 +7,70 @@ const tableColumnData = [
{
label: '发送者应用',
prop: 'sendAppName',
tooltip: true,
tooltip: true
},
{
label: '源数据',
prop: 'sourceData',
tooltip: true,
tooltip: true
},
{
label: '目标数据',
prop: 'targetData',
tooltip: true,
tooltip: true
},
{
label: '状态',
prop: 'status',
tooltip: true,
tooltip: true
},
{
label: '错误状态',
prop: 'errorStatus',
tooltip: true,
tooltip: true
},
{
label: '返回信息',
prop: 'returnData',
tooltip: true,
}, {
label: '创建时间',
prop: 'createTime',
tooltip: true,
},
]
const tableVersionColumn = [
{
label: '接收者名称',
prop: 'receiveName',
},
{
label: '接收者编码',
prop: 'receiveCode',
},
{
label: '接收者应用',
prop: 'receiveApp',
},
{
label: '接收者',
prop: 'receiveApi',
},
{
label: '数据类型',
prop: 'dataType',
tooltip: true
},
{
label: '备注',
prop: 'remark',
tooltip: true
},
{
label: '创建时间',
prop: 'createTime',
tooltip: true
},
]
const tableVersionColumn = [
{
label: '接收者名称',
prop: 'receiveName'
},
{
label: '接收者编码',
prop: 'receiveCode'
},
{
label: '接收者应用',
prop: 'receiveApp'
},
{
label: '接收者',
prop: 'receiveApi'
},
{
label: '数据类型',
prop: 'dataType'
},
{
label: '备注',
prop: 'remark'
}
]
// 基本信息内容
@ -85,7 +92,7 @@ const formRow = [
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
optionLabel: 'name'
}, {
label: '发送者',
prop: 'sendApi',
@ -93,7 +100,7 @@ const formRow = [
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'apiName',
optionLabel: 'apiName'
}]
},
{
@ -104,7 +111,7 @@ const formRow = [
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
optionLabel: 'name'
}, {
label: '接收者',
prop: 'receiveApi',
@ -112,7 +119,7 @@ const formRow = [
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'apiName',
optionLabel: 'apiName'
}]
},
{
@ -120,8 +127,8 @@ const formRow = [
label: '源数据',
prop: 'sourceData',
tag: 'elSlot',
slotName: "sourceData",
span: 24,
slotName: 'sourceData',
span: 24
}]
},
{
@ -129,8 +136,8 @@ const formRow = [
label: '目标数据',
prop: 'targetData',
tag: 'elSlot',
slotName: "targetData",
span: 24,
slotName: 'targetData',
span: 24
}]
},
{
@ -141,12 +148,12 @@ const formRow = [
disabled: true,
span: 24,
options: [
{value: "1", label: "待发送"},
{value: "2", label: "发送中"},
{value: "3", label: "发送成功"},
{value: "4", label: "发送失败"},
],
},]
{ value: '1', label: '待发送' },
{ value: '2', label: '发送中' },
{ value: '3', label: '发送成功' },
{ value: '4', label: '发送失败' }
]
}]
},
{
elCol: [{
@ -156,10 +163,10 @@ const formRow = [
disabled: true,
span: 24,
options: [
{value: "1", label: "需要重新发送"},
{value: "2", label: "不需要重新发送"},
],
},]
{ value: '1', label: '需要重新发送' },
{ value: '2', label: '不需要重新发送' }
]
}]
},
{
elCol: [{
@ -168,9 +175,9 @@ const formRow = [
tag: 'elInput',
type: 'textarea',
disabled: true,
span: 24,
span: 24
}]
},
}
]
const basicsRules = {
@ -183,7 +190,7 @@ const basicsRules = {
required: true,
message: '请输入目标数据',
trigger: 'blur'
}],
}]
}
// 查看
@ -196,8 +203,8 @@ const formRowShow = [
disabled: true,
options: [],
optionValue: 'id',
optionLabel: 'name',
},]
optionLabel: 'name'
}]
},
{
elCol: [{
@ -206,7 +213,7 @@ const formRowShow = [
tag: 'elInput',
disabled: true,
type: 'textarea',
span: 24,
span: 24
}]
},
{
@ -216,7 +223,7 @@ const formRowShow = [
tag: 'elInput',
disabled: true,
type: 'textarea',
span: 24,
span: 24
}]
},
{
@ -227,12 +234,12 @@ const formRowShow = [
disabled: true,
span: 24,
options: [
{value: "1", label: "待发送"},
{value: "2", label: "发送中"},
{value: "3", label: "发送成功"},
{value: "4", label: "发送失败"},
],
},]
{ value: '1', label: '待发送' },
{ value: '2', label: '发送中' },
{ value: '3', label: '发送成功' },
{ value: '4', label: '发送失败' }
]
}]
},
{
elCol: [{
@ -242,10 +249,10 @@ const formRowShow = [
disabled: true,
span: 24,
options: [
{value: "1", label: "需要重新发送"},
{value: "2", label: "不需要重新发送"},
],
},]
{ value: '1', label: '需要重新发送' },
{ value: '2', label: '不需要重新发送' }
]
}]
},
{
elCol: [{
@ -254,9 +261,9 @@ const formRowShow = [
tag: 'elInput',
type: 'textarea',
disabled: true,
span: 24,
span: 24
}]
},
}
]
export default {
tableColumnData,

View File

@ -1,26 +1,29 @@
<template>
<div>
<base-layout
ref="baseLayout"
@onFuncBtn="onFuncBtn"
:querySwitch="true"
:searchList="requirementList"
@search="handleSearchEvent"
:isPage="true"
@pageChange="handlePageChange"
:bodyHight="''"
ref="baseLayout"
:showTitle="false"
:searchShow="false"
@onFuncBtn="onFuncBtn"
:querySwitch="true"
:searchList="requirementList"
@search="handleSearchEvent"
:isPage="true"
@pageChange="handlePageChange"
@onElSelect="onElSelect"
:bodyHight="''"
>
<div slot="main" slot-scope="{ tableHeight }">
<base-table
ref="baseTable"
:showIndex="true"
:funWidth="215"
:funData="funData"
@onFunc="onFunc"
:tabLoading.sync="tabLoading"
:tableHeight="'50vh'"
:tableData="tableData"
:tableColumn="tableColumnData"
ref="baseTable"
:showIndex="true"
:funWidth="215"
:funData="funData"
@onFunc="onFunc"
:tabLoading.sync="tabLoading"
:tableHeight="'40vh'"
:tableData="tableData"
:tableColumn="tableColumnData"
>
<template v-slot:status="{ row }">
<div style="width: 100%">
@ -35,7 +38,7 @@
<div style="width: 100%">
<span>{{
row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送"
}}</span>
}}</span>
</div>
</template>
</base-table>
@ -83,13 +86,21 @@ export default {
optionValue: "id",
optionLabel: "name",
},
{
placeholder: "开始日期",
prop: "createTimeStart",
tag: "elDatePicker",
},
{
placeholder: "结束日期",
prop: "createTimeEnd",
tag: "elDatePicker",
},
{
placeholder: "状态",
prop: "status",
tag: "elSelect",
options: [
{id: "1", label: "待发送"},
{id: "2", label: "发送中"},
{id: "3", label: "发送成功"},
{id: "4", label: "发送失败"},
],
@ -100,6 +111,21 @@ export default {
optionValue: "id",
optionLabel: "label",
},
{
placeholder: "源数据",
prop: "sourceData",
tag: "elInput",
},
{
placeholder: "目标数据",
prop: "targetData",
tag: "elInput",
},
{
placeholder: "返回信息",
prop: "returnData",
tag: "elInput",
},
], //list
tabLoading: false,
tableColumnData: configData.tableColumnData, //
@ -112,7 +138,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
theme: "",
@ -121,29 +147,48 @@ export default {
receiveApp: "",
receiveApi: "",
status: "",
targetData: '',
sourceData: '',
returnData: ''
},
};
},
created() {
this.GetMessageLogTableData();
// this.GetMessageLogTableData();
this.initSelect()
},
methods: {
async onElSelect(event, index, indexItem, model, row) {
console.log(event, index, indexItem, model, row)
if (row.placeholder === '接受者应用') {
this.$set(this.queryModel, 'receiveApi', '')
this.$set(this.$refs.baseLayout.ruleForm, 'receiveApi', "")
if (event) {
const res = await authApi('sysApplicationService', 'application', 'thirdInterfacequeryAppApi', '', {
appId: event
})
if (res.status == 200) {
this.requirementList[2].options = res.attribute
}
} else {
this.requirementList[2].options = []
}
}
},
//
async GetMessageLogTableData() {
this.tabLoading = true;
let param = {
...this.pageModel,
...this.queryModel,
receiveApp: this.$route.query.id,
receiveApi: this.receiveApi
};
let res = await authApi(
"sysApplicationService",
"application",
"queryAppApiLog",
"",
param
"sysApplicationService",
"application",
"thirdInterfacequeryAppApiLog",
"",
param
);
this.tabLoading = false;
console.log(res, 112312312)
@ -181,16 +226,16 @@ export default {
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("detail");
this.messageResendData(row.id);
})
.catch(() => {
this.$message({
type: "info",
message: "取消重新发送",
.then(() => {
this.openLoading("detail");
this.messageResendData(row.id);
})
.catch(() => {
this.$message({
type: "info",
message: "取消重新发送",
});
});
});
}
},
async messageResendData(id) {
@ -198,11 +243,11 @@ export default {
id: id,
};
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"resendData",
"",
param
"sysMessageManageLogService",
"messageManage",
"resendData",
"",
param
);
if (res.status == "200") {
this.$vmNews("重新发送成功!", "success");
@ -218,24 +263,40 @@ export default {
//
handleSearchEvent(form) {
let data = this.$refs.baseLayout.ruleForm;
this.queryModel.theme = data.theme;
this.queryModel.sendApp = data.sendApp;
this.queryModel.sendApi = data.sendApi;
this.queryModel.receiveApp = data.receiveApp;
this.queryModel.receiveApi = data.receiveApi;
this.queryModel.status = data.status;
data.receiveApp = this.$route.query.id;
data.receiveApi = this.receiveApi;
this.queryModel = {...data}
// if (!data.sendApp) {
// this.$vmNews("")
// return
// }
// if (!data.receiveApp) {
// this.$vmNews("")
// return
// }
// if (!data.receiveApi) {
// this.$vmNews("api")
// return
// }
if (!data.status) {
this.$vmNews("请选择状态")
return
}
this.resetTable();
},
async initSelect() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "queryApp"
dj: "thirdInterfacequeryApp"
}, {
"pageNum": 1,
"pageSize": 999
})
console.log(res, 'res')
this.requirementList[0].options = res.attribute.list
this.requirementList[1].options = res.attribute.list
},
// async onElSelect(val, b, c, d, row) {
// if (row.prop === 'sendApp') {
@ -258,9 +319,12 @@ export default {
};
</script>
<style scoped>
<style scoped lang="scss">
.clickTitle {
color: #409eff;
cursor: pointer;
}
::v-deep .el-dialog__body{
padding: 0px !important;
}
</style>

View File

@ -1,46 +1,46 @@
<template>
<div>
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
:size="'65%'"
@handleConfirmClick="handleConfirmClick"
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
:size="'65%'"
@handleConfirmClick="handleConfirmClick"
>
<base-form
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
:rules="basicsRules"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
style="padding-bottom:20px;"
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
:rules="basicsRules"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
style="padding-bottom:20px;"
>
<div slot="sourceData" class="code-json-editor">
<vue-json-editor
class="editor"
v-model="sourceData"
:showBtns="false"
:mode="'code'"
@json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave"
@has-error="onSourceDataError"
class="editor"
v-model="sourceData"
:showBtns="false"
:mode="'code'"
@json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave"
@has-error="onSourceDataError"
/>
</div>
<div slot="targetData" class="code-json-editor">
<vue-json-editor
class="editor"
v-model="targetData"
:showBtns="false"
:mode="'code'"
@json-change="onTargetDataChange"
@json-save="onTargetDataSave"
@has-error="onTargetDataError"
class="editor"
v-model="targetData"
:showBtns="false"
:mode="'code'"
@json-change="onTargetDataChange"
@json-save="onTargetDataSave"
@has-error="onTargetDataError"
/>
</div>
</base-form>
@ -81,7 +81,7 @@ export default {
methods: {
openDialog(type, row) {
this.querysysAppService();
this.querysysAppApiService();
// this.querysysAppApiService();
this.formRow = configData.formRow;
this.submitShow = true;
//
@ -106,11 +106,11 @@ export default {
id: id,
};
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"queryEntity",
"",
params
"sysMessageManageLogService",
"messageManage",
"thirdInterfacequeryEntity",
"",
params
);
if (res.status == "200") {
this.$nextTick(() => {
@ -184,11 +184,11 @@ export default {
//
async messageLogUpdateDto(params) {
let res = await authApi(
"sysMessageManageLogService",
"messageManage",
"updateEntity",
"",
params
"sysMessageManageLogService",
"messageManage",
"updateEntity",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
@ -201,7 +201,7 @@ export default {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "queryApp"
dj: "thirdInterfacequeryApp"
}, {
"pageNum": 1,
"pageSize": 999
@ -219,11 +219,11 @@ export default {
pageNum: 1,
};
let res = await authApi(
"appApiService",
"appApi",
"queryPage",
"",
params
"appApiService",
"appApi",
"queryPage",
"",
params
);
if (res.status == "200") {
// this.formRow[1].elCol[1].options = res.attribute.list;
@ -247,7 +247,7 @@ export default {
</style>
<style scoped lang="scss">
::v-deep textarea.el-textarea__inner {
min-height: 150px !important;
min-height: 150px !important;
}
.dialogList {
padding: 16px 0;

View File

@ -5,19 +5,25 @@
<div class="chunk">
<el-button icon="el-icon-back" @click="
$router.replace({ path: '/applicationList/applicationListAdmin' })
">返回</el-button>
"
>返回
</el-button>
</div>
<div class="chunk">
<el-button icon="el-icon-first-aid-kit" type="primary" @click="saveHandle">保存</el-button>
</div>
</div>
<div class="main" >
<div class="main">
<div class="upload">
<div class="title">应用信息</div>
<div class="uploadMain">
<div class="left">
<div class="title">应用logo</div>
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload" list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess" :show-file-list="false">
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload"
list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess"
:show-file-list="false"
>
<div class="line">
<div class="left">
<img v-if="imgUrl" :src="imgUrl" class="avatar" @error="handleImageError">
@ -40,40 +46,44 @@
</el-upload>
</div>
<div class="right">
<el-switch active-value="1" inactive-value="2" v-model="appStatus" active-text="启用" active-color="#60c958" :disabled="lookFlag">
<el-switch active-value="1" inactive-value="2" v-model="appStatus" active-text="启用" active-color="#60c958"
:disabled="lookFlag"
>
</el-switch>
</div>
</div>
</div>
<div class="form">
<baseNewForm ref="mainForm" :spanNumber="24" :isFunBtn="false" :lookFlag="lookFlag" :formRule="!lookFlag" :formRow="formRow" :ruleForm="ruleForm" @onSubmit="onSubmit"></baseNewForm>
<baseNewForm ref="mainForm" :spanNumber="24" :isFunBtn="false" :lookFlag="lookFlag" :formRule="!lookFlag"
:formRow="formRow" :ruleForm="ruleForm" @onSubmit="onSubmit"
></baseNewForm>
</div>
</div>
</div>
</template>
<script>
import { getApiModuleApi } from "@/api/apiChunks/index.js";
import { uploadLogo } from "@/api/apis/logo.js";
import configData from "./configData";
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
import request from "@/utils/request";
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import { uploadLogo } from '@/api/apis/logo.js'
import configData from './configData'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import request from '@/utils/request'
export default {
data() {
return {
fileList: [],
iconBase64: "",
imgUrl: "",
iconBase64: '',
imgUrl: '',
loading: false,
appLogo: "",
appLogo: '',
appStatus: 1,
ruleForm: {
accessMode: [],
accessMode: []
},
lookFlag: false,
formRow: configData.addForm,
};
formRow: configData.addForm
}
},
methods: {
handleImageError(row) {
@ -89,13 +99,23 @@ export default {
handlePreview(file) {
},
async handleAvatarSuccess(res, file) {
this.$refs.upload.clearFiles();//
console.log(res, file, '123')
file.raw.type
if (
file.raw.type.split('/')[1] != 'jpeg' &&
file.raw.type.split('/')[1] != 'png'
) {
return false
} else if (file.size >= 2000000) {
return false
}
this.$refs.upload.clearFiles()//
this.imgUrl = URL.createObjectURL(file.raw);
let formData = new FormData();
formData.append("file", file.raw);
formData.append("fileFlag", true);
formData.append("businessType", "application");
this.imgUrl = URL.createObjectURL(file.raw)
let formData = new FormData()
formData.append('file', file.raw)
formData.append('fileFlag', true)
formData.append('businessType', 'application')
// console.log(formData);
// const el = await uploadLogo(formData)
// if (el.status === '200') {
@ -103,36 +123,37 @@ export default {
// this.appLogo = el.id
// }
return request({
url: "/kangarooDataCenterV3/entranceController/fileUpload",
method: "post",
data: formData,
url: '/kangarooDataCenterV3/entranceController/fileUpload',
method: 'post',
data: formData
}).then((res) => {
if (res.status === '200') {
this.$vmNews("上传成功", "success")
this.$vmNews('上传成功', 'success')
this.appLogo = res.attribute.id
}
return true
// this.loading = false
})
},
}
,
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",
message: "只能上传jpg/png文件",
});
return
type: 'warning',
message: '只能上传jpg/png文件'
})
return false
} else {
if (file.size >= 2000000) {
this.$message({
type: "warning",
message: "文件大小不超过2MB",
});
return
type: 'warning',
message: '文件大小不超过2MB'
})
return false
}
// let reader = new FileReader();
// let that = this;
@ -144,58 +165,61 @@ export default {
// reader.readAsDataURL(file);
// return false;
}
},
}
,
//
saveHandle() {
this.$refs.mainForm.submitForm();
this.$refs.mainForm.submitForm()
},
}
,
//
async onSubmit() {
if (this.$route.query.flag === "add") {
if (this.$route.query.flag === 'add') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "saveApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'saveApp'
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("保存成功", "success")
this.$vmNews('保存成功', 'success')
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
}
} else if (this.$route.query.flag === "copy") {
} else if (this.$route.query.flag === 'copy') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "copyApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'copyApp'
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("复制成功", "success")
this.$vmNews('复制成功', 'success')
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
}
} else if (this.$route.query.flag === "setting") {
} else if (this.$route.query.flag === 'setting') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "updateApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'updateApp'
}, { updateType: 1, ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("保存成功", "success")
this.$vmNews('保存成功', 'success')
this.initEditFormData()
this.getLogoUrl()
this.$emit("saveSuccess")
this.$emit('saveSuccess')
}
}
},
}
,
//
async initSelectOptions() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
tab_name: 'sys_product',
column_name: 'classify'
}
const res = await getApiModuleApi({
tl: "generalServiceImpl",
as: "dictionaryshop",
dj: "selectDictionaryshop"
tl: 'generalServiceImpl',
as: 'dictionaryshop',
dj: 'selectDictionaryshop'
}, params)
this.formRow[3].elCol[0].options = []
res.attribute.forEach((item) => {
@ -204,107 +228,121 @@ export default {
id: item.column_value
})
})
},
}
,
// -
async initCopyFormData() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getCopyApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'getCopyApp'
}, { id: this.$route.query.id })
this.ruleForm = res.attribute
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
this.appStatus = res.attribute.appStatus
},
}
,
async initEditFormData() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'getApp'
}, { id: this.$route.query.id })
this.ruleForm = res.attribute
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
this.appStatus = res.attribute.appStatus
},
}
,
//logo
getLogoUrl() {
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
return request({
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
method: "get",
url: '/kangarooDataCenterV3/entranceController/fileDownloadNew?id=' + id,
method: 'get',
responseType: 'arraybuffer'
}).then((res) => {
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), ''))
})
}
},
components: {
baseNewForm,
baseNewForm
},
created() {
// options
this.initSelectOptions()
//
if (this.$route.query.flag === "setting") {
this.formRow[0].elCol[0].disabled = false;
if (this.$route.query.flag === 'setting') {
this.formRow[0].elCol[0].disabled = false
} else {
this.formRow[0].elCol[0].disabled = false;
this.formRow[0].elCol[0].disabled = false
}
if (this.$route.query.flag === "copy") {
if (this.$route.query.flag === 'copy') {
this.initCopyFormData()
this.getLogoUrl()
} else if (this.$route.query.flag === "setting") {
} else if (this.$route.query.flag === 'setting') {
this.initEditFormData()
this.getLogoUrl()
}
},
};
}
}
</script>
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
}
.wrap {
background-color: #fbfbfb;
width: 100%;
overflow: auto;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
margin-top: 10px;
> .upload {
background-color: #fff;
border-radius: 16px;
padding: 24px 30px;
> .title {
font-size: 18px;
font-weight: 600;
}
> .uploadMain {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
> .left {
> .title {
font-size: 18px;
color: #999999;
margin-bottom: 10px;
}
.line {
display: flex;
align-items: center;
.left {
border: 1px dashed #999999;
width: 64px;
@ -312,11 +350,13 @@ export default {
display: flex;
justify-content: center;
align-items: center;
> img {
width: 100%;
// height: 100%;
}
}
.right {
margin-left: 15px;
}
@ -324,6 +364,7 @@ export default {
}
}
}
> .form {
overflow: auto;
margin-top: 10px;

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

@ -74,6 +74,33 @@ const addForm = [
},
],
},
{
elCol: [
{
type: "select",
title: "系统类型",
id: "appType",
row: 24,
disabled: false,
required: true,
options: [
{
id: "1",
label: "致远OA",
},
{
id: "2",
label: "用友U8C",
},
{
id: "3",
label: "用友BIP",
},
],
fontSize: 16,
},
],
},
{
elCol: [
{
@ -178,6 +205,11 @@ const settingMenu = [
icon: "appMenu06",
path: 'inserterAdmin'
},
{
title: "脚本管理",
icon: "appMenu07",
path: 'scriptAdmin'
},
]
const configData = {
addForm,

View File

@ -2,230 +2,270 @@ const exploitSettingFormRow = [
{
elCol: [
{
type: "select",
title: "接入方式",
id: "accessMode",
type: 'select',
title: '接入方式',
id: 'accessMode',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
id: "1",
label: "接口",
id: '1',
label: '接口'
},
{
id: "2",
label: "H5",
id: '2',
label: 'H5'
},
{
id: "3",
label: "PC网页",
id: '3',
label: 'PC网页'
},
{
id: "4",
label: "PC应用程序",
},
id: '4',
label: 'PC应用程序'
}
],
multiple: true,
},
],
multiple: true
}
]
},
{
elCol: [
{
type: "input",
title: "应用客户端地址pc)",
id: "clientPath",
type: 'input',
title: '应用客户端地址pc)',
id: 'clientPath',
row: 24,
disabled: false,
required: false,
fontSize: 16
},
],
}
]
},
{
elCol: [
{
type: "input",
title: "应用网页端地址pc)",
id: "webPath",
type: 'input',
title: '应用网页端地址pc)',
id: 'webPath',
row: 24,
disabled: false,
required: false,
fontSize: 16
},
],
}
]
},
{
elCol: [
{
type: "input",
title: "应用程序地址(移动端)",
id: "programPath",
type: 'input',
title: '应用程序地址(移动端)',
id: 'programPath',
row: 24,
disabled: false,
required: false,
fontSize: 16
},
],
}
]
},
{
elCol: [
{
type: "input",
title: "ip白名单",
id: "systemAddress",
type: 'input',
title: 'ip白名单',
id: 'systemAddress',
row: 24,
disabled: false,
fontSize: 16,
placeholder:"请输入ip白名单并以,分割"
},
],
placeholder: '请输入ip白名单并以,分割'
}
]
},
{
elCol: [
{
type: "input",
title: "应用Key",
id: "publicKey",
type: 'input',
title: '应用Key',
id: 'publicKey',
row: 24,
disabled: true,
required: false,
fontSize: 16,
double: true
},
],
}
]
},
{
elCol: [
{
type: "input",
title: "应用密钥",
id: "secretKey",
type: 'input',
title: '应用密钥',
id: 'secretKey',
row: 24,
disabled: true,
fontSize: 16,
double: true
},
],
}
]
},
{
elCol: [
{
type: "input",
title: "appId ",
id: "appId",
type: 'input',
title: 'appId ',
id: 'appId',
row: 24,
disabled: true,
fontSize: 16,
double: true,
required: false,
},
],
},
required: false
}
]
}
]
const apiEnvFormRow = [
{
elCol: [
{
type: "input",
title: "接口地址",
id: "interfaceAddress",
type: 'input',
title: '接口地址',
id: 'interfaceAddress',
row: 24,
disabled: false,
required: false,
fontSize: 16
},
],
},
}
]
}
]
const tableColumn = [
{
id: 'interfaceKey',
title: "Key"
title: 'Key'
},
{
id: 'interfaceValue',
title: "Value"
title: 'Value'
},
{
id: 'interfaceType',
title: "位置"
},
title: '位置'
}
]
const dataSettingFormRow = [
{
elCol: [
{
type: "select",
title: "数据源类型",
id: "sourceType",
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
id: "1",
label: "oracle "
},
{
id: "2",
label: "sqlServer"
},
{
id: "3",
label: "mysql"
},
],
},
],
elCol: [{
title: '数据源编码',
id: 'sourceCode',
type: 'input',
row: 24,
disabled: false,
required: true,
fontSize: 16
}]
},
{
elCol: [
{
type: "input",
title: "实例地址",
id: "sourceUrl",
row: 24,
disabled: false,
required: true,
fontSize: 16
},
],
elCol: [{
title: '数据源名称',
id: 'sourceName',
type: 'input',
row: 24,
disabled: false,
required: true,
fontSize: 16
}]
},
{
elCol: [
{
type: "input",
title: "账户",
id: "loginName",
row: 8,
disabled: false,
required: true,
fontSize: 16
},
{
type: "input",
title: "密码",
id: "password",
row: 8,
disabled: false,
required: true,
fontSize: 16
},
{
type: "input",
title: "库名",
id: "dbName",
row: 8,
disabled: false,
required: true,
fontSize: 16
},
],
elCol: [{
title: 'ip',
id: 'sourceIp',
type: 'input',
changeRemind: true,
row: 12,
required: true,
fontSize: 16
}, {
title: '端口',
id: 'sourcePort',
type: 'input',
changeRemind: true,
row: 12,
required: true,
fontSize: 16
}]
},
{
elCol: [{
title: '数据库名称',
id: 'dbName',
type: 'input',
changeRemind: true,
row: 12,
required: true,
fontSize: 16
}, {
title: '数据源类型',
id: 'sourceType',
type: 'select',
changeRemind: true,
row: 12,
required: true,
fontSize: 16,
options: [
{
id: '1',
label: 'oracle'
},
{
id: '2',
label: 'sqlsever'
},
{
id: '3',
label: 'mysql'
},
{
id: '4',
label: 'dm'
}
]
}]
},
{
elCol: [{
title: '登录名',
id: 'loginName',
type: 'input',
changeRemind: true,
row: 12,
required: true,
fontSize: 16
}, {
title: '密码',
id: 'password',
type: 'password',
tag:"elInput",
changeRemind: true,
row: 12,
required: true,
fontSize: 16
}]
},
{
elCol: [{
title: '服务名称',
id: 'serviceName',
type: 'input',
show: false,
changeRemind: true,
row: 12,
required: true,
fontSize: 16
},]
}
]
const config = {
exploitSettingFormRow,

View File

@ -111,7 +111,7 @@
@click="testHandle"
:type="testResult ? 'success' : 'primary'"
style="margin-right: 10px"
>{{ testResult ? "测试通过" : "点击测试" }}
>{{ testResult ? '测试通过' : '点击测试' }}
<i v-if="testResult" class="el-icon-check el-icon--right"></i>
</el-button>
<el-switch
@ -128,7 +128,7 @@
<div class="form">
<baseNewForm
ref="dataSettingForm"
:spanNumber="24"
:spanNumber="12"
:isFunBtn="false"
:lookFlag="lookFlag"
:formRule="!lookFlag"
@ -137,6 +137,7 @@
@onSubmit="dataSettingOnSubmit"
@onSelect="dataSettingFormChange"
@onInput="dataSettingFormChange"
@changeRemind="dataSettingFormChange"
></baseNewForm>
</div>
</div>
@ -145,10 +146,10 @@
</template>
<script>
import BaseTable from "@/views/intergrationTask/compoments/baseTable.vue";
import configData from "./configData";
import {getApiModuleApi} from "@/api/apiChunks/index.js";
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import configData from './configData'
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
export default {
data() {
@ -158,7 +159,7 @@ export default {
// list
fileList: [],
// base
iconBase64: "",
iconBase64: '',
//
lookFlag: false,
//
@ -168,14 +169,14 @@ export default {
},
//
apiEnvFormRow: configData.apiEnvFormRow,
apiEnvRuleForm: {interfaceAddress: ""},
apiEnvRuleForm: { interfaceAddress: '' },
tableData: [],
tableColumn: configData.tableColumn,
funData: [
{
text: "删除",
color: "#e47470",
},
text: '删除',
color: '#e47470'
}
],
apiEnvOpen: 2,
//
@ -183,13 +184,13 @@ export default {
dataSettingRuleForm: {},
locationOptions: [
{
value: "1",
label: "Header",
value: '1',
label: 'Header'
},
{
value: "2",
label: "Body",
},
value: '2',
label: 'Body'
}
],
testResult: false,
// loading
@ -197,58 +198,66 @@ export default {
//
interfaceStatus: 2,
//
dbStatus: 2,
};
dbStatus: 2
}
},
methods: {
//
dblclick(val) {
navigator.clipboard.writeText(val)
this.$vmNews("内容已复制到剪贴板", 'success')
this.$vmNews('内容已复制到剪贴板', 'success')
},
//
dataSettingFormChange() {
this.testResult = false;
this.dbStatus = 2;
dataSettingFormChange(val, index, indexRow, row = {}) {
this.testResult = false
this.dbStatus = 2
if (row.id === 'sourceType') {
if (val == 1) {
this.dataSettingFormRow[5].elCol[0].show = true
} else {
this.dataSettingFormRow[5].elCol[0].show = false
}
}
},
//
switchCLick() {
if (!this.testResult) {
this.$vmNews("请测试通过后再开启", "warning");
this.$vmNews('请测试通过后再开启', 'warning')
}
},
//
tableButtonHandle(index, row) {
this.tableData.splice(index.index, 1);
this.tableData.splice(index.index, 1)
},
//
newRow() {
this.tableData.push({interfaceType: "1"});
this.tableData.push({ interfaceType: '1' })
},
//
testHandle() {
this.$refs.dataSettingForm.submitForm();
this.$refs.dataSettingForm.submitForm()
},
//
saveHandle() {
let pattern = /^http(s)?:\/\/?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/
if (this.apiEnvRuleForm.interfaceAddress && !pattern.test(this.apiEnvRuleForm.interfaceAddress)) {
this.$vmNews("接口地址不合法,请重新输入!", "warning")
this.$vmNews('接口地址不合法,请重新输入!', 'warning')
return
}
if (this.interfaceStatus != 2) {
if (!this.apiEnvRuleForm.interfaceAddress) {
this.$vmNews("接口环境开启时,接口地址不能为空!", "warning");
return;
this.$vmNews('接口环境开启时,接口地址不能为空!', 'warning')
return
}
let flag = this.tableData.some((item, index) => {
if (item.interfaceKey == "" || !item.interfaceKey) {
if (item.interfaceKey == '' || !item.interfaceKey) {
this.$vmNews(`接口环境开启时,接口环境第${index + 1}行Key不能为空!`)
return true
} else if (item.interfaceValue == "" || !item.interfaceValue) {
} else if (item.interfaceValue == '' || !item.interfaceValue) {
this.$vmNews(`接口环境开启时,接口环境第${index + 1}行Value不能为空!`)
return true
} else if (item.interfaceType == "" || !item.interfaceType) {
} else if (item.interfaceType == '' || !item.interfaceType) {
this.$vmNews(`接口环境开启时,接口环境第${index + 1}行位置不能为空!`)
return true
} else {
@ -259,26 +268,28 @@ export default {
return
}
}
this.$refs.exploitSettingForm.submitForm();
this.$refs.exploitSettingForm.submitForm()
},
async dataSettingOnSubmit() {
this.testLoading = true;
this.testLoading = true
//
// this.testResult = true;
try {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "testDatabase"
}, {...this.dataSettingRuleForm})
if (res.status === '200' && res.flag) {
this.testResult = true;
this.$vmNews("测试通过开关已开启", "success")
tl: 'sysApplicationService',
as: 'application',
dj: 'testDatabase'
}, { ...this.dataSettingRuleForm })
if (res.status === '200' && res.attribute) {
this.testResult = true
this.$vmNews('测试通过开关已开启', 'success')
} else {
this.$vmNews(res.msg)
}
} catch (err) {
this.testResult = false
}
this.testLoading = false;
this.testLoading = false
},
//
async exploitSettingOnSubmit() {
@ -305,31 +316,32 @@ export default {
...this.apiEnvRuleForm,
apiParas: this.tableData,
databaseEntity: {
...this.dataSettingRuleForm,
...this.dataSettingRuleForm
}
}
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "updateApp"
}, {...obj})
tl: 'sysApplicationService',
as: 'application',
dj: 'updateApp'
}, { ...obj })
if (res.status === '200') {
this.$vmNews("保存成功", "success")
this.$vmNews('保存成功', 'success')
this.initDataInfo()
}
},
async initDataInfo() {
const res = await getApiModuleApi({
tl: 'sysApplicationService',
as: "application",
dj: "queryAppAll"
}, {id: this.$route.query.id})
as: 'application',
dj: 'queryAppAll'
}, { id: this.$route.query.id })
if (res.status === '200') {
if (res.attribute.databaseEntity) {
this.dataSettingRuleForm = res.attribute.databaseEntity;
this.dataSettingRuleForm = res.attribute.databaseEntity
console.log(this.dataSettingRuleForm, 'this.dataSettingRuleForm')
console.log('数据源设置id:' + res.attribute.databaseEntity.id)
}
this.tableData = res.attribute.apiParas;
this.tableData = res.attribute.apiParas
this.apiEnvRuleForm.interfaceAddress = res.attribute.app.interfaceAddress
this.dbStatus = res.attribute.app.dbStatus
if (this.dbStatus == 1) {
@ -344,18 +356,18 @@ export default {
publicKey: res.attribute.app.publicKey,
secretKey: res.attribute.app.secretKey,
appId: res.attribute.app.appId,
systemAddress: res.attribute.app.systemAddress,
systemAddress: res.attribute.app.systemAddress
}
}
}
},
components: {
baseNewForm,
BaseTable,
BaseTable
},
created() {
this.initDataInfo()
this.$emit("flashActive", 1)
this.$emit('flashActive', 1)
// if (this.$route.query.id) {
// this.lookFlag = true;
// } else {
@ -370,13 +382,13 @@ export default {
// this.dbStatus = 2;
// },
// },
},
};
}
}
</script>
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
border-radius: 4px;
}
::v-deep .el-form-item {

View File

@ -16,7 +16,7 @@
</el-select>
</div>
<div class="chunk">
<el-input placeholder="应用名称、厂商" v-model="searchForm.nameOrManufacturer" @keyup.enter.native="submitsearchForm">
<el-input placeholder="应用名称、厂商" v-model="searchForm.nameOrManufacturer" @input="submitsearchForm">
<i slot="suffix" class="el-input__icon el-icon-search" @click="submitsearchForm"></i>
</el-input>
</div>
@ -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>
@ -251,7 +236,7 @@ export default {
computed: {
//
funWidth() {
return this.funData.length * 70;
return this.funData.length * 100;
},
},
components: {
@ -322,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%;
@ -345,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;
}
}
}
@ -365,7 +353,8 @@ export default {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
justify-content: flex-start;
span {
margin-top: 5px;
@ -373,6 +362,8 @@ export default {
padding: 2px 10px;
margin-left: 8px;
color: #fff;
border-radius: 8px;
font-size: 16px;
}
.state1 {

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

@ -0,0 +1,140 @@
const formRow = [
{
elCol: [
{
type: 'input',
title: '脚本名称',
id: 'scriptName',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'input',
title: '脚本编号',
id: 'scriptCode',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'input',
title: '脚本版本',
id: 'scriptVersion',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'datepick',
title: '发布日期',
id: 'releaseDate',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'textrea',
title: '脚本内容',
id: 'scriptData',
row: 24,
disabled: false,
required: true,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'textrea',
title: '描述',
id: 'scriptRemark',
row: 24,
disabled: false,
required: false,
fontSize: 16
}
]
},
{
elCol: [
{
type: 'radio',
title: '是否启用',
id: 'scriptStatus',
row: 24,
disabled: false,
required: true,
fontSize: 16,
options: [
{
label: '启用',
id: '1'
},
{
label: '停用',
id: '2'
}
]
}
]
}
]
const tableColumn = [
{
id: 'pluginName',
title: '插件名称'
},
{
id: 'pluginCode',
title: '插件编号'
},
{
id: 'pluginVersion',
title: '插件版本'
},
{
id: 'pluginRemark',
title: '描述',
tooltip: true,
width: 150
},
{
id: 'releaseDate',
title: '发布日期',
tooltip: true,
width: 150
},
{
id: 'modify_time',
title: '更新日期',
tooltip: true
}
]
const configData = {
formRow,
tableColumn
}
export default configData

View File

@ -0,0 +1,337 @@
<template>
<div class="monitoring">
<header>
<div class="left">
<el-input
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="
$router.replace({ path: '/applicationList/applicationListAdmin' })
"
>返回
</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="inserterAdd"
>添加脚本
</el-button
>
</div>
</header>
<main>
<BaseTable
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 ? '启用' : '停用' }}
</template>
<!-- 启用/停用-->
<template #scriptStatus="{row}">
<el-switch
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"
></basePage>
</div>
</main>
<footer></footer>
<baseDialog
: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"
></baseNewForm>
</div>
</baseDialog>
</div>
</template>
<script>
import { deepClone } from '@/utils/index.js'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import configData from './configData.js'
import dayjs from 'dayjs'
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import { authApi } from '@/api/apis/auth'
export default {
data() {
return {
ruleForm: { pluginStatus: '1' },
formRow: configData.formRow,
lookFlag: false,
plugInDialog: false,
refreshLoading: false,
searchForm: {
name: ''
},
mainTabLoading: false,
funData: [
{
type: 'view',
text: '更新',
color: '#5a9cf8'
},
{
type: 'dele',
text: '删除',
color: '#e47470'
}
],
tableColumn: [
{
id: 'scriptName',
title: '脚本名称',
tooltip: true
},
{
id: 'scriptCode',
title: '脚本编号',
tooltip: true
},
{
id: 'scriptVersion',
title: '脚本版本',
tooltip: true
},
{
id: 'scriptRemark',
title: '描述',
tooltip: true
},
{
id: 'releaseDate',
title: '发布日期',
tooltip: true
},
{
id: 'scriptStatus',
title: '启用状态',
tooltip: true
}
],
tableData: [],
pageModel: {
pageIndex: 1,
total: 10,
limit: 10
},
editFlag: false
}
},
methods: {
//
async swithChangeHandle(val, row) {
const res = await authApi('sysApplicationService', '', 'enableOrDisableAppScript', '', {
id: row.id,
scriptStatus: row.scriptStatus
})
this.$vmNews(res.msg, 'success')
console.log(res, 'res')
this.initMainTableData(this.searchForm)
},
searchBtnHandle() {
this.initMainTableData(this.searchForm)
},
async onSubmit() {
if (!this.ruleForm.id) {
const res = await getApiModuleApi({
tl: 'sysApplicationService',
as: '',
dj: 'saveAppScript'
}, { appId: this.$route.query.id, ...this.ruleForm })
if (res.status === '200') {
this.$vmNews('提交成功', 'success')
this.plugInDialog = false
this.ruleForm = {}
this.initMainTableData()
}
} else {
const res = await getApiModuleApi({
tl: 'sysApplicationService',
as: '',
dj: 'updateAppScript'
}, { appId: this.$route.query.id, ...this.ruleForm })
if (res.status === '200') {
this.$vmNews('提交成功', 'success')
this.plugInDialog = false
this.ruleForm = {}
this.initMainTableData()
}
}
},
plugInConfirm() {
this.$refs.dataSettingForm.submitForm()
},
//
inserterAdd() {
this.plugInDialog = true
this.ruleForm = {}
// this.$router.push({ path: "/inserterAdmin/inserterAdd" });
},
//
getTimeHandler(time) {
var days = parseInt(time / (1000 * 60 * 60 * 24))
var hours = parseInt((time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
var minutes = parseInt((time % (1000 * 60 * 60)) / (1000 * 60))
var seconds = (time % (1000 * 60)) / 1000
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒'
},
//
async initMainTableData(obj = {}) {
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
}
)
this.refreshLoading = false
if (res.status == 200) {
this.tableData = res.attribute.list
this.pageModel.total = res.attribute.total
}
},
//
submitsearchForm() {
this.initMainTableData(this.searchForm)
},
//
tableButtonHandle(val, item) {
if (item.type === 'view') {
this.ruleForm = deepClone(val)
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(() => {
})
}
},
//
currentChangeHandle(pageModel) {
this.pageModel = pageModel
this.$nextTick(() => {
this.initMainTableData(this.searchForm)
})
}
},
computed: {
//
funWidth() {
return this.funData.length * 70
}
},
components: {
BaseTable,
basePage,
baseDialog,
baseNewForm
},
created() {
this.initMainTableData()
this.$emit('flashActive', 6)
}
}
</script>
<style scoped lang="scss">
.monitoring {
position: relative;
width: 100%;
background-color: #fafafa;
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background-color: #fff;
border-radius: 20px;
.left {
width: 20vw;
align-items: center;
display: flex;
.search {
margin-left: 30px;
display: flex;
> .chunk {
margin-left: 10px;
}
}
}
}
main {
margin-top: 10px;
padding: 20px 20px 5px;
border-radius: 20px;
background-color: #fff;
}
footer {
margin-top: 20px;
}
}
</style>

View File

@ -0,0 +1,206 @@
<template>
<div class="wrap">
<div class="btn">
<div class="chunk">
<el-button icon="el-icon-close" @click="$router.back()">取消</el-button>
</div>
<div class="chunk">
<el-button
icon="el-icon-first-aid-kit
"
type="primary"
>保存</el-button
>
</div>
</div>
<div class="main">
<div class="upload">
<div class="title">插件信息</div>
<div class="uploadMain">
<div class="left">
<div class="title">插件上传</div>
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-upload="beforeUpload"
:file-list="fileList"
list-type="picture"
:limit="1"
:disabled="lookFlag"
>
<div class="line">
<div class="left">
<el-image
style="width: 64px; height: 64px"
:src="iconBase64"
fit="cover"
alt="点击上传"
>
<template v-slot:error>
<div style="line-height: 64px; font-size: 12px">
logo上传
</div>
</template>
</el-image>
</div>
<div class="right" v-if="!lookFlag">
<el-button size="small" type="primary">点击上传</el-button>
</div>
</div>
<div slot="tip" class="el-upload__tip" v-if="!lookFlag">
只能上传jpg/png文件且不超过2MB
</div>
</el-upload>
</div>
</div>
</div>
<div class="form">
<baseNewForm
ref="mainForm"
:spanNumber="24"
:isFunBtn="false"
:lookFlag="lookFlag"
:formRule="!lookFlag"
:formRow="formRow"
></baseNewForm>
</div>
</div>
</div>
</template>
<script>
import configData from "./configData";
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
export default {
data() {
return {
fileList: [],
iconBase64: "",
value1: true,
ruleForm: {},
lookFlag: false,
formRow: configData.addForm,
};
},
methods: {
handleRemove(file, fileList) {
console.log(file, fileList, "123");
},
handlePreview(file) {
console.log(file, this.fileList, "12333");
},
beforeUpload(file) {
console.log(file);
if (
file.type.split("/")[1] != "jpeg" &&
file.type.split("/")[1] != "png"
) {
this.$message({
type: "warning",
message: "只能上传jpg/png文件",
});
return false;
} else {
if (file.size >= 2000000) {
this.$message({
type: "warning",
message: "文件大小不超过2MB",
});
return false;
}
let reader = new FileReader();
let that = this;
console.log(this, 111);
reader.onloadend = function () {
// base64
var base64String = reader.result;
that.iconBase64 = base64String;
console.log(that.iconBase64);
};
reader.readAsDataURL(file);
return false;
}
},
},
components: {
baseNewForm,
},
created() {
if (this.$route.query.id) {
this.lookFlag = true;
} else {
this.lookFlag = false;
}
},
};
</script>
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 4px;
}
::v-deep .el-form-item {
display: block !important;
}
.wrap {
background-color: #fbfbfb;
width: 100%;
padding: 10px;
overflow: auto;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
margin-top: 10px;
> .upload {
background-color: #fff;
border-radius: 16px;
padding: 15px;
> .title {
font-size: 18px;
font-weight: 600;
}
> .uploadMain {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
> .left {
> .title {
font-size: 18px;
color: #999999;
margin-bottom: 10px;
}
.line {
display: flex;
align-items: center;
.left {
border: 1px dashed #999999;
width: 64px;
height: 64px;
> img {
width: 100%;
height: 100%;
}
}
.right {
margin-left: 15px;
}
}
}
}
}
> .form {
margin-top: 10px;
background-color: #fff;
border-radius: 16px;
}
}
}
</style>

View File

@ -3,21 +3,6 @@
<div class="menu">
<div class="appInfo">
<div class="img">
<!-- <template v-if="name==='中台'">
<img src="./images/1.png" alt="" style="width: 64px; height: 64px"/>
</template>
<template v-else-if="name==='U8C'">
<img src="./images/2.png" alt="" style="width: 64px; height: 64px"/>
</template>
<template v-else-if="name==='U8'">
<img src="./images/3.png" alt="" style="width: 64px; height: 64px"/>
</template>
<template v-else-if="name==='BIP'">
<img src="./images/4.png" alt="" style="width: 64px; height: 64px"/>
</template>
<template v-else-if="name==='ERP'">
<img src="./images/5.png" alt="" />
</template> -->
<template>
<img :src="imgUrl" alt="" @error="handleImageError" style="width: 64px;"/>
</template>

View File

@ -7,6 +7,7 @@
<el-button type="primary" @click="openFullScreen1" v-loading.fullscreen.lock="fullscreenLoading"
style="position: absolute; top: -100px">
</el-button>
<div style="
position: fixed;
background-color: #fafafa;
@ -1281,4 +1282,4 @@ export default {
::v-deep .el-form-item__content {
height: 34px;
}
</style>
</style>

View File

@ -85,10 +85,12 @@ const formRow = [
label: 'ip',
prop: 'sourceIp',
tag: 'elInput',
changeRemind:true,
}, {
label: '端口',
prop: 'sourcePort',
tag: 'elInput',
changeRemind:true,
}]
},
{
@ -96,10 +98,12 @@ const formRow = [
label: '数据库名称',
prop: 'dbName',
tag: 'elInput',
changeRemind:true,
}, {
label: '数据源类型',
prop: 'sourceType',
tag: 'elSelect',
changeRemind:true,
options: [
{
value: "1",
@ -121,10 +125,12 @@ const formRow = [
label: '登录名',
prop: 'loginName',
tag: 'elInput',
changeRemind:true,
}, {
label: '密码',
prop: 'password',
tag: 'elInput',
changeRemind:true,
}]
},
{
@ -132,7 +138,8 @@ const formRow = [
label: '服务名称',
prop: 'serviceName',
tag: 'elInput',
show:false
show:false,
changeRemind:true,
}, {
label: '使用状态',
prop: 'useState',
@ -303,4 +310,4 @@ export default {
formRow,
basicsRules,
formRowShow,
}
}

View File

@ -103,7 +103,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
sourceCode: "", //
@ -207,4 +207,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -20,160 +20,229 @@
:spanWidth="`120px`"
:loading="vLoading"
@onSelect="onSelect"
@changeRemind="dataChanges"
></base-form>
<div class="btnList">
<div class="btn">
<el-button type="primary" @click="testDataHandle">校验数据源</el-button>
</div>
<div class="text">
<div v-if="dataState==0" style="color: red">请校验数据源</div>
<div v-else style="color: green">校验成功</div>
</div>
</div>
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import configData from "./configData";
import { authApi } from "@/api/apis/auth";
import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from '@/components/base/baseNewForm'
import baseTable from '@/components/base/baseTable'
import configData from './configData'
import { authApi } from '@/api/apis/auth'
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
baseTable
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
dialogTitle: '',
dialogType: '',
formRow: configData.formRow,
basicsRules: configData.basicsRules,
vLoading: false,
newMarryOptions: [],
submitShow: true,
};
dataState: 0// 10
}
},
mounted() {
},
mounted() {},
methods: {
//
dataChanges(row) {
console.log(row, '修改')
this.$set(row, 'dataState', 0)
this.dataState = 0
},
//
async testDataHandle() {
this.$refs.basicsForm.$refs['ruleForm'].validate(async(valid) => {
if (!valid) {
return
} else {
this.openLoading('test')
const res = await authApi('sysDataSourceService', '', 'testDatabase', '', {
...this.$refs.basicsForm.ruleForm
})
console.log(res, '测试结果')
if (res.attribute) {
this.dataState = 1
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 1)
} else {
this.dataState = 0
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 0)
}
this.$vmNews(res.msg)
}
})
},
openDialog(type, row) {
this.formRow = configData.formRow;
this.submitShow = true;
this.formRow[5].elCol[0].show = false;
this.formRow = configData.formRow
this.submitShow = true
this.formRow[5].elCol[0].show = false
//
if (type == "add") {
this.dialogTitle = "新增";
this.dialogType = "add";
this.formRow[0].elCol[0].disabled = false;
this.formRow[1].elCol[0].disabled = false;
if (type == 'add') {
this.dialogTitle = '新增'
this.dialogType = 'add'
this.formRow[0].elCol[0].disabled = false
this.formRow[1].elCol[0].disabled = false
this.$nextTick(() => {
this.$refs.basicsForm.getField("useState", 1);
});
this.$refs.basicsForm.getField('useState', 1)
this.dataState = 0
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 0)
})
}
//
if (type == "edit") {
this.formRow[0].elCol[0].disabled = true;
this.formRow[1].elCol[0].disabled = true;
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.messageGetById(row.id);
if (type == 'edit') {
this.formRow[0].elCol[0].disabled = true
this.formRow[1].elCol[0].disabled = true
this.dialogTitle = '编辑'
this.dialogType = 'edit'
this.messageGetById(row.id)
}
//
if (type == "show") {
this.formRow[0].elCol[0].disabled = true;
this.formRow[1].elCol[0].disabled = true;
this.submitShow = false;
this.formRow = configData.formRowShow;
this.dialogTitle = "查看";
this.dialogType = "show";
this.messageGetById(row.id);
if (type == 'show') {
this.formRow[0].elCol[0].disabled = true
this.formRow[1].elCol[0].disabled = true
this.submitShow = false
this.formRow = configData.formRowShow
this.dialogTitle = '查看'
this.dialogType = 'show'
this.messageGetById(row.id)
}
this.dialogVisible = true;
this.dialogVisible = true
},
//
onSelect(val, index, indexRow, obj) {
// oracle
if (index == 3 && indexRow == 1 && val == 1) {
this.formRow[5].elCol[0].show = true;
this.formRow[5].elCol[0].show = true
} else {
this.formRow[5].elCol[0].show = false;
this.formRow[5].elCol[0].show = false
}
},
//
async messageGetById(id) {
let params = {
id: id,
};
id: id
}
let res = await authApi(
"sysDataSourceService",
"dataSource",
"queryEntity",
"",
'sysDataSourceService',
'dataSource',
'queryEntity',
'',
params
);
if (res.status == "200") {
)
if (res.status == '200') {
this.$nextTick(() => {
if(res.attribute.sourceType == "1"){
this.formRow[5].elCol[0].show = true;
}else{
this.formRow[5].elCol[0].show = false;
if (res.attribute.sourceType == '1') {
this.formRow[5].elCol[0].show = true
} else {
this.formRow[5].elCol[0].show = false
}
this.$refs.basicsForm.incomingParameters(res.attribute);
});
this.$refs.basicsForm.incomingParameters(res.attribute)
this.dataState = res.attribute.dataState
})
}
},
//
handleDialogClose() {
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
this.$refs.basicsForm.resetFields()
this.dialogVisible = false
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
if (!valid) {
return;
return
} else {
let params = {
...this.$refs.basicsForm.ruleForm,
};
if (this.dialogType == "add") {
this.openLoading("submit");
this.messageSaveDto(params);
}
if (this.dialogType == "edit") {
this.openLoading("submit");
this.messageUpdateDto(params);
if (this.dataState == 0) {
this.$confirm('当前校验未通过是否继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'warning'
}).then(() => {
let params = {
...this.$refs.basicsForm.ruleForm
}
if (this.dialogType == 'add') {
this.openLoading('submit')
this.messageSaveDto(params)
}
if (this.dialogType == 'edit') {
this.openLoading('submit')
this.messageUpdateDto(params)
}
})
} else {
let params = {
...this.$refs.basicsForm.ruleForm
}
if (this.dialogType == 'add') {
this.openLoading('submit')
this.messageSaveDto(params)
}
if (this.dialogType == 'edit') {
this.openLoading('submit')
this.messageUpdateDto(params)
}
}
}
});
})
},
//
async messageSaveDto(params) {
let res = await authApi(
"sysDataSourceService",
"dataSource",
"addEntity",
"",
'sysDataSourceService',
'dataSource',
'addEntity',
'',
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("新增成功", "success");
this.$emit("resetTable");
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('新增成功', 'success')
this.$emit('resetTable')
}
},
//
async messageUpdateDto(params) {
let res = await authApi(
"sysDataSourceService",
"dataSource",
"editEntity",
"",
'sysDataSourceService',
'dataSource',
'editEntity',
'',
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('更新成功', 'success')
this.$emit('resetTable')
}
},
},
};
}
}
}
</script>
<style scoped lang="scss">
@ -207,4 +276,13 @@ export default {
::v-deep .app-container {
height: auto !important;
}
</style>
.btnList {
display: flex;
align-items: center;
.btn {
margin-right: 40px;
}
}
</style>

View File

@ -102,7 +102,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
theme: "", //
@ -246,4 +246,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -130,13 +130,13 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
theme: "",
sendApp: "",
sendApi: "",
receiveApp: "",
theme: "",
sendApp: "",
sendApi: "",
receiveApp: "",
receiveApi: "",
status: "",
},
@ -285,4 +285,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -0,0 +1,22 @@
<template>
<div>
</div>
</template>
<script>
export default {
created() {
window.open('http://192.168.2.79:9999/kangarooDataCenterV3/jmreport/list')
this.$router.go(-1)
}
}
</script>
<style scoped lang="scss">
.box {
display: flex;
//justify-content: center;
//align-items: center;
height: 80vh;
}
</style>

View File

@ -1,100 +1,496 @@
<template>
<div class="app-container home">
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<div class="home">
<!--上面块运行情况-->
<div class="operationInfo">
<!-- 异常日志-->
<div class="errLogs">
<div class="title">异常日志</div>
<div class="errorInfo">
<div class="img">
<img src="@/assets/images/index_v2_error.png"/>
</div>
<div class="num">{{ errorNum }}</div>
</div>
<!-- 轮播图-->
<div class="swiper">
<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]">
<div class="img">
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
</div>
<div class="num">
{{ row.num }}
</div>
</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
<!-- 接口运行情况-->
<div class="apiInfo">
<div class="title">接口运行情况</div>
<div class="table">
<div class="tableTitle">
<div class="app">应用</div>
<div class="total">总数</div>
<div class="start">启动</div>
<div class="stop">停用</div>
</div>
<div class="content" @mouseenter="mouseenterHandle" @mouseleave="mouseleaveHandle">
<div class="tableContent" ref="refcontent">
<div class="line" v-for="(row,index) in this.apiInfoTableData" :key="index">
<div class="app">
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
</div>
<div class="total">{{ row.num ? row.num : 0 }}</div>
<div class="start">{{ row.normalNum ? row.normalNum : 0 }}</div>
<div class="stop">{{ row.abnormalNum ? row.abnormalNum : 0 }}</div>
</div>
</div>
</div>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</div>
<!-- 任务运行情况-->
<div class="taskInfo">
<div class="title">任务运行情况</div>
<div class="taskInfoList">
<div class="total">
<div class="text">总任务</div>
<div class="num">{{ taskTotal }}</div>
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
<div class="start">
<div class="text">运行中</div>
<div class="num">{{ taskStart }}</div>
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
<div class="stop">
<div class="text">停止</div>
<div class="num">{{ taskStop }}</div>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
<!-- 柱状图-->
<div class="echarts">
<div class="title">数据接入</div>
<div class="form">
<BarChart :proportion="proportion" :DataCollection="echartsData"></BarChart>
</div>
</div>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
import request from "@/utils/request";
import {authApi} from "@/api/apis/auth";
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
components: {},
data() {
return {
lineChartData: lineChartData.newVisitis
//echats
proportion: {
width: "100%",
height: "40vh",
},
//echarts
echartsData: {
"title": [
"正常",
"异常",
],
"parameter": [],
"series": [
{
"name": "正常",
"type": "bar",
"data": [],
"barWidth": "10%",
"barGap": "0"
},
{
"name": "异常",
"type": "bar",
"data": [],
"barWidth": "10%",
"barGap": "0"
},
]
},
errorNum: 4,//
errList: [],//
apiInfoTableData: [],//
taskTotal: 19,//
taskStart: 20,//
taskStop: 21,//
}
},
mounted() {
this.init()
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
//
async init() {
this.getErrorLogs()
this.getApiInfo()
this.getTaskInfo()
this.getTableData()
},
//
imgHandle(arr = []) {
arr.map(el => {
return request({
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.path,
method: "get",
responseType: 'arraybuffer'
}).then((res) => {
let tempImgUrl =
"data:image/png/jpg;base64," + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ""));
this.$set(el, 'imgUrl', tempImgUrl)
})
})
},
// 使
handleImageError(row = {}) {
row.imgUrl = require('@/assets/images/defaultIcon.png')
},
//
mouseenterHandle() {
this.$refs.refcontent.style.animationPlayState = 'paused'
},
mouseleaveHandle() {
this.$refs.refcontent.style.animationPlayState = ''
},
//
async getErrorLogs() {
const res = await authApi('homeService', 'app', 'appErrorNum', '', {})
if (res.status === '200') {
this.errList = []
//
this.imgHandle(res.attribute)
let tempIndex = 0 //
let tempArr = [] //
console.log(res.attribute, '异常日志')
this.errorNum = 0
res.attribute.some((item, index) => {
this.errorNum += item.num * 1
tempArr.push(item)
tempIndex++
if (tempIndex === 3) {
this.errList.push(tempArr)
tempIndex = 0
tempArr = []
}
if (index === res.attribute.length - 1 && tempIndex !== 0) {
this.errList.push(tempArr)
return true
}
})
console.log(this.errList, 'errList')
}
},
//
async getApiInfo() {
const res = await authApi('homeService', 'app', 'appApiNum', '', {})
if (res.status === '200') {
this.apiInfoTableData = []
this.imgHandle(res.attribute)
this.apiInfoTableData = res.attribute
if (this.apiInfoTableData.length >= 4) {
this.apiInfoTableData = [...this.apiInfoTableData, ...this.apiInfoTableData]
//
this.$refs.refcontent.classList.add('movego')
this.$refs.refcontent.style.animationDuration = `${this.apiInfoTableData.length}s`
}
console.log(this.apiInfoTableData, 'this.apiInfoTableData')
}
},
//
async getTaskInfo() {
const res = await authApi('homeService', 'app', 'taskNum', '', {})
console.log(res, '任务运行情况')
this.taskTotal = res.attribute.num ? res.attribute.num : 0
this.taskStart = res.attribute.normalNum ? res.attribute.normalNum : 0
this.taskStop = res.attribute.abnormalNum ? res.attribute.abnormalNum : 0
},
//
async getTableData() {
let tempDate = []
let normalNumData = []
let abnormalNumData = []
const res = await authApi('homeService', 'app', 'sevenNum', '', {})
res.attribute.forEach(item => {
tempDate.push(item.name)
normalNumData.push(item.normalNum ? item.normalNum : 0)
abnormalNumData.push(item.abnormalNum ? item.abnormalNum : 0)
})
//echarts
//
this.echartsData.parameter = tempDate
//
this.echartsData.series[0].data = normalNumData
//
this.echartsData.series[1].data = abnormalNumData
console.log(res, '数据接入')
}
}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: #FBFBFB;
position: relative;
height: 100%;
overflow: auto;
.home {
//background: url(~@/assets/images/index_v2_bgc.png) no-repeat;
padding: 1vh .5vw 1vh;
background-color: #fcfcfc;
display: flex;
flex-direction: column;
//
.operationInfo {
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
flex: 1;
display: flex;
//
.errLogs {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
height: 100%;
> .errorInfo {
display: flex;
justify-content: center;
align-items: center;
height: 7vh;
> .img {
margin-right: 20px;
width: 5vw;
height: 100%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
img {
width: 5vw;
height: 7vh;
}
}
> .num {
width: 5vw;
font-size: 3vw;
color: #000;
font-weight: 700;
text-align: center;
}
}
> .swiper {
margin-top: 3vh;
.errList {
margin-top: 20px;
display: flex;
justify-content: space-around;
> .errItem {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-right: .5px #ccc solid;
> .img {
width: 3vw;
height: 3vw;
border-radius: 8px;
overflow: hidden;
display: flex;
align-items: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
img {
width: 100%;
}
}
> .num {
margin-top: 10px;
width: 4vw;
text-align: center;
color: #000;
font-weight: 700;
font-size: 1.5vw;
}
&:nth-last-child(1) {
border-right: 0px;
}
}
}
}
}
//
.apiInfo {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
margin: 0 10px;
height: 100%;
display: flex;
flex-direction: column;
> .table {
padding: 0 15px;
> .tableTitle {
display: flex;
justify-content: space-around;
padding-bottom: 10px;
border-bottom: #ccc 1px solid;
> div {
display: flex;
color: #000;
font-size: 20px;
}
}
.content {
height: 22vh;
overflow: hidden;
> .tableContent {
> .line {
padding: 15px 0;
display: flex;
justify-content: space-around;
align-items: center;
border-bottom: 1px #ccc dashed;
> div {
color: #000;
font-size: 32px;
flex: 1;
text-align: center;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
img {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
width: 3vw;
}
}
}
}
}
}
}
.taskInfo {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
height: 100%;
> .taskInfoList {
display: flex;
justify-content: space-around;
> div {
border-radius: 16px;
width: 28%;
height: 23vh;
display: flex;
font-weight: 700;
flex-direction: column;
align-items: center;
font-size: 30px;
color: #fff;
.text{
margin-top: 5vh;
}
.num{
margin-top: 5vh;
}
}
> .total {
background-color: #1d46ee;
}
> .start {
background-color: #7ad756;
}
> .stop {
background-color: #e76e3e;
}
}
}
}
//
.title {
//background: url(~@/assets/images/index_v2_title.png) no-repeat;
//background-size: 100% 100%;
width: 20vw;
height: 6vh;
color: #000;
line-height: 6vh;
padding-left: 1vw;
font-size: 24px;
font-weight: 700;
}
.echarts {
flex: 2;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
margin-top: 10px;
background-color: #fff;
.form{
margin-top: 5vh;
}
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
//
@keyframes move {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-51%);
}
}
.movego {
animation: move 80s linear infinite;
}
</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

@ -242,7 +242,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
});

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"
@ -195,7 +195,7 @@
class="showText"
@click="elDialogClick(row, index, indexRow)"
>
{{ ruleForm[row.prop] ? ruleForm[row.prop] : "请点击选择" }}
{{ ruleForm[row.prop] ? ruleForm[row.prop] : '请点击选择' }}
<!-- <el-input v-model="ruleForm[row.prop]"></el-input> -->
</p>
<!-- <i class="el-icon-more " v-if="row.elDialogHoverType"></i> -->
@ -321,11 +321,11 @@
</template>
<script>
import baseCascader from "./baseCascader/index.vue";
import {deepClone} from "@/utils/index.js";
import baseDatePicker from "./baseDatePicker.vue";
import baseNewSelect from "./baseNewSelect";
import {checkMobile} from "@/utils/util";
import baseCascader from './baseCascader/index.vue'
import { deepClone } from '@/utils/index.js'
import baseDatePicker from './baseDatePicker.vue'
import baseNewSelect from './baseNewSelect'
import { checkMobile } from '@/utils/util'
export default {
components: {
@ -333,88 +333,88 @@ export default {
// customCascader
baseNewSelect,
baseDatePicker,
baseCascader,
baseCascader
},
props: {
// loading
loading: {
type: Boolean,
default: false,
default: false
},
//
formRule: {
type: Boolean,
default: true,
default: true
},
refName: {
type: String,
default: "ruleForm",
default: 'ruleForm'
},
//
newFlag: {
type: Boolean,
default: false,
default: false
},
//
lookFlag: {
type: Boolean,
default: false,
default: false
},
//
spanNumber: {
type: Number,
default: 12,
default: 12
},
spanWidth: {
type: String,
default: "90px",
default: '120px'
},
//
rules: {
type: Object,
default: () => {
return {};
},
return {}
}
},
//
formRow: {
type: Array,
default: () => {
return [];
},
return []
}
},
//
disabled: {
type: Boolean,
default: false,
default: false
},
//
isFunBtn: {
type: Boolean,
default: true,
default: true
},
formdata: {
type: Object,
type: Object
},
justifyContent: {
type: String,
default: "flex-end",
default: 'flex-end'
},
marginBottom: {
type: String,
default: "0",
default: '0'
},
ruleForm: {
type: Object,
default: () => {
return {};
},
return {}
}
},
tableColumn: {
type: Array,
default: () => {
return [];
},
return []
}
},
treeSelectInfo: {
type: Object,
@ -428,76 +428,76 @@ export default {
pickerOptionsSearch: {
shortcuts: [
{
text: "本月",
text: '本月',
onClick(picker) {
picker.$emit("pick", [new Date(), new Date()]);
},
picker.$emit('pick', [new Date(), new Date()])
}
},
{
text: "今年至今",
text: '今年至今',
onClick(picker) {
const end = new Date();
const start = new Date(new Date().getFullYear(), 0);
picker.$emit("pick", [start, end]);
},
const end = new Date()
const start = new Date(new Date().getFullYear(), 0)
picker.$emit('pick', [start, end])
}
},
{
text: "最近六个月",
text: '最近六个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 6);
picker.$emit("pick", [start, end]);
},
},
],
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 6)
picker.$emit('pick', [start, end])
}
}
]
},
//
// ruleForm: {},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
return time.getTime() > Date.now()
},
shortcuts: [
{
text: "今天",
text: '今天',
onClick(picker) {
picker.$emit("pick", new Date());
},
picker.$emit('pick', new Date())
}
},
{
text: "昨天",
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit("pick", date);
},
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: "一周前",
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", date);
},
},
],
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
tempFormData: {},
};
tempFormData: {}
}
},
watch: {
ruleForm: {
immediate: true, //
deep: true, //
handler(newVal, oldVal) {
this.$emit("dataChanges");
},
},
this.$emit('dataChanges')
}
}
},
created() {
this.tempFormData = deepClone(this.ruleForm);
this.tempFormData = deepClone(this.ruleForm)
},
mounted() {
// this.ruleForm = this.formdata
@ -506,13 +506,13 @@ export default {
methods: {
selectShow(row) {
try {
this.$emit("selectFormSearch", row);
this.$emit('selectFormSearch', row)
} catch (error) {
console.log(this.ruleForm, row, "23232出错了");
console.log(this.ruleForm, row, '23232出错了')
}
},
close() {
this.$emit("closeDialog");
this.$emit('closeDialog')
},
integerNumber(row) {
// row.rules?(v)=>()):''
@ -521,127 +521,127 @@ export default {
// return this.ruleForm[row.prop].replace(/[^\d]/g,'')
//
// integer
if (row.rulesName == "integer") {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, "");
if (row.rulesName == 'integer') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '')
}
// decimal
if (row.rulesName == "decimal") {
if (row.rulesName == 'decimal') {
this.ruleForm[row.prop] = this.ruleForm[row.prop]
.replace(/[^\d.]/g, "")
.replace(/\.{2,}/g, ".")
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".")
.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
.replace(/^\./g, "");
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
.replace(/^\./g, '')
}
//
if (row.rulesName == "identity") {
if (row.rulesName == 'identity') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
""
);
''
)
}
//
if (row.rulesName == "phone") {
if (row.rulesName == 'phone') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^1(3|4|5|7|8|9)\\d{9}$/,
""
);
''
)
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/^1[3,4,5,6,7,8,9][0-9]{9}$/, '')
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/1(\d{2})\d{4}(\d{4})/g,'').replace(/[^\d]/g, '')
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/\.{11,}/g, '')
// /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
}
//
if (row.rulesName == "eMail") {
if (row.rulesName == 'eMail') {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/,
""
);
''
)
}
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g,'')
},
//
searchByStationName(type) {
if (type == "address") {
let address = this.ruleForm[type];
let that = this;
var map = new BMap.Map("container");
map.centerAndZoom(address, 18);
map.enableScrollWheelZoom(); //
map.enableContinuousZoom(); //
map.addControl(new BMap.NavigationControl()); //
map.addControl(new BMap.OverviewMapControl()); //
if (type == 'address') {
let address = this.ruleForm[type]
let that = this
var map = new BMap.Map('container')
map.centerAndZoom(address, 18)
map.enableScrollWheelZoom() //
map.enableContinuousZoom() //
map.addControl(new BMap.NavigationControl()) //
map.addControl(new BMap.OverviewMapControl()) //
map.addControl(
new BMap.OverviewMapControl({
isOpen: true,
anchor: BMAP_ANCHOR_BOTTOM_RIGHT,
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
})
); //
var localSearch = new BMap.LocalSearch(map);
localSearch.enableAutoViewport(); //
map.clearOverlays(); //
var keyword = address;
localSearch.setSearchCompleteCallback(function (searchResult) {
var poi = searchResult.getPoi(0);
map.centerAndZoom(poi.point, 13);
) //
var localSearch = new BMap.LocalSearch(map)
localSearch.enableAutoViewport() //
map.clearOverlays() //
var keyword = address
localSearch.setSearchCompleteCallback(function(searchResult) {
var poi = searchResult.getPoi(0)
map.centerAndZoom(poi.point, 13)
var marker = new BMap.Marker(
new BMap.Point(poi.point.lng, poi.point.lat)
); //
map.addOverlay(marker);
) //
map.addOverlay(marker)
var content =
keyword +
"<br/><br/>经度:" +
'<br/><br/>经度:' +
poi.point.lng +
"<br/>纬度:" +
poi.point.lat;
that.ruleForm["lng"] = poi.point.lng;
that.ruleForm["lat"] = poi.point.lat;
'<br/>纬度:' +
poi.point.lat
that.ruleForm['lng'] = poi.point.lng
that.ruleForm['lat'] = poi.point.lat
var infoWindow = new BMap.InfoWindow(
"<p style='font-size:14px;'>" + content + "</p>"
);
marker.addEventListener("click", function () {
this.openInfoWindow(infoWindow);
});
'<p style=\'font-size:14px;\'>' + content + '</p>'
)
marker.addEventListener('click', function() {
this.openInfoWindow(infoWindow)
})
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //
});
localSearch.search(keyword);
})
localSearch.search(keyword)
}
},
//
handleChange(val) {
this.$emit("handleChange", val);
this.$emit('handleChange', val)
},
//
getImage(imagePath) {
let licenseImg = imagePath.join(",");
let licenseImg = imagePath.join(',')
},
//
getbeforeImgList(imagePath) {
let licenseImg = imagePath.join(",");
this.$set(this.ruleForm, "beforeImgList", licenseImg);
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
},
//
getmaterialsList(imagePath) {
let licenseImg = imagePath.join(",");
this.$set(this.ruleForm, "materialsList", licenseImg);
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsList', licenseImg)
},
//
getmaterialsListAfter(imagePath) {
let licenseImg = imagePath.join(",");
this.$set(this.ruleForm, "materialsListAfter", licenseImg);
let licenseImg = imagePath.join(',')
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
},
revealPhoto(licenseImg) {
this.$refs.imgFile.revealImg(licenseImg);
this.$refs.imgFile.revealImg(licenseImg)
},
//
echoFromData(echoData, otherField) {
let jsonData = [];
let jsonData = []
this.formRow.forEach((item) => {
jsonData.push(item.elCol);
});
let newJson = [].concat.apply([], jsonData);
jsonData.push(item.elCol)
})
let newJson = [].concat.apply([], jsonData)
newJson.forEach((item) => {
if (this.ruleForm.factoryInFlag == 1) {
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
@ -651,31 +651,31 @@ export default {
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
}
}
this.$set(this.ruleForm, item.prop, echoData[item.prop]);
});
this.$set(this.ruleForm, item.prop, echoData[item.prop])
})
//
if (typeof otherField == "object") {
this.$refs[otherField.props][0].setEchoData(echoData[otherField.field]);
if (typeof otherField == 'object') {
this.$refs[otherField.props][0].setEchoData(echoData[otherField.field])
}
},
//
//propLabel value
getField(propLabel, value) {
this.$set(this.ruleForm, propLabel, value);
this.$set(this.ruleForm, propLabel, value)
},
//
choiceAssignment(value) {
this.ruleForm = Object.assign({}, value);
this.ruleForm = Object.assign({}, value)
// this.$forceUpdate()
},
incomingParameters(vale) {
let ruleLength = 0;
let valeLength = 0;
let ruleLength = 0
let valeLength = 0
for (let i in vale) {
valeLength = valeLength + 1;
valeLength = valeLength + 1
}
for (let i in this.ruleForm) {
ruleLength = ruleLength + 1;
ruleLength = ruleLength + 1
}
// if(ruleLength == valeLength){
// this.choiceAssignment(vale)
@ -685,107 +685,107 @@ export default {
// }
// }
for (let i in vale) {
this.getField(i, vale[i]);
this.getField(i, vale[i])
}
},
resetFormPlus(formName) {
for (let i in this.$refs[formName]) {
this.getField(i, "");
this.getField(i, '')
}
},
//
resetField(field) {
if (this.ruleForm[field]) {
this.$set(this.ruleForm, field, "");
this.$refs["ruleForm"].clearValidate(field); //
this.$set(this.ruleForm, field, '')
this.$refs['ruleForm'].clearValidate(field) //
}
},
resetFields() {
// this.choiceAssignment({});
this.$refs.ruleForm.resetFields();
this.$refs.ruleForm.resetFields()
},
// , index indexRow
selectChange(val, index, indexRow, options) {
let obj = {};
let obj = {}
options.forEach((item) => {
if (item.value == val) {
obj = item;
obj = item
}
});
this.$emit("onSelect", val, index, indexRow, obj);
this.$forceUpdate();
})
this.$emit('onSelect', val, index, indexRow, obj)
this.$forceUpdate()
},
switchChange(val, index, indexRow, row) {
this.$emit("switchChange", val, index, indexRow, row);
this.$emit('switchChange', val, index, indexRow, row)
},
//
getCascader(value, field) {
this.$set(this.ruleForm, field, value);
this.$set(this.ruleForm, field, value)
},
//
submitForm() {
let formName = "ruleForm";
let formName = 'ruleForm'
this.$refs[formName].validate((valid) => {
if (valid) {
//
let flag =
JSON.stringify(this.tempFormData) === JSON.stringify(this.ruleForm);
this.$emit("onSubmit", this.ruleForm, flag);
JSON.stringify(this.tempFormData) === JSON.stringify(this.ruleForm)
this.$emit('onSubmit', this.ruleForm, flag)
} else {
console.log("error submit!!");
return false;
console.log('error submit!!')
return false
}
});
})
},
//
resetForm(formName) {
let tempObj = deepClone(this.tempFormData);
let tempObj = deepClone(this.tempFormData)
// // this.tableColumn
// // .filter((item) => item.disabled)
// // .forEach((item) => {
// // tempObj[item.id] = this.ruleForm[item.id];
// // });
// // this.choiceAssignment({});
this.$confirm("确认要重置表单吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('确认要重置表单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$emit("resetForm", tempObj);
this.$refs[formName].resetFields();
this.$emit('resetForm', tempObj)
this.$refs[formName].resetFields()
})
.catch(() => {
this.$message({
type: "info",
message: "已取消重置",
});
});
type: 'info',
message: '已取消重置'
})
})
},
clearCheck(propName) {
this.ruleForm[propName] = "";
this.ruleForm[propName] = ''
},
elDialogClick(row, index, indexRow) {
if (row.disabled) {
return;
return
}
// row.prop
this.$emit("elDialogClick", row, index);
this.$emit('elDialogClick', row, index)
},
elDialogHover(row) {
row.elDialogHoverType = true;
row.elDialogHoverType = true
},
elDialogLeave(row) {
// row.elDialogHoverType = false
},
// input
changeRadio(val, index, indexRow, row) {
this.$emit("onChangeRadio", val, index, indexRow, row);
this.$emit('onChangeRadio', val, index, indexRow, row)
},
normalizer(node, row) {
//children=null
if (node.children == null || node.children == "null") {
delete node.children;
if (node.children == null || node.children == 'null') {
delete node.children
}
// return{
// ...node,
@ -793,22 +793,22 @@ export default {
// }
},
selectTree(row) {
console.log(row);
this.$emit("selectTree");
console.log(row)
this.$emit('selectTree')
if (this.$refs.ruleForm) {
this.$nextTick(() => {
this.$refs.ruleForm.validateField(row.id);
});
this.$refs.ruleForm.validateField(row.id)
})
}
},
treeSelectClear() {
this.$refs.selectTree.clear();
},
this.$refs.selectTree.clear()
}
},
mounted() {
// this.$refs.ruleForm.resetFields();
},
};
}
}
</script>
<style>
.el-form-item__label {
@ -817,8 +817,9 @@ export default {
}
.el-form-item--medium .el-form-item__content {
/* line-height: 36px; */
flex: 1;
display: flex;
align-items: center;
}
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
@ -826,12 +827,12 @@ export default {
content: "";
}
</style>
<style scoped lang='scss'>
<style scoped lang="scss">
.label {
/* @include fontBase(16px, #333333) ; */
color: #333;
font-size: 13px;
/* width: 90px; */
///* width: 90px; */
text-align: right;
padding-right: 5px;
}
@ -922,4 +923,7 @@ export default {
resize: none;
}
}
::v-deep .el-form-item__label{
padding: 0 !important;
}
</style>

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

@ -176,8 +176,10 @@
class="btnText"
:style="{ background: item.color ? item.color : '#5a9cf8' }"
style="padding: 3px 10px; border-radius: 20px"
v-btnPermission="{ btnID: item.type, routeId: $route.meta.id }"
>
<span
style="color: #fff; font-weight: 700"
v-if="!item.ifField && !item.hiddenField"
>{{ item.text }}</span

View File

@ -98,209 +98,211 @@
<template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<slot :name="item.id" :row="slotrow ? scope : scope.row">
<template v-if="!lookflag">
<el-input
v-if="item.type === 'input' || item.type === 'textrea'"
:disabled="
<template v-if="scope.$index + 1 != tableInfo.tableData.length || lookflag">
<template v-if="!lookflag">
<el-input
v-if="item.type === 'input' || item.type === 'textrea'"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-model="tableInfo.tableData[scope.row.index][item.id]"
placeholder=""
:maxlength="item.maxlength ? item.maxlength : ''"
></el-input>
<el-input
v-if="item.type === 'number'"
type="number"
onkeyup="value=value.replace(/[^\d]/g,'')"
:disabled="
v-model="tableInfo.tableData[scope.row.index][item.id]"
placeholder=""
:maxlength="item.maxlength ? item.maxlength : ''"
></el-input>
<el-input
v-if="item.type === 'number'"
type="number"
onkeyup="value=value.replace(/[^\d]/g,'')"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-model="tableInfo.tableData[scope.row.index][item.id]"
placeholder=""
min="1"
:maxlength="item.maxlength ? item.maxlength : ''"
></el-input>
<el-checkbox
v-if="item.type === 'checkbox'"
:disabled="
v-model="tableInfo.tableData[scope.row.index][item.id]"
placeholder=""
min="1"
:maxlength="item.maxlength ? item.maxlength : ''"
></el-input>
<el-checkbox
v-if="item.type === 'checkbox'"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-model="tableInfo.tableData[scope.row.index][item.id]"
></el-checkbox>
<BaseSelect
v-if="item.type === 'select'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
v-model="tableInfo.tableData[scope.row.index][item.id]"
></el-checkbox>
<BaseSelect
v-if="item.type === 'select'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
:selectInfo="item"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
></BaseSelect>
<baseCascader
:disabled="
:selectInfo="item"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
></BaseSelect>
<baseCascader
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-if="item.type === 'treeselect'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<el-link
style="
v-if="item.type === 'treeselect'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<el-link
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
:disabled="
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-if="item.type === 'click'"
@click="clickBoxHandle(scope.row)"
type="primary"
v-if="item.type === 'click'"
@click="clickBoxHandle(scope.row)"
type="primary"
>{{
tableInfo.tableData[scope.row.index][item.id]
? tableInfo.tableData[scope.row.index][item.id]
: "点击这里..."
}}</el-link
>
<div v-if="item.type === 'text'">
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
tableInfo.tableData[scope.row.index][item.id]
? tableInfo.tableData[scope.row.index][item.id]
: "点击这里..."
}}</el-link
>
<div v-if="item.type === 'text'">
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<BaseDatePicker
v-if="item.type === 'datepick'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<BaseDatePicker
v-if="item.type === 'datepick'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
:row="scope.row"
:low="item.low ? item.low : ''"
:up="item.up ? item.up : ''"
></BaseDatePicker>
<BaseDatePicker
v-if="item.type === 'daterange'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
:row="scope.row"
:low="item.low ? item.low : ''"
:up="item.up ? item.up : ''"
></BaseDatePicker>
<BaseDatePicker
v-if="item.type === 'daterange'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
datePickerType="daterange"
></BaseDatePicker>
<BaseDatePicker
v-if="item.type === 'datetimepick'"
datePickerType="datetime"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
datePickerType="daterange"
></BaseDatePicker>
<BaseDatePicker
v-if="item.type === 'datetimepick'"
datePickerType="datetime"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
></BaseDatePicker>
<div
v-if="
></BaseDatePicker>
<div
v-if="
item.type === 'compute' &&
!lookflag &&
scope.$index + 1 != tableInfo.tableData.length
"
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ calculator(item, scope.row) }}
</div>
<div
style="
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ calculator(item, scope.row) }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ calculator(item, scope.row) }}
</div>
</el-tooltip>
</div>
<el-switch
v-if="item.type === 'switch'"
:disabled="
>
{{ calculator(item, scope.row) }}
</div>
</el-tooltip>
</div>
<el-switch
v-if="item.type === 'switch'"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:active-text="row.activeText"
:inactive-text="row.inactiveText"
:active-value="row.activeValue ? row.activeValue : true"
:inactive-value="
v-model="tableInfo.tableData[scope.row.index][item.id]"
:active-text="row.activeText"
:inactive-text="row.inactiveText"
:active-value="row.activeValue ? row.activeValue : true"
:inactive-value="
row.inactiveValue || row.inactiveValue == 0
? row.inactiveValue
: false
"
>
</el-switch>
</template>
<template v-else>
<div
v-if="
>
</el-switch>
</template>
<template v-else>
<div
v-if="
item.type != 'checkbok' &&
item.type !== 'select' &&
item.type !== 'treeselect' &&
item.type !== 'datepick'
"
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
>
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<BaseSelect
v-if="item.type === 'select'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
>
{{ tableInfo.tableData[scope.row.index][item.id] }}
</div>
</el-tooltip>
</div>
<BaseSelect
v-if="item.type === 'select'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
:selectInfo="item"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
:lookflag="true"
></BaseSelect>
<baseCascader
v-if="item.type === 'treeselect'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:lookflag="true"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<div v-if="item.type === 'datepick'">
{{
tableInfo.tableData[scope.row.index][item.id].split("T")[0]
}}
</div>
<el-checkbox
v-if="item.type === 'checkbox'"
:disabled="
:selectInfo="item"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
:lookflag="true"
></BaseSelect>
<baseCascader
v-if="item.type === 'treeselect'"
v-model="tableInfo.tableData[scope.row.index][item.id]"
:lookflag="true"
:itemObj="item"
:ruleForm="tableInfo.tableData[scope.row.index]"
>
</baseCascader>
<div v-if="item.type === 'datepick'">
{{
tableInfo.tableData[scope.row.index][item.id].split("T")[0]
}}
</div>
<el-checkbox
v-if="item.type === 'checkbox'"
:disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length
"
v-model="tableInfo.tableData[scope.row.index][item.id]"
></el-checkbox>
v-model="tableInfo.tableData[scope.row.index][item.id]"
></el-checkbox>
</template>
</template>
</slot>
</template>

View File

@ -242,7 +242,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
});

View File

@ -33,6 +33,7 @@
type="primary"
size="mini"
@click="buttonHandle(item)"
v-btnPermission="{ btnID: item.buttonType, routeId: $route.meta.id }"
>{{ item.buttonName }}
</el-button>
</div>
@ -53,6 +54,9 @@
:tableHeight="'67vh'"
:border="false"
>
<template #data_status="{row}">
{{ data_status_dist[row.data_status] }}
</template>
</BaseTable>
<div class="nextPage">
<BasePage
@ -62,7 +66,7 @@
</div>
</div>
</div v->
<baseDialog v-model="dialogShow" @confirm="dialogConfirm" :lookFlag="lookFlag">
<baseDialog title="数据设置" v-model="dialogShow" @confirm="dialogConfirm" :lookFlag="lookFlag">
<h1 style="margin: 20px 0; font-size: 20px; font-weight: 700">
基本信息
</h1>
@ -101,63 +105,104 @@
</template>
</baseDialog>
<!-- 分发任务dialog-->
<baseDialog v-model="sendShow" :footerShow="false">
<baseTable
:tableData="sendTableData"
:tableColumn="sendTableColumn">
<template v-slot:status="{row}">
{{ sendDist[row.status] }}
</template>
<template v-slot:fun="{row}">
<el-button v-if="row.status === '1'||row.status === '2'" type="danger" @click="sendRowHandle(row)">删除
<baseDialog width="30%" v-model="sendShow" :footerShow="false" title="分发任务">
<div class="sendBox">
<div class="chunk" style="display: flex;align-items: center;margin: 20px 0;font-size: 16px">
<div class="title">分发</div>
<div class="value" style="margin-left: 20px">
<el-select
v-model="sendCheckboxList"
placeholder="请选择"
>
<el-option
v-for="item in sendTableData"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div class="chunk" style="display: flex;align-items: center;font-size: 16px">
<div class="title">类型</div>
<div class="value" style="margin-left: 20px">
<el-select
v-model="sendCheckboxType"
placeholder="请选择"
>
<el-option
v-for="item in sendTableTypeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div class="btn" style="display: flex;justify-content: flex-end">
<el-button type="primary" @click="sendRowHandle()">下发
</el-button>
<el-button v-if="row.status === '3'||row.status === '4'" type="primary" @click="sendRowHandle(row)">下发
</el-button>
</template>
</baseTable>
</div>
</div>
<!-- <baseTable-->
<!-- :tableData="sendTableData"-->
<!-- :tableColumn="sendTableColumn"-->
<!-- >-->
<!-- <template v-slot:status="{row}">-->
<!-- {{ sendDist[row.status] }}-->
<!-- </template>-->
<!-- <template v-slot:fun="{row}">-->
<!-- <el-button v-if="row.status === '1'||row.status === '2'" type="danger" @click="sendRowHandle(row)">删除-->
<!-- </el-button>-->
<!-- <el-button v-if="row.status === '3'||row.status === '4'" type="primary" @click="sendRowHandle(row)">下发-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </baseTable>-->
</baseDialog>
</div>
</template>
<script>
import {deepClone} from "@/utils/index.js";
import {getUserModuleApi} from "@/api/integrationOption/integrationOption.js";
import BaseNewForm from "./compoments/baseNewForm";
import BaseTable from "./compoments/baseTable";
import BasePage from "./compoments/basePage.vue";
import baseDialog from "@/views/integrationOption/compoments/baseDialog";
import BaseTableForm from "./compoments/baseTableForm_v2.vue";
import BaseMenuTree from "@/views/intergrationTask/compoments/baseMenuTree.vue";
import { deepClone } from '@/utils/index.js'
import { getUserModuleApi } from '@/api/integrationOption/integrationOption.js'
import BaseNewForm from './compoments/baseNewForm'
import BaseTable from './compoments/baseTable'
import BasePage from './compoments/basePage.vue'
import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import BaseTableForm from './compoments/baseTableForm_v2.vue'
import BaseMenuTree from '@/views/intergrationTask/compoments/baseMenuTree.vue'
export default {
data() {
return {
treeObj: {
label: "",
upId: ""
label: '',
upId: ''
},
sendDist: {
"1": "发送成功",
"2": "发送中",
"3": "发送失败",
"4": "未发送"
'1': '发送成功',
'2': '发送中',
'3': '发送失败',
'4': '未发送'
},
sendShow: false,//dialog
sendTableColumn: [
{
id: 'name',
title: "应用"
title: '应用'
},
{
id: 'status',
title: "状态"
title: '状态'
},
{
id: 'msg',
title: "信息"
title: '信息'
},
{
id: "fun",
title: "操作"
id: 'fun',
title: '操作'
}
],
@ -167,11 +212,41 @@ export default {
searchForm: {},
searchLoading: false,
//
searchButton: [],
mainTableName: "",
searchButton: [
{
'buttonType': 'new',
'buttonName': '新建'
},
{
'buttonType': 'resize',
'buttonName': '重置'
},
{
'buttonType': 'search',
'buttonName': '查询'
}
],
mainTableName: '',
//
mainLoading: false,
mainFunData: [],
mainFunData: [
{
'text': '修改',
'type': 'edit'
},
{
'text': '删除',
'type': 'dele'
},
{
'text': '查看',
'type': 'view'
},
{
'text': '下发',
'type': 'send'
}
],
mainActiveRow: {},
mainTabLoading: false,
tableData: [],
@ -180,7 +255,7 @@ export default {
pageModel: {
total: 0,
pageIndex: 1,
limit: 10,
limit: 10
},
//dialog
dialogShow: false,
@ -190,27 +265,49 @@ export default {
lookFlag: false,
newFlag: false,
dialogTabaleInfo: [],
dialogfunData: [{text: "删除", type: "dele", color: 'red'}],
dialogfunData: [{ text: '删除', type: 'dele', color: 'red' }],
dialogTableLoading: false,
dialogFormName: "",
dialogFormName: '',
//
treeProps: {
children: "children",
label: "label",
children: 'children',
label: 'label'
},
treeData: [],
treeActiveRow: {},
treeSelectInfo: {},
data_status_dist: {
'Y': '正常',
'F': '修改',
'N': '删除'
},
sendCheckboxList: '',//
sendCheckboxType: '',
sendTableTypeOptions: [
{
id: 1,
name: '新增'
},
{
id: 2,
name: '修改'
},
{
id: 3,
name: '删除'
}
],
rowId: ''
}
},
methods: {
async init() {
this.mainLoading = true
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShow",
}, {mdmCode: this.$route.meta.mdmCode})
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShow'
}, { mdmCode: this.$route.meta.mdmCode })
//
if (this.$route.query.viewType === '1') {
this.treeObj.label = res.attribute.mdmModuleViewEntity.viewFiled
@ -225,27 +322,36 @@ export default {
})
})
this.searchFormRow = []
res.attribute.queryList.forEach((item) => {
item.id = item.dbName + '.' + item.id
})
this.baseFormRowDispose(res.attribute.queryList, this.searchFormRow)
console.log(res.attribute.queryList, 'this.searchFormRow')
//
let funDataBtn = {
edit: true,
view: true,
dele: true,
send: true,
send: true
}
this.searchButton = []
this.mainFunData = []
res.attribute.buttonList.forEach(item => {
if (funDataBtn[item.buttonType]) {
this.mainFunData.push({
text: item.buttonName,
type: item.buttonType
})
} else {
this.searchButton.push(item)
}
})
// v3
// this.searchButton = []
// this.mainFunData = []
// res.attribute.buttonList.forEach(item => {
// if (funDataBtn[item.buttonType]) {
// this.mainFunData.push({
// text: item.buttonName,
// type: item.buttonType
// })
// console.log(this.mainFunData, 'this.mainFunData')
// } else {
// this.searchButton.push(item)
// console.log(this.searchButton, 'this.searchButton')
// }
// })
//
console.log(res, 'res')
//tableColumn
res.attribute.listList.forEach(item => {
this.mainTableName = item.dbName
item.ruleList.forEach(ele => {
@ -260,9 +366,9 @@ export default {
async initTree(label, upId, obj = {}) {
if (this.$route.query.viewType !== '1') return
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowTreeData",
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowTreeData'
}, {
mdmCode: this.$route.meta.mdmCode,
label,
@ -276,9 +382,9 @@ export default {
async initTableData(name, obj = {}) {
this.mainTabLoading = true
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowData",
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowData'
}, {
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
@ -292,21 +398,21 @@ export default {
// row
baseFormRowDispose(arr, resultArr) {
let searchSpan = 0
let tempArr = [];
let tempArr = []
arr.forEach(item => {
let spanNum = item.row * 1 || 12;
searchSpan += spanNum;
let spanNum = item.row * 1 || 12
searchSpan += spanNum
if (searchSpan > 24) {
resultArr.push({elCol: tempArr});
searchSpan = spanNum;
tempArr = [];
tempArr.push(item);
resultArr.push({ elCol: tempArr })
searchSpan = spanNum
tempArr = []
tempArr.push(item)
} else {
tempArr.push(item);
tempArr.push(item)
}
})
if (tempArr.length) {
resultArr.push({elCol: tempArr});
resultArr.push({ elCol: tempArr })
}
},
//
@ -324,8 +430,8 @@ export default {
//
//
selectValueGeTHandle(item, row, data) {
this.$set(this.tableData[row.index], item.id, data);
this.$set(this.tableData[row.index], "selectflag", true);
this.$set(this.tableData[row.index], item.id, data)
this.$set(this.tableData[row.index], 'selectflag', true)
},
//
async tableButtonHandle(row, item) {
@ -334,27 +440,27 @@ export default {
} else if (item.type === 'view') {
this.viewDIalogHandle(row.id)
} else if (item.type === 'dele') {
this.$confirm("是否删除此行?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否删除此行?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.deleRowHanlde(row.id)
})
.catch((error) => {
});
})
} else if (item.type === 'send') {
this.sendHandle(row.id)
}
},
//
currentChangeHandle(pageModel) {
this.pageModel = pageModel;
this.pageModel = pageModel
this.$nextTick(() => {
this.searchHandle()
});
})
},
//dialog
async onSubmitHandele() {
@ -369,13 +475,13 @@ export default {
params.data[item.name] = item.tableData.slice(0, -1)
})
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "saveMdmShowDetailsData",
tl: 'mdmService',
as: 'mdmService',
dj: 'saveMdmShowDetailsData'
}, params)
if (res.status === '200') {
this.initTree(this.treeObj.label, this.treeObj.upId)
this.$vmNews("新建成功", "success")
this.$vmNews('新建成功', 'success')
this.searchHandle()
this.dialogShow = false
}
@ -390,13 +496,13 @@ export default {
params.data[item.name] = item.tableData.slice(0, -1)
})
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "updateMdmShowDetailsData",
tl: 'mdmService',
as: 'mdmService',
dj: 'updateMdmShowDetailsData'
}, params)
if (res.status === '200') {
this.initTree(this.treeObj.label, this.treeObj.upId)
this.$vmNews("修改成功", "success")
this.$vmNews('修改成功', 'success')
this.searchHandle()
this.dialogShow = false
}
@ -404,24 +510,24 @@ export default {
},
dialogTableAddHandle(info, index) {
this.dialogTabaleInfo[index].tableData.push({});
this.dialogTabaleInfo[index].tableData.push({})
},
dialogTableDeleHandle(row, item, tableInfo, index) {
if (item.type === "dele") {
this.$confirm("是否删除此行?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
if (item.type === 'dele') {
this.$confirm('是否删除此行?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.dialogTabaleInfo[index].tableData.splice(row.index, 1);
this.dialogTabaleInfo[index].tableData.splice(row.index, 1)
this.$message({
type: "success",
message: "删除成功!",
});
type: 'success',
message: '删除成功!'
})
})
.catch((error) => {
});
})
}
},
//dialog
@ -434,17 +540,17 @@ export default {
this.newFlag = true
this.lookFlag = false
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDetails"
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowDetails'
}, {
mdmCode: this.$route.meta.mdmCode,
showType: "3"
showType: '3'
})
//
res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === "required" || ele.ruleCode === "disabled") {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) {
item[ele.ruleCode] = false
} else {
@ -459,12 +565,13 @@ export default {
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
this.formRow = []
this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow)
console.log(this.formRow, 'this.formRow')
//
this.dialogTabaleInfo = []
res.attribute.sublistMdmModuleDb.forEach(table => {
table.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === "required" || ele.ruleCode === "disabled") {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) {
item[ele.ruleCode] = false
} else {
@ -483,28 +590,33 @@ export default {
tableData: [{}],
detailFields: deepClone(table.sublistMdmModuleDbFileds),
title: table.remark,
name: table.dbName,
name: table.dbName
}
this.dialogTabaleInfo.push({...tempObj})
this.dialogTabaleInfo.push({ ...tempObj })
})
this.dialogShow = true
},
searchHandle() {
let tempSearch = JSON.parse(JSON.stringify(this.searchForm))
Object.keys(tempSearch).forEach((key) => {
tempSearch[key.split('.')[1]] = tempSearch[key]
})
console.log(tempSearch, 'tempSearch')
let obj = {}
this.searchFormRow.forEach(item => {
item.elCol.forEach(ele => {
if (this.searchForm[ele.enName]) {
if (this.searchForm[ele.id]) {
if (obj[ele.dbName]) {
obj[ele.dbName].push({
fields: ele.enName,
fieldsType: ele.filedType,
values: this.searchForm[ele.enName]
values: this.searchForm[ele.id]
})
} else {
obj[ele.dbName] = [{
fields: ele.enName,
fieldsType: ele.filedType,
values: this.searchForm[ele.enName]
values: this.searchForm[ele.id]
}]
}
}
@ -512,7 +624,7 @@ export default {
})
let params = {
queryCondition: [],
detailQueryCondition: [],
detailQueryCondition: []
}
Object.keys(obj).forEach(key => {
if (key === this.mainTableName) {
@ -527,7 +639,7 @@ export default {
})
if (this.treeActiveRow.id) {
let obj = {
fields: "id",
fields: 'id',
values: this.treeActiveRow.arrId,
fieldsType: '5'
}
@ -541,16 +653,16 @@ export default {
this.lookFlag = false
//
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDetails"
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowDetails'
}, {
mdmCode: this.$route.meta.mdmCode,
showType: "4"
showType: '4'
})
res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === "required" || ele.ruleCode === "disabled") {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) {
item[ele.ruleCode] = false
} else {
@ -560,7 +672,6 @@ export default {
item[ele.ruleCode] = ele.ruleValue
}
item['id'] = item.enName
})
}
@ -568,6 +679,7 @@ export default {
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
this.formRow = []
this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow)
console.log(this.formRow, 'formRow')
//
this.dialogTabaleInfo = []
res.attribute.sublistMdmModuleDb.forEach(table => {
@ -583,21 +695,25 @@ export default {
tableData: [{}],
detailFields: deepClone(table.sublistMdmModuleDbFileds),
title: table.remark,
name: table.dbName,
name: table.dbName
}
this.dialogTabaleInfo.push({...tempObj})
this.dialogTabaleInfo.push({ ...tempObj })
})
//
const data = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDetailsData",
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowDetailsData'
}, {
mdmCode: this.$route.meta.mdmCode,
id: id
})
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]
@ -612,16 +728,16 @@ export default {
this.lookFlag = true
//
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDetails"
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowDetails'
}, {
mdmCode: this.$route.meta.mdmCode,
showType: "5"
showType: '5'
})
res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === "required" || ele.ruleCode === "disabled") {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) {
item[ele.ruleCode] = false
} else {
@ -651,15 +767,16 @@ export default {
tableData: [{}],
detailFields: deepClone(table.sublistMdmModuleDbFileds),
title: table.remark,
name: table.dbName,
name: table.dbName
}
this.dialogTabaleInfo.push({...tempObj})
this.dialogTabaleInfo.push({ ...tempObj })
})
console.log(this.dialogTabaleInfo, 'dialogTabaleInfo')
//
const data = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDetailsData",
tl: 'mdmService',
as: 'mdmService',
dj: 'queryMdmShowDetailsData'
}, {
mdmCode: this.$route.meta.mdmCode,
id: id
@ -670,6 +787,7 @@ export default {
table.tableData = []
table.tableData = data.attribute[table.name] || []
})
console.log(this.dialogTabaleInfo, 'dialogTabaleInfo')
}
this.dialogShow = true
}
@ -677,15 +795,15 @@ export default {
//
async deleRowHanlde(id) {
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "deleteMdmShowDetailsData",
tl: 'mdmService',
as: 'mdmService',
dj: 'deleteMdmShowDetailsData'
}, {
mdmCode: this.$route.meta.mdmCode,
id: id
})
if (res.status === '200') {
this.$vmNews("删除成功!", "success")
this.$vmNews('删除成功!', 'success')
this.searchHandle()
this.initTree(this.treeObj.label, this.treeObj.upId)
}
@ -697,14 +815,14 @@ export default {
if (data.children) {
this.treeIdHandle(data.children, arrId)
}
this.pageModel.pageIndex = 1;
this.pageModel.total = 0;
this.pageModel.limit = 10;
this.searchForm = {};
this.tableData = [];
this.lookFlag = false;
this.newFlag = false;
this.treeActiveRow = {...data, arrId: arrId}
this.pageModel.pageIndex = 1
this.pageModel.total = 0
this.pageModel.limit = 10
this.searchForm = {}
this.tableData = []
this.lookFlag = false
this.newFlag = false
this.treeActiveRow = { ...data, arrId: arrId }
this.searchHandle()
}
,
@ -719,26 +837,32 @@ export default {
},
//
async sendHandle(id) {
console.log(id)
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "queryMdmShowDistribute"
tl: 'mdmModuleService',
as: '',
dj: 'queryMdmDistributeByMdmCode'
}, {
mdmCode: this.$route.meta.mdmCode,
id: id
'enabledState': '1',//
'enabledType': '0'//
})
this.sendTableData = res.attribute
console.log(this.sendTableData, 'this.sendTableData')
this.sendTableData.forEach(item => {
this.$set(item, 'rowId', id)
this.appSearch(item.appId, item)
})
this.rowId = id
this.sendCheckboxType = ''
this.sendCheckboxList = ''
this.sendShow = true
},
//
async appSearch(id, row) {
const res = await getUserModuleApi({
tl: "sysApplicationService",
as: "application",
tl: 'sysApplicationService',
as: 'application',
dj: 'getApp'
}, {
id: id
@ -747,25 +871,29 @@ export default {
},
//dialog
async sendRowHandle(row) {
let status = row.status === '1' ? 1 : 2
if (row.status === '2') {
this.$vmNews("发送中,请等待发送完成,再删除", 'warning')
return
}
console.log(row)
// let status = row.status === '1' ? 1 : 2
// if (row.status === '2') {
// this.$vmNews('', 'warning')
// return
// }
// console.log(row)
const res = await getUserModuleApi({
tl: "mdmService",
as: "mdmService",
dj: "doMdmDistribute",
tl: 'mdmService',
as: '',
dj: 'doMdmDistribute'
}, {
mdmCode: this.$route.meta.mdmCode,
appID: row.appId,
id: row.rowId,
dataType: status
id: this.rowId,
distributeId: this.sendCheckboxList,
type: this.sendCheckboxType
})
this.$vmNews(`${res.msg}`, 'success')
this.sendHandle(row.rowId)
},
this.sendCheckboxList = ''
this.sendCheckboxType = ''
this.sendShow = false
this.rowId = ''
// this.sendHandle(row.rowId)
}
},
created() {
this.init()
@ -782,9 +910,9 @@ export default {
,
computed: {
funWidth() {
return this.mainFunData.length * 70;
return this.mainFunData.length * 70
}
,
}
,
watch: {

View File

@ -252,7 +252,7 @@ export default {
journalingType: this.journalingType,
apiName: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,

View File

@ -245,7 +245,7 @@ export default {
},
{
pageNum: index,
pageSize: 10,
pageSize: 100,
...obj,
}
);

View File

@ -230,6 +230,7 @@ export default {
},
},
methods: {
//
clickFirst() {
document.querySelectorAll(".is-focusable")[0].click();
},
@ -374,7 +375,6 @@ export default {
},
//
handleNodeClick(data,b,c) {
console.log(data,b,c)
this.$emit("handleNodeClick", data);
},
},

View File

@ -824,7 +824,8 @@ export default {
color: #999;
font-size: 13px;
display: block;
width: 180px;
min-width: 80px;
max-width: 180px;
// text-align: left;
}

View File

@ -253,7 +253,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,

View File

@ -1,371 +1,235 @@
<template>
<div>
<base-layout ref="baseLayout" :buttonList="buttonList" @onFuncBtn="onFuncBtn" :querySwitch="true"
:searchBtnList="searchBtnList" :searchList="requirementList" @search="handleSearchEvent" :isPage="true"
@pageChange="handlePageChange" @onFuncSearchBtn="onFuncSearchBtn">
<div slot="main" slot-scope="{ tableHeight }">
<base-table ref="baseTable" :showIndex="true" :funWidth="300" :funData="funData" @onFunc="onFunc"
:tabLoading.sync="tabLoading" :tableHeight="tableHeight" :tableData="tableData"
:fixedTable="'right'" :tableColumn="tableColumnData" :showSelect="true">
<template v-slot:new_state="{ row }">
<div style="width: 100%">
<span v-if="row.new_state == 'Y'" style="color: #67c23a">成功</span>
<span v-else-if="row.new_state == 'H'" style="color: #67c23a">已处理</span>
<span v-else style="color: #f56c6c">失败</span>
</div>
</template>
</base-table>
</div>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
</div>
</template>
<script>
import baseLayout from "@/components/base/baseLayout";
import baseTable from "@/components/base/baseTable";
import rightDialog from "./rightDialog";
import configData from "./configData";
import {
authApi
} from "@/api/apis/auth";
import { option } from "@/api/apis/detailData"
export default
{
components: {
baseLayout,
baseTable,
rightDialog,
},
data() {
return {
buttonList: [
{
menuName: "刷新",
icon: "el-icon-refresh",
btnFunction: "resetLoad",
},
], //
searchBtnList: [
{
name: "批量推送",
btnFunction: "batchPush",
},
], //
requirementList: [
{
placeholder: "任务名称",
prop: "plugin_id",
tag: "elSelect",
options: [],
optionValue: "pluginId",
optionLabel: "pluginName",
},
{
placeholder: "源系统编码",
prop: "root_app_bill",
tag: "elInput",
},
{
placeholder: "推送时间",
prop: "new_push_date",
tag: "elDatePicker",
valueFormat: "yyyy-MM-dd",
},
{
placeholder: "业务⽇期",
prop: "business_date",
tag: "elDatePicker",
valueFormat: "yyyy-MM-dd",
},
{
placeholder: "下游系统单号",
prop: "new_system_number",
tag: "elInput",
},
{
placeholder: "推送状态",
prop: "new_state",
tag: "elRadio",
options: [
{ label: "全部", value: "" },
{ label: "成功", value: "Y" },
{ label: "已处理", value: "H" },
{ label: "失败", value: "N" },
],
},
], //list
tabLoading: false,
tableColumnData: configData.tableColumnData, //
funData: [
{
color: "#6a9af1",
text: "查看",
},
{
color: "#6a9af1",
text: "重新推送",
},
{
color: "#6a9af1",
text: "手工处理",
},
{
color: "#d67a74",
text: "删除",
},
],
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
},
queryModel: {
plugin_id: '',
root_app_bill: '',
new_push_date: '',
business_date: '',
new_system_number: '',
new_state: 'N'
},
};
},
mounted() {
this.$refs.baseLayout.getField("new_state", "N");
this.queryProductClassfy();
this.GetProductionTableData();
},
methods: {
//
async GetProductionTableData() {
this.tabLoading = true;
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "queryPage",
}, {
...this.pageModel,
...this.queryModel
})
this.tabLoading = false;
if (res.status == "200") {
this.tableData = res.attribute.list;
this.$refs.baseTable.setTableKey()
this.$refs.baseLayout.setPageTotal(res.attribute.total);
}
},
async queryProductClassfy() {
const res = await option({
tl: "pluginService",
as: "plugins",
dj: "queryPlugins",
}, {})
if (res.status == "200") {
this.requirementList[0].options = res.attribute;
}
},
//
handleSearchEvent() {
let data = this.$refs.baseLayout.ruleForm;
this.queryModel.plugin_id = data.plugin_id;
this.queryModel.root_app_bill = data.root_app_bill;
this.queryModel.new_push_date = data.new_push_date;
this.queryModel.business_date = data.business_date;
this.queryModel.new_system_number = data.new_system_number;
this.queryModel.new_state = data.new_state;
this.resetTable();
},
//
async batchPush() {
let data = ''
this.$refs.baseTable.$refs.elTable.selection.forEach(el => {
if (data == '') {
data = el.id
} else {
data += `,${el.id}`
}
});
if (data.length > 0) {
this.$confirm("确认重新推送吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("submit");
this.rePushBatch(data)
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
} else {
this.$vmNews("请选择需要推送的单据", "warning");
}
},
async rePushBatch(data) {
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "batchPush",
}, {
id: data
})
if (res.status == "200") {
this.$vmNews("批量推送成功", "success");
this.resetTable();
}
},
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex;
this.pageModel.pageSize = val.pageSize;
this.GetProductionTableData();
},
//
onFuncBtn(btn) {
this[btn.btnFunction]();
},
//
onFuncSearchBtn(btn) {
this[btn.btnFunction]();
},
//
add() {
this.$refs.rightDialog.openDialog("add");
},
//
async onFunc(index, row) {
//
if (index == 0) {
this.openLoading("detail");
this.$refs.rightDialog.openDialog("show", row);
}
//
if (index == 1) {
this.$confirm("确认重新推送吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("submit");
this.handleRePush(row);
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
}
//
if (index == 2) {
this.$prompt("请填写旺店通或者NC的单据号方便以后排查", "提示", {
confirmButtonText: "提交",
cancelButtonText: "取消",
inputType: "textarea",
inputValidator: (value) => {
if (!value) {
return "请输入处理内容";
}
},
})
.then(({ value }) => {
this.openLoading("submit");
let params =
{
id: row.id,
processing_remarks: value,
}
;
this.updateManualProcess(params);
})
.catch(() => {
this.$message({
type: "info",
message: "取消操作",
});
});
}
//
if (index == 3) {
this.$confirm("确认删除该内容吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.openLoading("del");
this.productionDeleteById(row.id);
})
.catch(() => {
this.$vmNews("取消操作", "info");
});
}
},
async handleRePush(row) {
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "repush",
}, {
id: row.id
})
if (res.status == "200") {
this.$vmNews("补推成功", "success");
this.resetTable();
} else if (res.status == "500") {
this.$message({
title: "补推失败",
showClose: true,
message: res.msg,
duration: 0,
type: "error",
});
this.resetTable();
}
},
async updateManualProcess(val) {
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "manualProcessing",
}, val)
if (res.status == "200") {
this.$vmNews("手工处理成功", "success");
this.resetTable();
}
},
async productionDeleteById(id) {
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "deleteEntity",
}, {
id
})
if (res.status == "200") {
this.$vmNews("删除成功", "success");
this.resetTable();
}
},
//
resetTable() {
this.pageModel.pageNum = 1;
this.$refs.baseLayout.pageClear();
this.GetProductionTableData();
},
},
};
</script>
<style scoped>
.clickTitle {
color: #409eff;
cursor: pointer;
}
::v-deep .searchBox:nth-child(6) {
width: 250px !important;
}
</style>
<template>
<div>
<base-layout
ref="baseLayout"
:buttonList="buttonList"
@onFuncBtn="onFuncBtn"
:querySwitch="true"
:searchList="requirementList"
@search="handleSearchEvent"
:isPage="true"
@pageChange="handlePageChange"
>
<div slot="main" slot-scope="{ tableHeight }">
<base-table
ref="baseTable"
:showIndex="true"
:funWidth="180"
:funData="funData"
@onFunc="onFunc"
:tabLoading.sync="tabLoading"
:tableHeight="tableHeight"
:tableData="tableData"
:tableColumn="tableColumnData"
>
<template #taskStatus="{row}">
{{ taskStatusDist[row.taskStatus] }}
</template>
</base-table>
</div>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
</div>
</template>
<script>
import baseLayout from '@/components/base/baseLayout'
import baseTable from '@/components/base/baseTable'
import rightDialog from './rightDialog.vue'
import { authApi } from '@/api/apis/auth'
export default {
components: {
baseLayout,
baseTable,
rightDialog
},
data() {
return {
buttonList: [
{
menuName: '刷新',
icon: 'el-icon-refresh',
btnFunction: 'resetLoad'
}
], //
requirementList: [
{
placeholder: '任务名称',
prop: 'taskName',
tag: 'elInput'
}
], //list
tabLoading: false,
tableColumnData: [
{
prop: 'taskName',
label: '任务名称'
},
{
prop: 'taskCode',
label: '任务编码'
},
{
prop: 'taskStatus',
label: '任务状态'
},
{
prop: 'startTime',
label: '当前任务开始时间'
},
{
prop: 'endTime',
label: '结束时间'
},
{
prop: 'diffTime',
label: '耗时'
}
], //
funData: [
{
color: '#6a9af1',
text: '查看'
}
],
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 100
},
queryModel: {
code: '',
name: '',
classify: '',
productionCompany: ''
},
taskStatusDist: {
1: '执行中',
2: '执行成功',
3: '执行失败'
}
}
},
mounted() {
// this.queryProductClassfy();
this.GetProductionTableData()
},
methods: {
onCellClick(row) {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('show', row)
},
//
async GetProductionTableData() {
this.tabLoading = true
let param = {
...this.pageModel,
...this.queryModel
}
let res = await authApi(
'integrationTaskLogService',
'',
'queryEntityPage',
'',
param
)
this.tabLoading = false
if (res.status == '200') {
this.tableData = res.attribute.list
this.$refs.baseLayout.setPageTotal(res.attribute.total)
}
},
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex
this.pageModel.pageSize = val.pageSize
this.GetProductionTableData()
},
//
onFuncBtn(btn) {
this.onCellClick()
// this[btn.btnFunction]()
},
//
add() {
this.$refs.rightDialog.openDialog('add')
},
//
onFunc(index, row, item) {
//
if (item.text === '查看') {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('show', row)
}
//
if (item.text === '编辑') {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('edit', row)
}
//
if (item.text === '删除') {
this.$delConfirm().then(() => {
this.openLoading('del')
this.productionDeleteById(row.id)
})
}
},
async productionDeleteById(id) {
let param = {
id: id
}
let res = await authApi(
'sysPlugArgService',
'integrationTaskService',
'deletePlugArg',
'',
param
)
if (res.status == '200') {
this.$vmNews('删除成功', 'success')
this.resetTable()
}
},
//
resetTable() {
this.pageModel.pageNum = 1
this.$refs.baseLayout.pageClear()
this.GetProductionTableData()
},
//
handleSearchEvent() {
let data = this.$refs.baseLayout.ruleForm
this.queryModel = data
this.resetTable()
},
//
async queryProductClassfy() {
let params = {
tab_name: 'sys_product',
column_name: 'classify'
}
let res = await authApi(
'generalServiceImpl',
'dictionaryshop',
'selectDictionaryshop',
'',
params
)
if (res.status == '200') {
this.requirementList[2].options = res.attribute
}
}
}
}
</script>
<style scoped>
.clickTitle {
color: #409eff;
cursor: pointer;
}
</style>

View File

@ -1,264 +1,452 @@
<template>
<div>
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成产品清单'" @handleClose="handleDialogClose" :type="dialogType" :submitShow="submitShow"
@handleConfirmClick="handleConfirmClick">
<base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="basicsRules" class="dialog_form"
:spanWidth="`120px`" :loading="vLoading"></base-form>
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import configData from "./configData";
import { authApi } from "@/api/apis/auth";
import { option } from "@/api/apis/detailData"
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
formRow: configData.formRow,
basicsRules: configData.basicsRules,
vLoading: false,
newMarryOptions: [],
submitShow: true,
loadingType: true,
tableVersionData: [],
tableVersionColumn: configData.tableVersionColumn,
funData: [],
isEdit: false
};
},
mounted() { },
methods: {
openDialog(type, row) {
// this.queryProductClassfy();
this.formRow = configData.formRow;
this.submitShow = true;
this.isEdit = false
this.funData = [
{
color: "#ff0000",
text: "删除",
}
]
//
if (type == "add") {
this.dialogTitle = "新增";
this.dialogType = "add";
}
//
if (type == "edit") {
this.isEdit = true
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.productGetById(row.id);
}
//
if (type == "show") {
this.funData = Object.assign([], [])
this.submitShow = false;
this.formRow = configData.formRowShow;
this.dialogTitle = "查看";
this.dialogType = "show";
this.productGetById(row.id);
}
this.dialogVisible = true;
},
async productGetById(id) {
this.openLoading("detail");
const res = await option({
tl: "integration_task_living_detailsService",
as: "integrationTaskLog",
dj: "queryEntity",
}, {
id
})
if (res.status == '200') {
this.$refs.basicsForm.incomingParameters(res.attribute);
}
},
//
// async productGetById(id) {
// let params = {
// id: id,
// };
// let res = await authApi(
// "sysProductService",
// "product",
// "queryProduct",
// "",
// params
// );
// if (res.status == "200") {
// this.$nextTick(() => {
// this.$refs.basicsForm.incomingParameters(res.attribute);
// let result = [];
// if (res.attribute.sysProductVersionList.length > 0) {
// res.attribute.sysProductVersionList.forEach((item) => {
// let obj = {
// id: item.id,
// versionNumber: item.versionNumber,
// versionDescription: item.versionDescription,
// disabled: true
// };
// result.push(obj);
// });
// }
// this.tableVersionData = Object.assign([], result);
// });
// }
// },
addVersionDialog() {
let obj = {
id: new Date().getTime().toString(),
versionNumber: "",
versionDescription: "",
disabled: false
};
this.tableVersionData.push(obj);
},
//
onFunc(index, row) {
if (index == 0) {
this.$delConfirm().then(() => {
this.tableVersionData.forEach((item, itemIndex) => {
if (item.id === row.id) {
this.tableVersionData.splice(itemIndex, 1);
}
});
});
}
},
//
handleDialogClose() {
this.tableVersionData = Object.assign([], []);
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
if (!valid) {
return;
} else {
let params = {
...this.$refs.basicsForm.ruleForm,
sysProductVersionList: [],
};
let result = [];
if (this.tableVersionData.length > 0) {
this.tableVersionData.forEach((item) => {
let obj = {
versionNumber: item.versionNumber,
versionDescription: item.versionDescription,
};
result.push(obj);
});
}
params.sysProductVersionList = Object.assign([], result);
if (this.dialogType == "add") {
this.openLoading("submit");
this.productSaveDto(params);
}
if (this.dialogType == "edit") {
this.openLoading("submit");
this.productUpdateDto(params);
}
}
});
},
//
async productSaveDto(params) {
let res = await authApi(
"sysProductService",
"product",
"addProduct",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("新增成功", "success");
this.$emit("resetTable");
}
},
//
async productUpdateDto(params) {
let res = await authApi(
"sysProductService",
"product",
"updateProduct",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
}
},
//
async queryProductClassfy() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
let res = await authApi(
"generalServiceImpl",
"dictionaryshop",
"selectDictionaryshop",
"",
params
);
if (res.status == "200") {
this.formRow[1].elCol[0].options = res.attribute;
}
},
},
};
</script>
<style scoped lang="scss">
.dialogList {
padding: 16px 0;
border-top: 1px solid #dcdfe6;
display: flex;
flex-direction: column;
}
.updateBtn {
border: 1px solid #ebedf1;
padding: 5px 0;
border-radius: 3px;
text-align: center;
font-size: 14px;
cursor: pointer;
width: 100px;
}
.updateBtn:hover {
color: #1890ff;
border-color: #badeff;
background-color: #e8f4ff;
}
::v-deep .el-table__body-wrapper.is-scrolling-none {
height: auto !important;
}
::v-deep .app-container {
height: auto !important;
}
</style>
<template>
<div>
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成任务日志'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
@handleConfirmClick="handleConfirmClick"
>
<base-form
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
@onSelect="onSelect"
></base-form>
<!-- <el-button-->
<!-- style="width: 125px; margin: 20px 0"-->
<!-- @click="addVersionDialog"-->
<!-- icon="el-icon-plus"-->
<!-- :disabled="submitShow ? false : true"-->
<!-- v-if="submitShow"-->
<!-- >添加</el-button-->
<!-- >-->
<!-- <base-table-->
<!-- :border="true"-->
<!-- :showIndex="true"-->
<!-- :tableColumn="tableVersionColumn"-->
<!-- :tableData="tableVersionData"-->
<!-- :funWidth="80"-->
<!-- :funData="funData"-->
<!-- @onFunc="onFunc"-->
<!-- >-->
<!-- <template v-slot:argName="{ row }" >-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argName"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow || row.disabled"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argCode="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">-->
<!-- {{ row.argCode }}-->
<!-- </template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argCode"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argType="{ row }">-->
<!-- <div style="width: 100%">-->
<!--&lt;!&ndash; <el-radio-group v-model="row.argType" :disabled="!submitShow">&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="1">字符串</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="2">日期</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; </el-radio-group>&ndash;&gt;-->
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:remark="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
<!-- <el-input-->
<!-- v-model="row.remark"-->
<!-- clearable-->
<!-- type="text"-->
<!-- v-else-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- </base-table>-->
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from '@/components/base/baseNewForm'
import baseTable from '@/components/base/baseTable'
import { authApi } from '@/api/apis/auth'
export default {
components: {
baseRightDialog,
baseForm,
baseTable
},
data() {
return {
dialogVisible: false,
dialogTitle: '',
dialogType: '',
formRow: [],
basicsRules: [],
vLoading: false,
newMarryOptions: [],
submitShow: true,
loadingType: true,
tableVersionData: [],
tableVersionColumn: [],
funData: [],
isEdit: false,
select_dist: {},
options: [
{
label: '字符串',
value: '1'
},
{
label: '日期范围选择',
value: '2'
},
{
label: '年月',
value: '3'
},
{
label: '年月日',
value: '4'
},
{
label: '年月日时间',
value: '5'
}
]
}
},
mounted() {
this.initSelect()
},
methods: {
//
async initSelect() {
let res = await authApi(
'pluginService',
'plugins',
'queryPluginsByType',
'',
{
'pluginType': '1'
}
)
if (res.status == 200) {
console.log(res.attribute)
res.attribute.forEach(item => {
this.$set(this.select_dist, item.pluginId, item)
})
this.formRow[0].elCol[0].options = res.attribute
}
},
//
onSelect(val, index, indexRow, obj) {
this.$set(this.$refs.basicsForm.ruleForm, 'plugName', this.select_dist[val]['pluginName'])
},
openDialog(type, row) {
// this.queryProductClassfy();
this.formRow = []
this.submitShow = true
this.isEdit = false
this.funData = [
{
color: '#ff0000',
text: '删除'
}
]
//
if (type == 'add') {
this.dialogTitle = '新增'
this.dialogType = 'add'
}
//
if (type == 'edit') {
this.isEdit = true
this.dialogTitle = '编辑'
this.dialogType = 'edit'
this.productGetById(row.id)
}
//
if (type == 'show') {
this.funData = Object.assign([], [])
this.submitShow = false
this.formRow = [
{
elCol: [
{
label: '任务编码',
prop: 'taskCode',
tag: 'elInput',
disabled: true
},
{
label: '任务名称',
prop: 'taskName',
tag: 'elInput',
disabled: true
}
]
},
{
elCol: [
{
label: '任务状态',
prop: 'taskStatus',
tag: 'elRadio',
disabled: true,
options: [
{
label: '执行中',
value: '1'
},
{
label: '执行成功',
value: '2'
},
{
label: '执行失败',
value: '3'
}
],
span: 24
}
]
},
{
elCol: [
{
label: '当前任务开始时间',
prop: 'startTime',
tag: 'elInput',
disabled: true
},
{
label: '结束时间',
prop: 'endTime',
tag: 'elInput',
disabled: true
}
]
},
{
elCol: [
{
label: '耗时',
prop: 'diffTime',
tag: 'elInput',
disabled: true
},
{
label: '备注',
prop: 'remark',
tag: 'elInput',
disabled: true
}
]
}
]
this.dialogTitle = '查看'
this.dialogType = 'show'
this.productGetById(row.id)
}
this.dialogVisible = true
},
//
async productGetById(id) {
let params = {
id: id
}
let res = await authApi(
'integrationTaskLogService',
'',
'getEntity',
'',
params
)
if (res.status == '200') {
this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute)
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
// let result = [];
// this.tableVersionData = Object.assign([], result);
})
}
},
addVersionDialog() {
let obj = {
argName: '',
argCode: '',
argType: '1',
remark: ''
}
this.tableVersionData.push(obj)
},
//
onFunc(index, row) {
if (index == 0) {
this.$delConfirm().then(() => {
this.tableVersionData.forEach((item, itemIndex) => {
if (item.id === row.id) {
this.tableVersionData.splice(itemIndex, 1)
}
})
})
}
},
//
handleDialogClose() {
this.tableVersionData = Object.assign([], [])
this.$refs.basicsForm.resetFields()
this.dialogVisible = false
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
if (!valid) {
return
} else {
if (!this.tableVersionData.length) {
this.$vmNews('请添加列表')
return
}
let flag = this.tableVersionData.some(item => {
if (!item.argName) {
this.$vmNews('请输入参数名称')
return true
}
if (!item.argCode) {
this.$vmNews('参数编码')
return true
}
})
if (flag) return
let params = {
...this.$refs.basicsForm.ruleForm,
sysPlugArgDetailEntityList: this.tableVersionData
}
if (this.dialogType == 'add') {
this.openLoading('submit')
this.productSaveDto(params)
}
if (this.dialogType == 'edit') {
this.openLoading('submit')
this.productUpdateDto(params)
}
}
})
},
//
async productSaveDto(params) {
let res = await authApi(
'sysPlugArgService',
'integrationTaskService',
'savePlugArg',
'',
params
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('新增成功', 'success')
this.$emit('resetTable')
}
},
//
async productUpdateDto(params) {
let res = await authApi(
'sysPlugArgService',
'integrationTaskService',
'updatePlugArg',
'',
params
)
if (res.status == '200') {
this.handleDialogClose()
this.$vmNews('更新成功', 'success')
this.$emit('resetTable')
}
},
//
async queryProductClassfy() {
let params = {
tab_name: 'sys_product',
column_name: 'classify'
}
let res = await authApi(
'generalServiceImpl',
'dictionaryshop',
'selectDictionaryshop',
'',
params
)
if (res.status == '200') {
this.formRow[1].elCol[0].options = res.attribute
}
}
}
}
</script>
<style scoped lang="scss">
.dialogList {
padding: 16px 0;
border-top: 1px solid #dcdfe6;
display: flex;
flex-direction: column;
}
.updateBtn {
border: 1px solid #ebedf1;
padding: 5px 0;
border-radius: 3px;
text-align: center;
font-size: 14px;
cursor: pointer;
width: 100px;
}
.updateBtn:hover {
color: #1890ff;
border-color: #badeff;
background-color: #e8f4ff;
}
::v-deep .el-table__body-wrapper.is-scrolling-none {
height: auto !important;
}
::v-deep .app-container {
height: auto !important;
}
</style>

View File

@ -2,32 +2,32 @@
<div class="wraaap">
<div class="left">
<BaseMenuTree
:menuData="treeData"
:filterShow="true"
:Allshow="false"
:treeButton="true"
:filterButtonShow="true"
style="height: 100%"
:treeProps="treeProps"
@handleNodeClick="homeHandleNodeClick"
ref="menuTree"
@add="treeAddHandle"
@append="treeAppendHandle"
@revise="treeReviseHandle"
@remove="treeRemoveHandle"
:menuData="treeData"
:filterShow="true"
:Allshow="false"
:treeButton="false"
:filterButtonShow="false"
style="height: 100%"
:treeProps="treeProps"
@handleNodeClick="homeHandleNodeClick"
ref="menuTree"
@add="treeAddHandle"
@append="treeAppendHandle"
@revise="treeReviseHandle"
@remove="treeRemoveHandle"
></BaseMenuTree>
</div>
<div class="right">
<header style="background: #fff; padding: 20px">
<div class="search">
<BaseNewForm
:spanNumber="8"
refName="searchForm"
:formRow="SearchformRow"
:formRule="false"
:ruleForm="searchForm"
:newFlag="true"
:isFunBtn="false"
:spanNumber="8"
refName="searchForm"
:formRow="SearchformRow"
:formRule="false"
:ruleForm="searchForm"
:newFlag="true"
:isFunBtn="false"
></BaseNewForm>
</div>
<div class="btn">
@ -41,39 +41,46 @@
</div>
<div>
<BaseTable
ref="mainTable"
:tableData="tableData"
:tableColumn="tableColumn"
:funData="funData"
:funWidth="funWidth"
:showIndex="true"
:tabLoading="mainTabLoading"
@onFunc="tableButtonHandle"
:tableHeight="'60vh'"
:border="false"
></BaseTable>
ref="mainTable"
:tableData="tableData"
:tableColumn="tableColumn"
:funData="funData"
:funWidth="funWidth"
:showIndex="true"
:tabLoading="mainTabLoading"
@onFunc="tableButtonHandle"
:tableHeight="'53vh'"
:border="false"
>
<template #taskStatus="{row}">
{{ row.taskStatus == 1 ? '启用' : '停用' }}
</template>
<template #taskPlugin="{row}">
{{ pluginDist[row.taskPlugin] }}
</template>
</BaseTable>
</div>
</main>
<footer>
<basePage
:pageModel="pageModel"
@update:pageModel="currentChangeHandle"
:pageModel="pageModel"
@update:pageModel="currentChangeHandle"
></basePage>
</footer>
</div>
<baseRightDialog
@handleConfirmClick="handleConfirmClick"
:dialogVisible="rightDialogSwitch"
:title="treeTitle"
@handleClose="rightDialogSwitch = false"
@handleConfirmClick="handleConfirmClick"
:dialogVisible="rightDialogSwitch"
:title="treeTitle"
@handleClose="rightDialogSwitch = false"
>
<div class="treeChunk" v-if="treeRuleForm.class_superiors_name">
<div class="text">上级节点</div>
<div class="input">
<el-input
:disabled="true"
v-model="treeRuleForm.class_superiors_name"
placeholder=""
:disabled="true"
v-model="treeRuleForm.class_superiors_name"
placeholder=""
></el-input>
</div>
</div>
@ -81,8 +88,8 @@
<div class="text">节点名</div>
<div class="input">
<el-input
v-model="treeRuleForm.class_name"
placeholder="请输入节点名"
v-model="treeRuleForm.class_name"
placeholder="请输入节点名"
></el-input>
</div>
</div>
@ -91,12 +98,14 @@
</template>
<script>
import basePage from "./compoments/basePage.vue";
import BaseMenuTree from "./compoments/baseMenuTree";
import BaseNewForm from "./compoments/baseNewForm";
import BaseTable from "./compoments/baseTable";
import { getUserModuleApi } from "@/api/integrationOption/integrationOption.js";
import baseRightDialog from "@/components/base/baseRightDialog";
import basePage from './compoments/basePage.vue'
import BaseMenuTree from './compoments/baseMenuTree'
import BaseNewForm from './compoments/baseNewForm'
import BaseTable from './compoments/baseTable'
import { getUserModuleApi } from '@/api/integrationOption/integrationOption.js'
import baseRightDialog from '@/components/base/baseRightDialog'
import { authApi } from '@/api/apis/auth'
export default {
data() {
return {
@ -107,326 +116,394 @@ export default {
//
pageIndex: 1,
total: 10,
limit: 10,
limit: 10
},
mainTabLoading: false, //loding
treeData: [
//
{
label: "测试",
label: '测试',
id: 1,
children: [
{
id: 3,
label: "哈哈",
},
],
},
label: '哈哈'
}
]
}
],
treeForm: { class_name: "", class_superiors: "", class_code: "" },
treeForm: { class_name: '', class_superiors: '', class_code: '' },
searchForm: {}, //
SearchformRow: [
//
{
elCol: [
{
type: "input",
title: "任务编码",
id: "task_code",
row: 8,
type: 'input',
title: '任务编码',
id: 'taskCode',
row: 8
},
{
type: "input",
title: "任务名称",
id: "task_name",
row: 8,
type: 'input',
title: '任务名称',
id: 'taskName',
row: 8
},
],
},
{
type: 'radio',
title: '任务状态',
id: 'taskStatus',
row: 8,
options: [
{
label: '启用',
id: '1'
},
{
label: '停用',
id: '2'
}
]
}
]
}
,
{
elCol: [
{
type: 'select',
title: '插件',
id: 'taskPlugin',
row: 8,
options: []
}
]
}
],
funData: [
//table
{
type: "edit",
text: "编辑",
color: "#5a9cf8",
type: 'edit',
text: '编辑',
color: '#5a9cf8'
},
{
type: "view",
text: "查看",
color: "#5a9cf8",
type: 'view',
text: '查看',
color: '#5a9cf8'
},
{
type: "dele",
text: "删除",
color: "#e47470",
type: 'start',
text: '启用',
color: '#5a9cf8'
},
{
type: 'stop',
text: '停用',
color: '#e47470'
},
{
type: 'dele',
text: '删除',
color: '#e47470'
}
],
tableData: [{ taskCode: "测试", taskName: "123" }], //table
tableData: [], //table
tableColumn: [
//
{
id: "task_code",
title: "任务编码",
id: 'taskName',
title: '任务名称'
},
{
id: "task_name",
title: "任务名称",
id: 'taskCode',
title: '任务编码'
},
{
id: "task_classes",
title: "任务分类",
id: 'taskStatus',
title: '任务状态'
},
{
id: "task_cron",
title: "任务策略",
id: 'taskPlugin',
title: '插件'
},
{
id: "fun_info",
title: "功能介绍",
},
{
id: "remark",
title: "备注",
},
id: 'taskCron',
title: '任务策略'
}
],
treeProps: {
children: "childClassifications",
label: "class_name",
children: 'childClassifications',
label: 'name'
},
treeTitle: "",
treeTitle: '',
treeRuleForm: {},
treeAddFlag: false,
};
appId: '',//id
pluginDist: {}//
}
},
methods: {
// dialog
async handleConfirmClick() {
if (!this.treeRuleForm.class_name) {
this.$message({
type: "error",
message: "请输入树名称",
});
return;
type: 'error',
message: '请输入树名称'
})
return
}
if (this.treeAddFlag) {
const res = await getUserModuleApi(
{
tl: "integrationTaskClassificationService",
as: "integrationTaskClassification",
dj: "saveTaskClassification",
},
this.treeRuleForm
);
{
tl: 'integrationTaskClassificationService',
as: 'integrationTaskClassification',
dj: 'saveTaskClassification'
},
this.treeRuleForm
)
if (res.status == 200) {
this.$message({
type: "success",
message: "保存成功",
});
this.rightDialogSwitch = false;
this.initTreeData();
type: 'success',
message: '保存成功'
})
this.rightDialogSwitch = false
this.initTreeData()
}
} else {
const res = await getUserModuleApi(
{
tl: "integrationTaskClassificationService",
as: "integrationTaskClassification",
dj: "updateTaskClassification",
},
this.treeRuleForm
);
{
tl: 'integrationTaskClassificationService',
as: 'integrationTaskClassification',
dj: 'updateTaskClassification'
},
this.treeRuleForm
)
if (res.status == 200) {
this.$message({
type: "success",
message: "保存成功",
});
this.rightDialogSwitch = false;
this.initTreeData();
type: 'success',
message: '保存成功'
})
this.rightDialogSwitch = false
this.initTreeData()
}
}
},
//
async initTreeData() {
const res = await getUserModuleApi(
{
tl: "integrationTaskClassificationService",
as: "integrationTaskClassification",
dj: "queryTaskClassification",
},
{}
);
{
tl: 'sysApplicationService',
as: '',
dj: 'queryEntity'
},
{}
)
if (res.status == 200) {
this.treeData = res.attribute;
this.treeData = res.attribute
this.$nextTick(() => {
this.$refs.menuTree.clickFirst()
})
}
console.log(res, "🌲");
},
//
treeAppendHandle(data) {
this.treeRuleForm = {};
this.treeTitle = "子节点增加";
this.treeAddFlag = true;
this.$set(this.treeRuleForm, "class_superiors_name", data.class_name);
this.$set(this.treeRuleForm, "class_superiors", data.id);
this.$set(this.treeRuleForm, "class_code", data.class_code);
this.$set(this.treeRuleForm, "lvl", String(data.lvl * 1 + 1));
this.rightDialogSwitch = true;
this.treeRuleForm = {}
this.treeTitle = '子节点增加'
this.treeAddFlag = true
this.$set(this.treeRuleForm, 'class_superiors_name', data.class_name)
this.$set(this.treeRuleForm, 'class_superiors', data.id)
this.$set(this.treeRuleForm, 'class_code', data.class_code)
this.$set(this.treeRuleForm, 'lvl', String(data.lvl * 1 + 1))
this.rightDialogSwitch = true
},
treeReviseHandle(data) {
this.treeRuleForm = {};
this.treeAddFlag = false;
this.rightDialogSwitch = true;
this.$set(this.treeRuleForm, "id", data.id);
this.$set(this.treeRuleForm, "class_code", data.class_code);
this.$set(this.treeRuleForm, "class_name", data.class_name);
this.$set(this.treeRuleForm, "lvl", String(data.lvl));
this.treeTitle = "子节点编辑";
this.treeRuleForm = {}
this.treeAddFlag = false
this.rightDialogSwitch = true
this.$set(this.treeRuleForm, 'id', data.id)
this.$set(this.treeRuleForm, 'class_code', data.class_code)
this.$set(this.treeRuleForm, 'class_name', data.class_name)
this.$set(this.treeRuleForm, 'lvl', String(data.lvl))
this.treeTitle = '子节点编辑'
},
treeRemoveHandle(data) {
this.$confirm("确认删除?")
.then(async () => {
console.log(1);
const res = await getUserModuleApi(
{
tl: "integrationTaskClassificationService",
as: "integrationTaskClassification",
dj: "updateTaskClassificationSts",
},
{
id: data.id, //id
this.$confirm('确认删除?')
.then(async() => {
const res = await getUserModuleApi(
{
tl: 'integrationTaskClassificationService',
as: 'integrationTaskClassification',
dj: 'updateTaskClassificationSts'
},
{
id: data.id //id
}
)
if (res.status == 200) {
this.$nextTick(() => {
this.initTreeData()
})
}
);
console.log(res);
if (res.status == 200) {
this.$nextTick(() => {
this.initTreeData();
});
}
})
.catch(() => {});
})
.catch(() => {
})
},
//
treeAddHandle() {
this.treeRuleForm = {};
this.treeAddFlag = true;
this.rightDialogSwitch = true;
this.treeTitle = "根节点增加";
this.$set(this.treeRuleForm, "class_code", new Date().getTime());
this.$set(this.treeRuleForm, "lvl", "0");
this.treeRuleForm = {}
this.treeAddFlag = true
this.rightDialogSwitch = true
this.treeTitle = '根节点增加'
this.$set(this.treeRuleForm, 'class_code', new Date().getTime())
this.$set(this.treeRuleForm, 'lvl', '0')
},
//
async initTableData(obj = {}) {
const res = await getUserModuleApi(
{
tl: "integrationTaskService",
as: "integrationTask",
dj: "queryListJson",
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
query_condition: { ...obj },
}
);
console.log(res);
{
tl: 'integrationTaskService',
as: '',
dj: 'queryEntityPage'
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
task_app: this.appId,
...obj
}
)
if (res.status == 200) {
this.tableData = res.attribute;
this.tableData = res.attribute.list
this.pageModel.total = res.attribute.total
}
},
//
searchHandle() {
this.initTableData({ ...this.searchForm });
this.initTableData({ ...this.searchForm })
},
//
resizeSearchHandle() {
this.searchForm = {};
this.searchForm = {}
},
//
newPage() {
this.$router.push({ name: "taskAdd" });
this.$router.push({ name: 'taskAdd' })
},
//
//
homeHandleNodeClick(data) {
this.pageModel.pageIndex = 1;
this.pageModel.total = 0;
this.pageModel.limit = 10;
this.searchForm = {};
this.tableData = [];
this.lookFlag = false;
this.newFlag = false;
this.pageModel.pageIndex = 1
this.pageModel.total = 0
this.pageModel.limit = 10
this.appId = data.id
this.searchForm = {}
this.tableData = []
this.lookFlag = false
this.newFlag = false
//
this.plugSelectInit()
//
this.initTableData()
},
//
async plugSelectInit() {
const res = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
appId: this.appId
})
if (res.status === '200') {
this.pluginDist = {}
res.attribute.forEach(item => {
item.label = item.pluginName
this.$set(this.pluginDist, item.id, item.label)
})
this.SearchformRow[1].elCol[0].options = res.attribute
}
},
//
currentChangeHandle(pageModel) {
this.pageModel = pageModel;
this.pageModel = pageModel
this.$nextTick(() => {
this.initTableData({ ...this.searchForm });
});
this.initTableData({ ...this.searchForm })
})
},
//
tableButtonHandle(val, item) {
if (item.type === "view") {
async tableButtonHandle(val, item) {
if (item.type === 'view') {
this.$router.push({
name: "taskAdd",
query: { id: val.id, lookFlag: true },
});
} else if (item.type === "dele") {
console.log(111);
this.$confirm("确认删除?")
.then(async () => {
const res = await getUserModuleApi(
{
tl: "integrationTaskService",
as: "integrationTask",
dj: "updateIntegrationTaskSts",
},
{
id: val.id, //id
name: 'taskAdd',
query: { id: val.id, lookFlag: true }
})
} else if (item.type === 'dele') {
this.$confirm('确认删除?')
.then(async() => {
const res = await getUserModuleApi(
{
tl: 'integrationTaskService',
as: '',
dj: 'deleteEntity'
},
{
id: val.id //id
}
)
if (res.status == 200) {
if (
this.pageModel.total - 1 + this.pageModel.limit <=
this.pageModel.pageIndex * this.pageModel.limit
) {
this.pageModel.pageIndex--
}
this.$nextTick(() => {
this.$vmNews('删除成功', 'success')
this.initTableData({ ...this.searchForm })
})
}
);
if (res.status == 200) {
if (
this.pageModel.total - 1 + this.pageModel.limit <=
this.pageModel.pageIndex * this.pageModel.limit
) {
this.pageModel.pageIndex--;
}
this.$nextTick(() => {
this.initTableData({ ...this.searchForm });
});
}
})
.catch((err) => {
console.log(err);
});
} else if (item.type === "edit") {
this.$router.push({ name: "taskAdd", query: { id: val.id } });
})
.catch((err) => {
})
} else if (item.type === 'edit') {
this.$router.push({ name: 'taskAdd', query: { id: val.id } })
} else if (item.type === 'start') {
const res = await authApi('integrationTaskService', '', 'enableDisableEntity', '', {
'id': val.id,
'taskStatus': '1' //12
})
if (res.status === '200') {
this.$vmNews(res.msg, 'success')
this.initTableData()
}
} else if (item.type === 'stop') {
const res = await authApi('integrationTaskService', '', 'enableDisableEntity', '', {
'id': val.id,
'taskStatus': '2' //12
})
if (res.status === '200') {
this.$vmNews(res.msg, 'success')
this.initTableData()
}
}
},
}
},
components: {
BaseMenuTree,
BaseNewForm,
BaseTable,
basePage,
baseRightDialog,
},
computed: {
//
funWidth() {
return this.funData.length * 70;
},
baseRightDialog
},
mounted() {
// this.$refs.menuTree.clickFirst();
this.initTableData();
this.initTreeData();
// this.initTableData()
this.initTreeData()
},
computed: {
//
funWidth() {
return this.funData.length * 70;
},
},
};
return this.funData.length * 70
}
}
}
</script>
<style scoped lang="scss">
@ -434,38 +511,47 @@ export default {
padding: 20px;
display: flex;
align-items: center;
> .text {
flex: 1;
}
> .input {
flex: 5;
}
}
.wraaap {
display: flex;
.right {
width: 85%;
margin-left: 20px;
border-radius: 20px !important;
}
.left {
border-radius: 20px;
width: 15%;
background-color: #fff;
}
.btn {
display: flex;
justify-content: flex-end;
}
main {
margin-top: 20px;
border-radius: 20px;
}
footer {
margin-top: 15px;
}
header {
border-radius: 20px;
}
}
</style>
</style>

View File

@ -245,4 +245,4 @@ export default {
margin-top: 20px;
}
}
</style>
</style>

View File

@ -0,0 +1,464 @@
<template>
<div>
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成任务监控'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
@handleConfirmClick="handleConfirmClick"
>
<base-form
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
@onSelect="onSelect"
></base-form>
<!-- <el-button-->
<!-- style="width: 125px; margin: 20px 0"-->
<!-- @click="addVersionDialog"-->
<!-- icon="el-icon-plus"-->
<!-- :disabled="submitShow ? false : true"-->
<!-- v-if="submitShow"-->
<!-- >添加</el-button-->
<!-- >-->
<!-- <base-table-->
<!-- :border="true"-->
<!-- :showIndex="true"-->
<!-- :tableColumn="tableVersionColumn"-->
<!-- :tableData="tableVersionData"-->
<!-- :funWidth="80"-->
<!-- :funData="funData"-->
<!-- @onFunc="onFunc"-->
<!-- >-->
<!-- <template v-slot:argName="{ row }" >-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argName"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow || row.disabled"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argCode="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">-->
<!-- {{ row.argCode }}-->
<!-- </template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argCode"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argType="{ row }">-->
<!-- <div style="width: 100%">-->
<!--&lt;!&ndash; <el-radio-group v-model="row.argType" :disabled="!submitShow">&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="1">字符串</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="2">日期</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; </el-radio-group>&ndash;&gt;-->
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:remark="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
<!-- <el-input-->
<!-- v-model="row.remark"-->
<!-- clearable-->
<!-- type="text"-->
<!-- v-else-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- </base-table>-->
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import { authApi } from "@/api/apis/auth";
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
formRow: [],
basicsRules: [],
vLoading: false,
newMarryOptions: [],
submitShow: true,
loadingType: true,
tableVersionData: [],
tableVersionColumn: [],
funData: [],
isEdit: false,
select_dist:{},
options:[
{
label:"字符串",
value:"1"
},
{
label:"日期范围选择",
value:"2"
},
{
label:"年月",
value:"3"
},
{
label:"年月日",
value:"4"
},
{
label:"年月日时间",
value:"5"
},
]
};
},
mounted() {
this.initSelect()
},
methods: {
//
async initSelect(){
let res = await authApi(
"pluginService",
"plugins",
"queryPluginsByType",
"",
{
"pluginType": "1"
}
);
if(res.status == 200){
console.log(res.attribute)
res.attribute.forEach(item=>{
this.$set(this.select_dist,item.pluginId,item)
})
this.formRow[0].elCol[0].options = res.attribute
}
},
//
onSelect(val, index, indexRow, obj){
this.$set(this.$refs.basicsForm.ruleForm,'plugName',this.select_dist[val]['pluginName'])
},
openDialog(type, row) {
// this.queryProductClassfy();
this.formRow = [];
this.submitShow = true;
this.isEdit = false
this.funData = [
{
color: "#ff0000",
text: "删除",
}
]
//
if (type == "add") {
this.dialogTitle = "新增";
this.dialogType = "add";
}
//
if (type == "edit") {
this.isEdit = true
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.productGetById(row.id);
}
//
if (type == "show") {
this.funData = Object.assign([],[])
this.submitShow = false;
this.formRow = [
{
elCol: [
{
label: "任务编码",
prop: "taskCode",
tag: "elInput",
disabled:true,
},
{
label: "任务名称",
prop: "taskName",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "任务状态",
prop: "taskStatus",
tag: "elRadio",
disabled:true,
options:[
{
label:"执行中",
value:'1'
},
{
label:"待执行",
value:'2'
},
{
label:"错误",
value:'3'
},
],
span:24,
},
],
},
{
elCol: [
{
label: "上次开始时间",
prop: "oldStartTime",
tag: "elInput",
disabled:true,
},
{
label: "当前任务开始时间",
prop: "startTime",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "结束时间",
prop: "endTime",
tag: "elInput",
disabled:true,
},
{
label: "耗时",
prop: "diffTime",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "运行次数",
prop: "`runNum",
tag: "elInput",
disabled:true,
},
],
},
];
this.dialogTitle = "查看";
this.dialogType = "show";
this.productGetById(row.id);
}
this.dialogVisible = true;
},
//
async productGetById(id) {
let params = {
id: id,
};
let res = await authApi(
"integrationTaskLivingService",
"",
"getEntity",
"",
params
);
if (res.status == "200") {
this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute);
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
// let result = [];
// this.tableVersionData = Object.assign([], result);
});
}
},
addVersionDialog() {
let obj = {
argName:"",
argCode:"",
argType:"1",
remark:"",
};
this.tableVersionData.push(obj);
},
//
onFunc(index, row) {
if (index == 0) {
this.$delConfirm().then(() => {
this.tableVersionData.forEach((item, itemIndex) => {
if (item.id === row.id) {
this.tableVersionData.splice(itemIndex, 1);
}
});
});
}
},
//
handleDialogClose() {
this.tableVersionData = Object.assign([], []);
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
if (!valid) {
return;
} else {
if(!this.tableVersionData.length){
this.$vmNews("请添加列表")
return
}
let flag = this.tableVersionData.some(item=>{
if(!item.argName){
this.$vmNews("请输入参数名称")
return true
}
if(!item.argCode){
this.$vmNews("参数编码")
return true
}
})
if(flag) return
let params = {
...this.$refs.basicsForm.ruleForm,
sysPlugArgDetailEntityList: this.tableVersionData,
};
if (this.dialogType == "add") {
this.openLoading("submit");
this.productSaveDto(params);
}
if (this.dialogType == "edit") {
this.openLoading("submit");
this.productUpdateDto(params);
}
}
});
},
//
async productSaveDto(params) {
let res = await authApi(
"sysPlugArgService",
"integrationTaskService",
"savePlugArg",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("新增成功", "success");
this.$emit("resetTable");
}
},
//
async productUpdateDto(params) {
let res = await authApi(
"sysPlugArgService",
"integrationTaskService",
"updatePlugArg",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
}
},
//
async queryProductClassfy() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
let res = await authApi(
"generalServiceImpl",
"dictionaryshop",
"selectDictionaryshop",
"",
params
);
if (res.status == "200") {
this.formRow[1].elCol[0].options = res.attribute;
}
},
},
};
</script>
<style scoped lang="scss">
.dialogList {
padding: 16px 0;
border-top: 1px solid #dcdfe6;
display: flex;
flex-direction: column;
}
.updateBtn {
border: 1px solid #ebedf1;
padding: 5px 0;
border-radius: 3px;
text-align: center;
font-size: 14px;
cursor: pointer;
width: 100px;
}
.updateBtn:hover {
color: #1890ff;
border-color: #badeff;
background-color: #e8f4ff;
}
::v-deep .el-table__body-wrapper.is-scrolling-none {
height: auto !important;
}
::v-deep .app-container {
height: auto !important;
}
</style>

View File

@ -0,0 +1,464 @@
<template>
<div>
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 集成任务监控'"
@handleClose="handleDialogClose"
:type="dialogType"
:submitShow="submitShow"
@handleConfirmClick="handleConfirmClick"
>
<base-form
ref="basicsForm"
:formRow="formRow"
:isFunBtn="false"
class="dialog_form"
:spanWidth="`120px`"
:loading="vLoading"
@onSelect="onSelect"
></base-form>
<!-- <el-button-->
<!-- style="width: 125px; margin: 20px 0"-->
<!-- @click="addVersionDialog"-->
<!-- icon="el-icon-plus"-->
<!-- :disabled="submitShow ? false : true"-->
<!-- v-if="submitShow"-->
<!-- >添加</el-button-->
<!-- >-->
<!-- <base-table-->
<!-- :border="true"-->
<!-- :showIndex="true"-->
<!-- :tableColumn="tableVersionColumn"-->
<!-- :tableData="tableVersionData"-->
<!-- :funWidth="80"-->
<!-- :funData="funData"-->
<!-- @onFunc="onFunc"-->
<!-- >-->
<!-- <template v-slot:argName="{ row }" >-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.argName}}</template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argName"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow || row.disabled"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argCode="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">-->
<!-- {{ row.argCode }}-->
<!-- </template>-->
<!-- <el-input-->
<!-- v-else-->
<!-- v-model="row.argCode"-->
<!-- clearable-->
<!-- type="text"-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:argType="{ row }">-->
<!-- <div style="width: 100%">-->
<!--&lt;!&ndash; <el-radio-group v-model="row.argType" :disabled="!submitShow">&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="1">字符串</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; <el-radio label="2">日期</el-radio>&ndash;&gt;-->
<!--&lt;!&ndash; </el-radio-group>&ndash;&gt;-->
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:remark="{ row }">-->
<!-- <div style="width: 100%">-->
<!-- <template v-if="!submitShow">{{row.remark}}</template>-->
<!-- <el-input-->
<!-- v-model="row.remark"-->
<!-- clearable-->
<!-- type="text"-->
<!-- v-else-->
<!-- :disabled="!submitShow"-->
<!-- ></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- </base-table>-->
</base-right-dialog>
</div>
</template>
<script>
import baseRightDialog from "@/components/base/baseRightDialog";
import baseForm from "@/components/base/baseNewForm";
import baseTable from "@/components/base/baseTable";
import { authApi } from "@/api/apis/auth";
export default {
components: {
baseRightDialog,
baseForm,
baseTable,
},
data() {
return {
dialogVisible: false,
dialogTitle: "",
dialogType: "",
formRow: [],
basicsRules: [],
vLoading: false,
newMarryOptions: [],
submitShow: true,
loadingType: true,
tableVersionData: [],
tableVersionColumn: [],
funData: [],
isEdit: false,
select_dist:{},
options:[
{
label:"字符串",
value:"1"
},
{
label:"日期范围选择",
value:"2"
},
{
label:"年月",
value:"3"
},
{
label:"年月日",
value:"4"
},
{
label:"年月日时间",
value:"5"
},
]
};
},
mounted() {
this.initSelect()
},
methods: {
//
async initSelect(){
let res = await authApi(
"pluginService",
"plugins",
"queryPluginsByType",
"",
{
"pluginType": "1"
}
);
if(res.status == 200){
console.log(res.attribute)
res.attribute.forEach(item=>{
this.$set(this.select_dist,item.pluginId,item)
})
this.formRow[0].elCol[0].options = res.attribute
}
},
//
onSelect(val, index, indexRow, obj){
this.$set(this.$refs.basicsForm.ruleForm,'plugName',this.select_dist[val]['pluginName'])
},
openDialog(type, row) {
// this.queryProductClassfy();
this.formRow = [];
this.submitShow = true;
this.isEdit = false
this.funData = [
{
color: "#ff0000",
text: "删除",
}
]
//
if (type == "add") {
this.dialogTitle = "新增";
this.dialogType = "add";
}
//
if (type == "edit") {
this.isEdit = true
this.dialogTitle = "编辑";
this.dialogType = "edit";
this.productGetById(row.id);
}
//
if (type == "show") {
this.funData = Object.assign([],[])
this.submitShow = false;
this.formRow = [
{
elCol: [
{
label: "任务编码",
prop: "taskCode",
tag: "elInput",
disabled:true,
},
{
label: "任务名称",
prop: "taskName",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "任务状态",
prop: "taskStatus",
tag: "elRadio",
disabled:true,
options:[
{
label:"执行中",
value:'1'
},
{
label:"待执行",
value:'2'
},
{
label:"错误",
value:'3'
},
],
span:24,
},
],
},
{
elCol: [
{
label: "上次开始时间",
prop: "oldStartTime",
tag: "elInput",
disabled:true,
},
{
label: "当前任务开始时间",
prop: "startTime",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "结束时间",
prop: "endTime",
tag: "elInput",
disabled:true,
},
{
label: "耗时",
prop: "diffTime",
tag: "elInput",
disabled:true,
},
],
},
{
elCol: [
{
label: "运行次数",
prop: "runNum",
tag: "elInput",
disabled:true,
},
],
},
];
this.dialogTitle = "查看";
this.dialogType = "show";
this.productGetById(row.id);
}
this.dialogVisible = true;
},
//
async productGetById(id) {
let params = {
id: id,
};
let res = await authApi(
"integrationTaskLivingService",
"",
"getEntity",
"",
params
);
if (res.status == "200") {
this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute);
// this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
// let result = [];
// this.tableVersionData = Object.assign([], result);
});
}
},
addVersionDialog() {
let obj = {
argName:"",
argCode:"",
argType:"1",
remark:"",
};
this.tableVersionData.push(obj);
},
//
onFunc(index, row) {
if (index == 0) {
this.$delConfirm().then(() => {
this.tableVersionData.forEach((item, itemIndex) => {
if (item.id === row.id) {
this.tableVersionData.splice(itemIndex, 1);
}
});
});
}
},
//
handleDialogClose() {
this.tableVersionData = Object.assign([], []);
this.$refs.basicsForm.resetFields();
this.dialogVisible = false;
},
//
handleConfirmClick() {
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
if (!valid) {
return;
} else {
if(!this.tableVersionData.length){
this.$vmNews("请添加列表")
return
}
let flag = this.tableVersionData.some(item=>{
if(!item.argName){
this.$vmNews("请输入参数名称")
return true
}
if(!item.argCode){
this.$vmNews("参数编码")
return true
}
})
if(flag) return
let params = {
...this.$refs.basicsForm.ruleForm,
sysPlugArgDetailEntityList: this.tableVersionData,
};
if (this.dialogType == "add") {
this.openLoading("submit");
this.productSaveDto(params);
}
if (this.dialogType == "edit") {
this.openLoading("submit");
this.productUpdateDto(params);
}
}
});
},
//
async productSaveDto(params) {
let res = await authApi(
"sysPlugArgService",
"integrationTaskService",
"savePlugArg",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("新增成功", "success");
this.$emit("resetTable");
}
},
//
async productUpdateDto(params) {
let res = await authApi(
"sysPlugArgService",
"integrationTaskService",
"updatePlugArg",
"",
params
);
if (res.status == "200") {
this.handleDialogClose();
this.$vmNews("更新成功", "success");
this.$emit("resetTable");
}
},
//
async queryProductClassfy() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
let res = await authApi(
"generalServiceImpl",
"dictionaryshop",
"selectDictionaryshop",
"",
params
);
if (res.status == "200") {
this.formRow[1].elCol[0].options = res.attribute;
}
},
},
};
</script>
<style scoped lang="scss">
.dialogList {
padding: 16px 0;
border-top: 1px solid #dcdfe6;
display: flex;
flex-direction: column;
}
.updateBtn {
border: 1px solid #ebedf1;
padding: 5px 0;
border-radius: 3px;
text-align: center;
font-size: 14px;
cursor: pointer;
width: 100px;
}
.updateBtn:hover {
color: #1890ff;
border-color: #badeff;
background-color: #e8f4ff;
}
::v-deep .el-table__body-wrapper.is-scrolling-none {
height: auto !important;
}
::v-deep .app-container {
height: auto !important;
}
</style>

View File

@ -1,365 +1,234 @@
<template>
<div class="monitoring">
<header>
<div class="left">
<div class="title">
<h1>后台任务监控</h1>
</div>
<div class="search">
<el-input
placeholder="任务名称"
v-model="searchForm.task_name"
@keyup.enter.native="submitsearchForm"
>
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
</div>
<div class="right">
<el-button type="primary" @click="monPush" :loading="pushLoading"
>输出</el-button
<div>
<base-layout
ref="baseLayout"
:buttonList="buttonList"
@onFuncBtn="onFuncBtn"
:querySwitch="true"
:searchList="requirementList"
@search="handleSearchEvent"
:isPage="true"
@pageChange="handlePageChange"
>
<div slot="main" slot-scope="{ tableHeight }">
<base-table
ref="baseTable"
:showIndex="true"
:funWidth="180"
:funData="funData"
@onFunc="onFunc"
:tabLoading.sync="tabLoading"
:tableHeight="tableHeight"
:tableData="tableData"
:tableColumn="tableColumnData"
>
<el-button
icon="el-icon-refresh"
:loading="refreshLoading"
@click="initMainTableData(searchForm)"
circle
></el-button>
<template #taskStatus="{row}">
{{ taskStatusDist[row.taskStatus] }}
</template>
</base-table>
</div>
</header>
<main>
<BaseTable
ref="mainTable"
:tableData="tableData"
:tableColumn="tableColumn"
:funData="funData"
:funWidth="funWidth"
:showIndex="true"
:tabLoading="mainTabLoading"
@onFunc="tableButtonHandle"
:tableHeight="'70vh'"
:border="false"
>
<template v-slot:sts="{ row }">
<div>{{ stsDict[row.sts] }}</div>
</template>
<template v-slot:task_tag="{ row }">
<baseNewSelect
v-model="row.task_tag"
:searchApiInfo="task_tag_apiInfo.searchApiInfo"
:searchKey="task_tag_apiInfo.searchKey"
:prop="task_tag_apiInfo.prop"
:lookflag="true"
></baseNewSelect>
</template>
<template v-slot:diff_time="{ row }">
<div>{{ getTimeHandler(row.diff_time) }}</div>
</template>
</BaseTable>
</main>
<footer>
<basePage
:pageModel="pageModel"
@update:pageModel="currentChangeHandle"
></basePage>
</footer>
</base-layout>
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
</div>
</template>
<script>
import basePage from "./compoments/basePage.vue";
import BaseTable from "./compoments/baseTable.vue";
import { getApiModuleApi, getExcelApi } from "@/api/apiChunks/index.js";
import baseNewSelect from "./compoments/baseNewSelect.vue";
import baseLayout from '@/components/base/baseLayout'
import baseTable from '@/components/base/baseTable'
import rightDialog from './monRightDialog.vue'
import { authApi } from '@/api/apis/auth'
export default {
components: {
baseLayout,
baseTable,
rightDialog
},
data() {
return {
refreshLoading: false,
pushLoading: false,
task_tag_apiInfo: {
searchApiInfo: {
tl: "apiReflectionService",
as: "sys_api_reflectionService",
dj: "queryOneById",
buttonList: [
{
menuName: '刷新',
icon: 'el-icon-refresh',
btnFunction: 'resetLoad'
}
], //
requirementList: [
{
placeholder: '任务名称',
prop: 'taskName',
tag: 'elInput'
},
searchKey: "id",
prop: {
id: "id",
label: "ref_name",
], //list
tabLoading: false,
tableColumnData: [
{
prop: 'taskName',
label: '任务名称'
},
},
stsDict: {
Y: "正常",
N: "不正常",
},
searchForm: {
task_name: "",
},
mainTabLoading: false,
{
prop: 'taskCode',
label: '任务编码'
},
{
prop: 'taskStatus',
label: '任务状态'
},
{
prop: 'oldStartTime',
label: '上次开始时间'
},
{
prop: 'startTime',
label: '当前任务开始时间'
},
{
prop: 'runNum',
label: '运行次数'
}
], //
funData: [
{
type: "execute",
text: "执行",
color: "#5a9cf8",
},
{
type: "hang_up",
text: "挂起",
color: "#5a9cf8",
},
{
type: "dele",
text: "删除",
color: "#e47470",
color: '#6a9af1',
text: '查看'
},
],
tableColumn: [
{
id: "task_name",
title: "任务名称",
},
{
id: "task_tag",
title: "任务场景",
tooltip: true,
},
{
id: "task_classes",
title: "类型",
},
{
id: "org_id",
title: "部署公司",
},
{
id: "sts",
title: "状态",
tooltip: true,
},
{
id: "plan_time",
title: "计划时间",
tooltip: true,
},
{
id: "diff_time",
title: "上次耗时",
},
{
id: "run_num",
title: "运行次数",
},
{
id: "server_name",
title: "服务器",
tooltip: true,
},
],
tableData: [],
tableData: [], //
pageModel: {
pageIndex: 1,
total: 10,
limit: 10,
pageNum: 1,
pageSize: 100
},
};
queryModel: {
code: '',
name: '',
classify: '',
productionCompany: ''
},
taskStatusDist: {
1: '执行中',
2: '待执行',
3: '错误'
}
}
},
mounted() {
// this.queryProductClassfy();
this.GetProductionTableData()
},
methods: {
//
getTimeHandler(time) {
var days = parseInt(time / (1000 * 60 * 60 * 24));
var hours = parseInt((time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = parseInt((time % (1000 * 60 * 60)) / (1000 * 60));
var seconds = (time % (1000 * 60)) / 1000;
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
onCellClick(row) {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('show', row)
},
//
async executeHandle(obj) {
const res = await getApiModuleApi(
{
tl: "integrationTaskMonitoringService",
as: "integrationTaskMonitoring",
dj: "updateTaskMonitoringCarryAndHang",
},
obj
);
if (res.status == 200) {
this.$nextTick(() => {
this.initMainTableData(this.searchForm);
});
return true;
//
async GetProductionTableData() {
this.tabLoading = true
let param = {
...this.pageModel,
...this.queryModel
}
let res = await authApi(
'integrationTaskLivingService',
'',
'queryEntityPage',
'',
param
)
this.tabLoading = false
if (res.status == '200') {
this.tableData = res.attribute.list
this.$refs.baseLayout.setPageTotal(res.attribute.total)
}
},
// excel
async monPush() {
this.pushLoading = true;
const res = await getExcelApi(
{
tl: "integrationTaskMonitoringService",
as: "integrationTaskMonitoring",
dj: "queryMonitoringExportation",
},
{
task_name: this.searchForm.task_name,
}
);
this.pushLoading = false;
if (!res) {
this.$message({
type: "error",
message: "下载失败!",
});
} else {
let url = window.URL.createObjectURL(
new Blob([res], { type: "application/vnd.ms-excel" })
);
let fileName = "后台任务监控";
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
link.setAttribute("download", fileName + ".xlsx");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
window.URL.revokeObjectURL(url);
//
handlePageChange(val) {
this.pageModel.pageNum = val.pageIndex
this.pageModel.pageSize = val.pageSize
this.GetProductionTableData()
},
//
onFuncBtn(btn) {
this.onCellClick()
// this[btn.btnFunction]()
},
//
add() {
this.$refs.rightDialog.openDialog('add')
},
//
onFunc(index, row, item) {
//
if (item.text === '查看') {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('show', row)
}
//
if (item.text === '编辑') {
this.openLoading('detail')
this.$refs.rightDialog.openDialog('edit', row)
}
//
if (item.text === '删除') {
this.$delConfirm().then(() => {
this.openLoading('del')
this.productionDeleteById(row.id)
})
}
},
//
async initMainTableData(obj = {}) {
this.refreshLoading = true;
const res = await getApiModuleApi(
{
tl: "integrationTaskMonitoringService",
as: "integrationTaskMonitoring",
dj: "queryListJson",
},
{
pageNum: this.pageModel.pageIndex,
pageSize: this.pageModel.limit,
...obj,
}
);
this.refreshLoading = false;
if (res.status == 200) {
this.tableData = res.attribute;
async productionDeleteById(id) {
let param = {
id: id
}
let res = await authApi(
'sysPlugArgService',
'integrationTaskService',
'deletePlugArg',
'',
param
)
if (res.status == '200') {
this.$vmNews('删除成功', 'success')
this.resetTable()
}
},
//
submitsearchForm() {
this.initMainTableData(this.searchForm);
//
resetTable() {
this.pageModel.pageNum = 1
this.$refs.baseLayout.pageClear()
this.GetProductionTableData()
},
//
tableButtonHandle(val, item) {
if (item.type === "execute") {
let obj = {
type: "1",
};
obj["task_id"] = val.task_id;
obj["task_code"] = val.task_code;
obj["task_name"] = val.task_name;
this.executeHandle(obj).then(() => {
this.$message({
type: "success",
message: "执行成功!",
});
});
} else if (item.type == "dele") {
this.$confirm("确认删除?")
.then(async () => {
console.log(111);
const res = await getApiModuleApi(
{
tl: "integrationTaskMonitoringService",
as: "integrationTaskMonitoring",
dj: "updateTaskMonitoringSts",
},
{ task_id: val.task_id }
);
console.log(res);
if (res.status == 200) {
if (
this.pageModel.total + this.pageModel.limit - 1 <=
this.pageModel.pageIndex * this.pageModel.limit
) {
this.pageModel.pageIndex--;
}
console.log("删除");
this.$nextTick(() => {
this.initMainTableData(this.searchForm);
});
}
})
.catch(() => {});
} else if (item.type === "hang_up") {
let obj = {
type: "2",
};
obj["task_id"] = val.task_id;
obj["task_code"] = val.task_code;
obj["task_name"] = val.task_name;
this.executeHandle(obj).then(() => {
this.$message({
type: "success",
message: "挂起成功!",
});
});
} else if (item.type === "view") {
this.$router.push({
name: "sceneAdd",
query: { id: val.id, lookFlag: true },
});
//
handleSearchEvent() {
let data = this.$refs.baseLayout.ruleForm
this.queryModel = data
this.resetTable()
},
//
async queryProductClassfy() {
let params = {
tab_name: 'sys_product',
column_name: 'classify'
}
},
currentChangeHandle(pageModel) {
this.pageModel = pageModel;
this.$nextTick(() => {
this.initMainTableData(this.searchForm);
});
},
},
computed: {
//
funWidth() {
return this.funData.length * 70;
},
},
components: {
BaseTable,
basePage,
baseNewSelect,
},
created() {
this.initMainTableData();
},
};
</script>
<style scoped lang='scss'>
.monitoring {
width: 100%;
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background-color: #fff;
border-radius: 20px;
.left {
align-items: center;
display: flex;
.search {
margin-left: 30px;
let res = await authApi(
'generalServiceImpl',
'dictionaryshop',
'selectDictionaryshop',
'',
params
)
if (res.status == '200') {
this.requirementList[2].options = res.attribute
}
}
}
main {
padding: 20px;
height: 75vh;
border-radius: 20px;
background-color: #fff;
}
footer {
margin-top: 20px;
}
}
</style>
</script>
<style scoped>
.clickTitle {
color: #409eff;
cursor: pointer;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,267 @@
/**
* @desc 集成任务日志明细
* @date 2024-01-11
*/
// 表头
const tableColumnData = [
{
label: '任务名称',
prop: 'plugin_name',
tooltip: true,
width: 300
},
{
label: '源系统编码',
prop: 'root_app_bill',
tooltip: true,
width: 200
},
{
label: '最新推送状态',
prop: 'new_state',
tooltip: true,
width: 200
},
{
label: '最新传输结果',
prop: 'new_transmit_info',
tooltip: true,
width: 600
},
{
label: '最新推送时间',
prop: 'new_push_date',
tooltip: true,
width: 300
},
{
label: '业务⽇期',
prop: 'business_date',
tooltip: true,
width: 200
},
{
label: '下游系统单号',
prop: 'new_system_number',
tooltip: true,
width: 200
},
{
label: '处理⼈',
prop: 'processor_name',
tooltip: true,
width: 300
},
{
label: '处理备注',
prop: 'processing_remarks',
tooltip: true,
width: 300
},
{
label: '处理时间',
prop: 'processing_time',
tooltip: true,
width: 200
},
]
const tableVersionColumn = [
{
label: '版本号',
prop: 'versionNumber',
},
{
label: '版本说明',
prop: 'versionDescription',
},
]
// 基本信息内容
const formRow = [
{
elCol: [{
label: '产品编码',
prop: 'code',
tag: 'elInput',
},{
label: '产品名称',
prop: 'name',
tag: 'elInput',
}]
},
{
elCol: [{
label: '产品分类',
prop: 'classify',
tag: 'elSelect',
options:[],
optionValue:'column_value',
optionLabel:'column_content',
span: 24
}]
},
{
elCol: [{
label: '产品简述',
prop: 'description',
tag: 'elInput',
type: 'textarea',
span: 24,
}]
},
{
elCol: [{
label: '出品公司',
prop: 'productionCompany',
tag: 'elInput',
span: 24,
}]
},
]
const basicsRules ={
code:[{
required: true,
message: '请输入产品编码',
trigger: 'blur'
}],
name:[{
required: true,
message: '请输入产品名称',
trigger: 'blur'
}],
classify:[{
required: true,
message: '请选择产品分类',
trigger: 'blur'
}],
productionCompany:[{
required: true,
message: '请输入出品公司',
trigger: 'blur'
}],
}
// 查看
const formRowShow = [
{
elCol: [{
label: '源系统主键',
prop: 'rootAppPk',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
},{
label: '源系统编码',
prop: 'rootAppBill',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '创建时间',
prop: 'createTime',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
},{
label: '最新推送状态',
prop: 'newState',
tag: 'elRadio',
options: [
{ label: '成功', value: 'Y' },
{ label: '已处理', value: 'H' },
{ label: '失败', value: 'N' },
],
disabled:true
}
]
},
{
elCol: [{
label: '最新传输结果',
prop: 'newTransmitInfo',
tag: 'elInput',
type: 'textarea',
disabled:true,
span: 24,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '最新元数据',
prop: 'rootAppNewData',
tag: 'elInput',
type: 'textarea',
disabled:true,
span: 24,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '最新推送时间',
prop: 'newPushDate',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
},{
label: '业务日期',
prop: 'businessDate',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '下游系统主键',
prop: 'newSystemNumber',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
},{
label: '下游系统单号',
prop: 'newSystemPrimary',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '处理人名称',
prop: 'processorName',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
},{
label: '处理时间',
prop: 'processingTime',
tag: 'elInput',
disabled:true,
placeholder:"暂无数据"
}]
},
{
elCol: [{
label: '处理备注 ',
prop: 'processingRemarks',
tag: 'elInput',
type: 'textarea',
span: 24,
disabled:true,
placeholder:"暂无数据"
}]
}
]
export default {
tableColumnData,
formRow,
basicsRules,
formRowShow,
tableVersionColumn
}

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