修复周三测试提出的住数据bug
This commit is contained in:
parent
815be63697
commit
2a9ba611ed
92
src/App.vue
92
src/App.vue
|
@ -13,41 +13,42 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { setTheme } from "@/utils/setTheme";
|
||||
import { setTheme } from '@/utils/setTheme'
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
chalk: "", // content of theme-chalk css
|
||||
theme: "",
|
||||
routerAlive: true,
|
||||
};
|
||||
chalk: '', // content of theme-chalk css
|
||||
theme: '',
|
||||
routerAlive: true
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
routerRefresh: this.routerRefresh,
|
||||
};
|
||||
routerRefresh: this.routerRefresh
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTheme(this.$store.state.settings.theme);
|
||||
setTheme(this.$store.state.settings.theme)
|
||||
window.addEventListener(
|
||||
"hashchange",
|
||||
'hashchange',
|
||||
() => {
|
||||
let currentPath = window.location.hash.slice(1);
|
||||
let currentPath = window.location.hash.slice(1)
|
||||
if (this.$route.path !== currentPath) {
|
||||
this.$router.push(currentPath);
|
||||
this.$router.push(currentPath)
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
)
|
||||
},
|
||||
methods: {
|
||||
routerRefresh() {
|
||||
this.routerAlive = false;
|
||||
this.routerAlive = false
|
||||
this.$nextTick(() => {
|
||||
this.routerAlive = true;
|
||||
});
|
||||
},
|
||||
this.routerAlive = true
|
||||
})
|
||||
}
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
|
@ -57,26 +58,27 @@ export default {
|
|||
titleTemplate: (title) => {
|
||||
return title
|
||||
? `${title} - ${process.env.VUE_APP_TITLE}`
|
||||
: process.env.VUE_APP_TITLE;
|
||||
},
|
||||
};
|
||||
: process.env.VUE_APP_TITLE
|
||||
}
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
// 使用 Vue.nextTick 延迟执行代码
|
||||
this.$nextTick(() => {
|
||||
});
|
||||
})
|
||||
},
|
||||
deactivated() {
|
||||
// 使用 Vue.nextTick 延迟执行代码
|
||||
this.$nextTick(() => {
|
||||
});
|
||||
},
|
||||
};
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.loadingclass {
|
||||
.loadingclass {
|
||||
z-index: 9999999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 全局滚动条样式调整
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
|
@ -105,27 +107,56 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.el-form-item__content {
|
||||
display: block !important;
|
||||
}
|
||||
//所有按钮加号颜色
|
||||
.el-button--primary.is-plain {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
//所有dialog标题设置下线
|
||||
.el-dialog__header {
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
/* 定义滚动条样式 */
|
||||
.scrollable-box {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scrollable-box:hover {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
.el-table__header-wrapper {
|
||||
background: #f7f7f7 !important;
|
||||
}
|
||||
.el-button--primary{
|
||||
|
||||
.el-button--primary {
|
||||
background-color: #3877f5 !important;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
width: 100%;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
//以下代码是实现边框效果
|
||||
thead th {
|
||||
font-size: 14px;
|
||||
color: #575757;
|
||||
|
||||
&:nth-last-child(2) {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
border-radius: 0 5px 5px 0;
|
||||
right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
thead th,
|
||||
.el-table__row td {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
|
@ -133,24 +164,29 @@ export default {
|
|||
padding: 10px 0;
|
||||
border-top: 0px solid rgba(0, 0, 0, 0.1) !important;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
background: #fff;
|
||||
background: #fff;
|
||||
|
||||
&:first-child {
|
||||
border-left: 0px solid rgba(0, 0, 0, 0.1) !important;
|
||||
// border-radius: 5px 0 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__row > td {
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
|
||||
&:last-child {
|
||||
border-right: 0px solid rgba(0, 0, 0, 0.1) !important;
|
||||
// border-radius: 0 5px 5px 0;
|
||||
right: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__body tr:hover > td.el-table__cell {
|
||||
background-color: rgba(0, 110, 255, 0.05);
|
||||
}
|
||||
|
||||
.el-table__fixed::before {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -3342,7 +3342,6 @@
|
|||
|
||||
.custom-theme .el-radio-group {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
font-size: 0
|
||||
}
|
||||
|
@ -3355,7 +3354,6 @@
|
|||
|
||||
.custom-theme .el-radio-button__inner {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
background: #fff;
|
||||
|
|
|
@ -468,6 +468,8 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
|
||||
.el-form-item__label {
|
||||
/* width: 25%; */
|
||||
line-height: 1.2;
|
||||
|
@ -485,6 +487,7 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
::v-deep textarea.el-textarea__inner {
|
||||
min-height: 100px !important;
|
||||
}
|
||||
|
@ -554,6 +557,10 @@ export default {
|
|||
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 36px !important;
|
||||
}
|
||||
|
||||
.ruleFormClass {
|
||||
::v-deep .el-input__inner {
|
||||
border-color: #E6A23C !important
|
||||
|
@ -580,3 +587,4 @@ export default {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -447,24 +447,23 @@ export default {
|
|||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
$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;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
|
||||
.el-tree-node:focus > .el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current > .el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
|
||||
.navbarSearch {
|
||||
|
|
|
@ -477,15 +477,6 @@ $activeColor: var(--bg-color, "#00aaff");
|
|||
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;
|
||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
|||
.menu {
|
||||
position: fixed;
|
||||
width: 11%;
|
||||
height: 90vh;
|
||||
height: 88vh;
|
||||
//margin-right: 1%;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="errLogs">
|
||||
<div class="title">异常日志</div>
|
||||
<div class="errorInfo">
|
||||
<div class="img">
|
||||
<div class="errLogsImg">
|
||||
<img src="@/assets/images/index_v2_error.png"/>
|
||||
</div>
|
||||
<div class="num">{{ errorNum }}</div>
|
||||
|
@ -277,11 +277,10 @@ export default {
|
|||
align-items: center;
|
||||
height: 7vh;
|
||||
|
||||
> .img {
|
||||
> .errLogsImg {
|
||||
margin-right: 20px;
|
||||
width: 5vw;
|
||||
height: 100%;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
img {
|
||||
width: 5vw;
|
||||
height: 7vh;
|
||||
|
@ -376,7 +375,7 @@ export default {
|
|||
}
|
||||
|
||||
.content {
|
||||
height: 22vh;
|
||||
height: 24vh;
|
||||
overflow: hidden;
|
||||
|
||||
> .tableContent {
|
||||
|
@ -423,7 +422,7 @@ export default {
|
|||
> div {
|
||||
border-radius: 16px;
|
||||
width: 28%;
|
||||
height: 23vh;
|
||||
height: 25vh;
|
||||
display: flex;
|
||||
font-weight: 700;
|
||||
flex-direction: column;
|
||||
|
@ -463,9 +462,9 @@ export default {
|
|||
color: #000;
|
||||
line-height: 6vh;
|
||||
padding-left: 1vw;
|
||||
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 15px;
|
||||
}
|
||||
|
||||
.echarts {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:width="width"
|
||||
:fullscreen="false"
|
||||
append-to-body
|
||||
top="15vh"
|
||||
top="5vh"
|
||||
:close-on-click-modal="false"
|
||||
@open="$emit('open')"
|
||||
@close="$emit('close')"
|
||||
|
@ -100,3 +100,6 @@ export default {
|
|||
transition: all .8s;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<el-date-picker
|
||||
v-model="dateData"
|
||||
:type="datePickerType"
|
||||
type="datetime"
|
||||
align="left"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:disabled="disabled"
|
||||
:picker-options="
|
||||
datePickerType === 'date' ? DatePickerOptions : datedateRangePickerOptions
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
:gutter="24"
|
||||
v-for="(item, index) in formRow"
|
||||
:key="index"
|
||||
style="margin-bottom: 10px"
|
||||
style="margin-bottom: 20px"
|
||||
>
|
||||
<el-col
|
||||
v-for="(row, indexRow) in item.elCol"
|
||||
|
@ -73,24 +73,25 @@
|
|||
:type="row.type ? row.type : 'text'"
|
||||
:maxlength="row.maxlength ? row.maxlength : ''"
|
||||
:placeholder="!row.placeholder ? '请输入' : row.placeholder"
|
||||
v-if="row.tag === 'elInput' || (row.type === 'input' && !lookFlag)"
|
||||
v-if=" (row.type === 'input' && !lookFlag) || (row.type === 'num' && !lookFlag)"
|
||||
@blur="searchByStationName(row.id)"
|
||||
min="1"
|
||||
@input="row.rules ? integerNumber(row) : ''"
|
||||
@input="(row.rules || row.type === 'num') ? integerNumber(row) : ''"
|
||||
>
|
||||
</el-input>
|
||||
<el-input-number
|
||||
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"
|
||||
:step="row.stepNum ? row.stepNum : 1"
|
||||
@change="handleChange"
|
||||
:min="0"
|
||||
:max="row.maxNum ? row.maxNum : 99999999999"
|
||||
:label="!row.placeholder ? '描述文字' : row.placeholder"
|
||||
></el-input-number>
|
||||
<!-- <el-input-number-->
|
||||
<!-- 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"-->
|
||||
<!-- :step="row.stepNum ? row.stepNum : 1"-->
|
||||
<!-- @change="handleChange"-->
|
||||
<!-- :min="0"-->
|
||||
<!-- :max="row.maxNum ? row.maxNum : 99999999999"-->
|
||||
<!-- :label="!row.placeholder ? '描述文字' : row.placeholder"-->
|
||||
<!-- :controls="false"-->
|
||||
<!-- ></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> -->
|
||||
|
@ -525,8 +526,8 @@ export default {
|
|||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '')
|
||||
}
|
||||
// decimal小数
|
||||
if (row.rulesName == 'decimal') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop]
|
||||
if (row.rulesName == 'decimal' || row.type === 'num') {
|
||||
this.ruleForm[row.id] = this.ruleForm[row.id]
|
||||
.replace(/[^\d.]/g, '')
|
||||
.replace(/\.{2,}/g, '.')
|
||||
.replace('.', '$#$')
|
||||
|
@ -828,6 +829,7 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.label {
|
||||
/* @include fontBase(16px, #333333) ; */
|
||||
color: #333;
|
||||
|
@ -923,7 +925,8 @@ export default {
|
|||
resize: none;
|
||||
}
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<!--
|
||||
<!--
|
||||
* @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.page" :page-size="pageModel.limit"
|
||||
<el-pagination ref="pagination" :page-sizes="[10,20, 30, 40,100]" :total="pageModel.total" :current-page="pageModel.pageIndex" :page-size="pageModel.limit"
|
||||
@current-change="currentChange" @size-change="sizeChange" background layout="prev, pager, next,jumper,total,sizes">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
@ -55,7 +55,7 @@
|
|||
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;
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<template slot-scope="scope">
|
||||
<!-- 定义插槽:父组件可以使用 v-slot:prop="{row}" 搭配template标签,自定义每一列单元格的样式与操作 -->
|
||||
<el-radio v-model="radioIndex" :label="scope.$index"
|
||||
><span></span
|
||||
><span></span
|
||||
></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -101,13 +101,14 @@
|
|||
<template v-if="scope.$index + 1 != tableInfo.tableData.length || lookflag">
|
||||
<template v-if="!lookflag">
|
||||
<el-input
|
||||
v-if="item.type === 'input' || item.type === 'textrea'"
|
||||
v-if="item.type === 'input' || item.type === 'textrea' || item.type ==='num' "
|
||||
:disabled="
|
||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||
"
|
||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||
placeholder=""
|
||||
:maxlength="item.maxlength ? item.maxlength : ''"
|
||||
@input="(item.rules || item.type === 'num') ? integerNumber(item,tableInfo.tableData[scope.row.index]) : ''"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-if="item.type === 'number'"
|
||||
|
@ -163,8 +164,9 @@
|
|||
>{{
|
||||
tableInfo.tableData[scope.row.index][item.id]
|
||||
? tableInfo.tableData[scope.row.index][item.id]
|
||||
: "点击这里..."
|
||||
}}</el-link
|
||||
: '点击这里...'
|
||||
}}
|
||||
</el-link
|
||||
>
|
||||
<div v-if="item.type === 'text'">
|
||||
<el-tooltip class="item" effect="dark" placement="top">
|
||||
|
@ -292,7 +294,7 @@
|
|||
</baseCascader>
|
||||
<div v-if="item.type === 'datepick'">
|
||||
{{
|
||||
tableInfo.tableData[scope.row.index][item.id].split("T")[0]
|
||||
tableInfo.tableData[scope.row.index][item.id].split('T')[0]
|
||||
}}
|
||||
</div>
|
||||
<el-checkbox
|
||||
|
@ -335,7 +337,7 @@
|
|||
<span
|
||||
style="color: #fff; font-weight: 700"
|
||||
v-if="!item.ifField && !item.hiddenField"
|
||||
>{{ item.text }}</span
|
||||
>{{ item.text }}</span
|
||||
>
|
||||
<span
|
||||
:style="{
|
||||
|
@ -345,7 +347,7 @@
|
|||
: item.color,
|
||||
}"
|
||||
v-if="item.ifField"
|
||||
>{{
|
||||
>{{
|
||||
scope.row[item.ifField] == item.fieldVal
|
||||
? item.fieldTxt
|
||||
: item.text
|
||||
|
@ -360,60 +362,61 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import baseCascader from "./baseCascader/index";
|
||||
import { deepClone } from "@/utils/index.js";
|
||||
import execMathExpress from "exec-mathexpress";
|
||||
import BaseDatePicker from "./baseDatePicker.vue";
|
||||
import BaseSelect from "./baseNewSelect.vue";
|
||||
import baseCascader from './baseCascader/index'
|
||||
import { deepClone } from '@/utils/index.js'
|
||||
import execMathExpress from 'exec-mathexpress'
|
||||
import BaseDatePicker from './baseDatePicker.vue'
|
||||
import BaseSelect from './baseNewSelect.vue'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
// 表格的索引值
|
||||
formIndex: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: 0
|
||||
},
|
||||
lookflag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
tableInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 最大高度
|
||||
tableMaxHeight: {
|
||||
type: [String, Number],
|
||||
type: [String, Number]
|
||||
},
|
||||
// loading
|
||||
tabLoading: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 序号操作icon
|
||||
indexOperate: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 固定列
|
||||
fixedTable: {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 读取字段
|
||||
slotrow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
showsummary: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 表格高度
|
||||
tableHeight: {
|
||||
type: [Number, String],
|
||||
default: "auto",
|
||||
default: 'auto'
|
||||
},
|
||||
// 表格高度
|
||||
// windowHight: {
|
||||
|
@ -423,67 +426,67 @@ export default {
|
|||
// 表格尺寸
|
||||
size: {
|
||||
type: String,
|
||||
default: "small",
|
||||
default: 'small'
|
||||
},
|
||||
// 表格数据
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 表头数据
|
||||
detailFields: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 合计的index
|
||||
SummariesIndex: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 是否显示选择框
|
||||
showSelect: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 是否显示序号
|
||||
showIndex: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 操作选项
|
||||
funData: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 操作按钮宽度
|
||||
funWidth: {
|
||||
type: Number,
|
||||
default: 100,
|
||||
default: 100
|
||||
},
|
||||
// 是否带有纵向边框
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: true
|
||||
},
|
||||
|
||||
// 单选是否高亮
|
||||
highlightCurrent: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 默认拖动
|
||||
sortableSwitch: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
default: false
|
||||
}
|
||||
// headerStyle:{
|
||||
// type: String,
|
||||
// default:{
|
||||
|
@ -495,60 +498,101 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
headerStyle: {
|
||||
"background-color": "#F5F5F5",
|
||||
color: "#333333",
|
||||
'background-color': '#F5F5F5',
|
||||
color: '#333333'
|
||||
},
|
||||
itemKey: true,
|
||||
radioIndex: false,
|
||||
};
|
||||
radioIndex: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
methods: {
|
||||
calculator(item, row) {
|
||||
let obj = {};
|
||||
item.computeId.forEach((ele) => {
|
||||
obj[ele] = row[ele];
|
||||
});
|
||||
let result;
|
||||
try {
|
||||
let { num, den } = execMathExpress(item.total, obj);
|
||||
result = num / den;
|
||||
} catch (error) {
|
||||
return "数字不合法";
|
||||
integerNumber(row, table) {
|
||||
console.log(row, 'row')
|
||||
// decimal小数
|
||||
if (row.rulesName == 'decimal' || row.type === 'num') {
|
||||
table[row.id] = table[row.id]
|
||||
.replace(/[^\d.]/g, '')
|
||||
.replace(/\.{2,}/g, '.')
|
||||
.replace('.', '$#$')
|
||||
.replace(/\./g, '')
|
||||
.replace('$#$', '.')
|
||||
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
|
||||
.replace(/^\./g, '')
|
||||
}
|
||||
this.$emit("toalResult", this.tableInfo, row, item, result);
|
||||
return result.toFixed(2);
|
||||
// 身份证
|
||||
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') {
|
||||
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') {
|
||||
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,'')
|
||||
},
|
||||
calculator(item, row) {
|
||||
let obj = {}
|
||||
item.computeId.forEach((ele) => {
|
||||
obj[ele] = row[ele]
|
||||
})
|
||||
let result
|
||||
try {
|
||||
let { num, den } = execMathExpress(item.total, obj)
|
||||
result = num / den
|
||||
} catch (error) {
|
||||
return '数字不合法'
|
||||
}
|
||||
this.$emit('toalResult', this.tableInfo, row, item, result)
|
||||
return result.toFixed(2)
|
||||
},
|
||||
// 点击这里盒子触发
|
||||
clickBoxHandle(row) {
|
||||
this.$emit(
|
||||
"clickBox",
|
||||
'clickBox',
|
||||
this.tableInfo,
|
||||
row.index,
|
||||
this.tableInfo.tableData[row.index].id,
|
||||
this.formIndex
|
||||
);
|
||||
)
|
||||
},
|
||||
select(selection, row) {
|
||||
this.$emit("select", selection, row);
|
||||
this.$emit('select', selection, row)
|
||||
},
|
||||
selectAll(selection) {
|
||||
this.$emit("selectAll", selection);
|
||||
this.$emit('selectAll', selection)
|
||||
},
|
||||
setTableKey() {
|
||||
this.itemKey = !this.itemKey;
|
||||
this.itemKey = !this.itemKey
|
||||
},
|
||||
// 单元格双击事件
|
||||
doubleClick(row, column, cell, event) {
|
||||
this.$emit("doubleClick", row, column, cell, event);
|
||||
this.$emit('doubleClick', row, column, cell, event)
|
||||
},
|
||||
// 取消多选
|
||||
clearSelect() {
|
||||
this.$refs.elTable.clearSelection();
|
||||
this.$refs.elTable.clearSelection()
|
||||
},
|
||||
/**
|
||||
* @description 单元格点击事件
|
||||
|
@ -563,34 +607,34 @@ export default {
|
|||
* }
|
||||
*/
|
||||
getCellClick(row, column) {
|
||||
let label = column.label;
|
||||
let label = column.label
|
||||
// let itemColumn = this.detailFields.filter(item => {
|
||||
// return item.label === label
|
||||
// })
|
||||
// if (itemColumn[0] && itemColumn[0].other && itemColumn[0].other.isClick) {
|
||||
// this.$emit('onCellClick', row, label)
|
||||
// }
|
||||
this.$emit("onCellClick", row, label);
|
||||
this.$emit('onCellClick', row, label)
|
||||
},
|
||||
// 每一行点击事件
|
||||
getRowClick(row, column, event) {
|
||||
this.handleCurrentChange(row);
|
||||
this.$emit("onRowClick", row);
|
||||
this.handleCurrentChange(row)
|
||||
this.$emit('onRowClick', row)
|
||||
},
|
||||
// 每一行双击点击事件
|
||||
rowDblclick(row, column, event) {
|
||||
if (this.showSelect) {
|
||||
this.toggleSelection([row]);
|
||||
this.toggleSelection([row])
|
||||
}
|
||||
this.$emit("rowDblclick", row);
|
||||
this.$emit('rowDblclick', row)
|
||||
},
|
||||
// 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
|
||||
getRowKey(row) {
|
||||
return row.id;
|
||||
return row.id
|
||||
},
|
||||
// 多选事件
|
||||
handleSelectionChange(selectTable) {
|
||||
this.$emit("onSelectionChange", selectTable);
|
||||
this.$emit('onSelectionChange', selectTable)
|
||||
},
|
||||
/**
|
||||
* 触发操作事件
|
||||
|
@ -598,27 +642,27 @@ export default {
|
|||
* 参数2:当前按钮所在行数据
|
||||
*/
|
||||
funcEmit(row, item) {
|
||||
this.$emit("onFunc", row, item, this.tableInfo, this.formIndex);
|
||||
this.$emit('onFunc', row, item, this.tableInfo, this.formIndex)
|
||||
},
|
||||
// 排序改变 降序:descending;升序ascending
|
||||
sortChange(column) {
|
||||
this.$emit("sortChange", column);
|
||||
this.$emit('sortChange', column)
|
||||
},
|
||||
//单选
|
||||
handleCurrentChange(val) {
|
||||
this.radioIndex = val.index;
|
||||
this.$emit("radioChange", val);
|
||||
this.radioIndex = val.index
|
||||
this.$emit('radioChange', val)
|
||||
},
|
||||
clearRadioIndex() {
|
||||
this.radioIndex = false;
|
||||
this.radioIndex = false
|
||||
},
|
||||
setRadioIndex(index) {
|
||||
this.radioIndex = index;
|
||||
this.radioIndex = index
|
||||
},
|
||||
// 添加index
|
||||
tableCellName({ row, column, rowIndex, columnINdex }) {
|
||||
row.index = rowIndex;
|
||||
column.index = columnINdex;
|
||||
row.index = rowIndex
|
||||
column.index = columnINdex
|
||||
},
|
||||
// tableRowClassName({ row,rowIndex}) {
|
||||
// if (rowIndex === 1) {
|
||||
|
@ -628,19 +672,19 @@ export default {
|
|||
// }
|
||||
// return '';
|
||||
// },
|
||||
tableRowClassName: function ({ row, rowIndex }) {
|
||||
let data = "";
|
||||
this.$emit("row-class-name", { row: row, rowIndex: rowIndex }, (val) => {
|
||||
data = val;
|
||||
});
|
||||
return data; //属性名必须返回一个string
|
||||
tableRowClassName: function({ row, rowIndex }) {
|
||||
let data = ''
|
||||
this.$emit('row-class-name', { row: row, rowIndex: rowIndex }, (val) => {
|
||||
data = val
|
||||
})
|
||||
return data //属性名必须返回一个string
|
||||
},
|
||||
newRow() {
|
||||
this.$emit("newRow", this.tableInfo, this.formIndex);
|
||||
this.$emit('newRow', this.tableInfo, this.formIndex)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.elTable.bodyWrapper.scrollTop =
|
||||
this.$refs.elTable.bodyWrapper.scrollHeight;
|
||||
});
|
||||
this.$refs.elTable.bodyWrapper.scrollHeight
|
||||
})
|
||||
},
|
||||
//行拖拽,排序方法
|
||||
// rowDrop() {
|
||||
|
@ -671,49 +715,49 @@ export default {
|
|||
toggleSelection(rowData, selected) {
|
||||
if (rowData) {
|
||||
rowData.forEach((row) => {
|
||||
this.$refs.elTable.toggleRowSelection(row, selected);
|
||||
});
|
||||
this.$refs.elTable.toggleRowSelection(row, selected)
|
||||
})
|
||||
} else {
|
||||
this.$refs.elTable.clearSelection();
|
||||
this.$refs.elTable.clearSelection()
|
||||
}
|
||||
},
|
||||
// 合计
|
||||
getSummaries(params) {
|
||||
const { columns, data } = params;
|
||||
const sums = [];
|
||||
const { columns, data } = params
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = "合计";
|
||||
return;
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
this.SummariesIndex.forEach((el) => {
|
||||
if (index == el) {
|
||||
const values = data.map((item) => Number(item[column.property]));
|
||||
const values = data.map((item) => Number(item[column.property]))
|
||||
if (!values.every((value) => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev;
|
||||
return prev
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2);
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2)
|
||||
} else {
|
||||
sums[index] = "";
|
||||
sums[index] = ''
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
})
|
||||
})
|
||||
return sums
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BaseSelect,
|
||||
BaseDatePicker,
|
||||
baseCascader,
|
||||
},
|
||||
};
|
||||
baseCascader
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -721,6 +765,7 @@ input::-webkit-outer-spin-button,
|
|||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.el-table .warning-row {
|
||||
background: #ffe562;
|
||||
}
|
||||
|
@ -739,7 +784,7 @@ input::-webkit-inner-spin-button {
|
|||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
>>> .el-radio__label {
|
||||
> > > .el-radio__label {
|
||||
// display: none;
|
||||
}
|
||||
|
||||
|
@ -754,10 +799,12 @@ input::-webkit-inner-spin-button {
|
|||
::v-deep .cell {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
::v-deep .el-table__row {
|
||||
height: 60px !important;
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
|
||||
// ::v-deep .el-table .sort-caret.ascending {
|
||||
// top: 1px
|
||||
// }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="wrap">
|
||||
<div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.2">
|
||||
<div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.18">
|
||||
<BaseMenuTree
|
||||
:menuData="treeData"
|
||||
:filterShow="false"
|
||||
|
@ -13,7 +13,7 @@
|
|||
ref="menuTree"
|
||||
></BaseMenuTree>
|
||||
</div>
|
||||
<div class="main" :style="{flex:$route.query.viewType === '1'?0.8:1}" v-loading="mainLoading">
|
||||
<div class="main" :style="{flex:$route.query.viewType === '1'?0.82:1}" v-loading="mainLoading">
|
||||
<div class="top">
|
||||
<div class="search">
|
||||
<BaseNewForm
|
||||
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
</div v->
|
||||
<baseDialog title="数据设置" v-model="dialogShow" @confirm="dialogConfirm" :lookFlag="lookFlag">
|
||||
<h1 style="margin: 20px 0; font-size: 20px; font-weight: 700">
|
||||
<h1 style="margin: 20px 10px; font-size: 18px; font-weight: 700">
|
||||
基本信息
|
||||
</h1>
|
||||
<div class="dialogForm" v-if="dialogShow" style="padding: 0 20px">
|
||||
|
@ -82,7 +82,7 @@
|
|||
:isFunBtn="false"
|
||||
ref="dialogForm"
|
||||
></BaseNewForm>
|
||||
</div v->
|
||||
</div>
|
||||
<template v-for="(item, index) in dialogTabaleInfo">
|
||||
<div class="sonTable">
|
||||
<h1 style="margin: 20px 0; font-size: 20px; font-weight: 700">
|
||||
|
@ -309,6 +309,7 @@ export default {
|
|||
dj: 'queryMdmShow'
|
||||
}, { mdmCode: this.$route.meta.mdmCode })
|
||||
// 树处理
|
||||
|
||||
if (this.$route.query.viewType === '1') {
|
||||
this.treeObj.label = res.attribute.mdmModuleViewEntity.viewFiled
|
||||
this.treeObj.upId = res.attribute.mdmModuleViewEntity.upIdFiled
|
||||
|
@ -418,6 +419,7 @@ export default {
|
|||
//按钮事件
|
||||
async buttonHandle(item) {
|
||||
if (item.buttonType === 'search') {
|
||||
this.pageModel.pageIndex = 1
|
||||
this.searchHandle()
|
||||
} else if (item.buttonType === 'resize') {
|
||||
this.searchForm = {}
|
||||
|
@ -895,7 +897,7 @@ export default {
|
|||
// this.sendHandle(row.rowId)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
,
|
||||
|
|
|
@ -324,6 +324,7 @@ import baseDatePicker from './baseDatePicker.vue'
|
|||
import baseNewSelect from './baseNewSelect'
|
||||
import { checkMobile } from '@/utils/util'
|
||||
import { BaseSelect } from './baseSelect.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
// uploadFile,
|
||||
|
@ -813,10 +814,6 @@ export default {
|
|||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.el-form-item--medium .el-form-item__content {
|
||||
line-height: 20px !important;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
|
||||
margin-right: 0;
|
||||
|
@ -824,6 +821,11 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-form-item--medium .el-form-item__content {
|
||||
line-height: 20px !important;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding: 0 0 10px !important;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ export default {
|
|||
// 主表按钮(删除)
|
||||
mainDeleOnFunc(row, item) {
|
||||
console.log(row, 'row')
|
||||
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '确定是否删除?'
|
||||
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '是否确定删除?'
|
||||
this.$confirm(msg)
|
||||
.then(async(_) => {
|
||||
this.openLoading('submit')
|
||||
|
@ -299,7 +299,7 @@ export default {
|
|||
},
|
||||
//表字段点击操作
|
||||
activedOnFunc(row) {
|
||||
this.$confirm('确定删除?')
|
||||
this.$confirm('是否确定删除?')
|
||||
.then(async(_) => {
|
||||
this.openLoading('submit')
|
||||
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
|
||||
|
@ -566,7 +566,7 @@ export default {
|
|||
width: 100%;
|
||||
|
||||
.name {
|
||||
margin-right: 20px;
|
||||
margin-right: 10px;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
|
@ -579,6 +579,9 @@ export default {
|
|||
.value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #ebebeb;
|
||||
padding: 10px 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<template>
|
||||
<div class="ruleAddTable">
|
||||
<BaseTable
|
||||
ref="receiptsTable"
|
||||
:showIndex="true"
|
||||
:tableData="ruleAddTableData"
|
||||
:tableColumn="receiptsTableColumn"
|
||||
:border="false"
|
||||
:funData="receiptsFunData"
|
||||
tableHeight="60vh"
|
||||
@onFunc="receiptsOnFunc"
|
||||
ref="receiptsTable"
|
||||
:showIndex="true"
|
||||
:tableData="ruleAddTableData"
|
||||
:tableColumn="receiptsTableColumn"
|
||||
:border="false"
|
||||
:funData="receiptsFunData"
|
||||
tableHeight="60vh"
|
||||
@onFunc="receiptsOnFunc"
|
||||
>
|
||||
<template #dbType="{row}">
|
||||
<el-select v-model="row['dbType']" placeholder="请选择"
|
||||
@change="(val)=>ruleTypeSeleceChangHandle(val,row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ruleTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in ruleTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -32,10 +32,10 @@
|
|||
<div v-else-if="row['dbType'] === '3'">
|
||||
<el-select v-model="row.dbValue" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in dateOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dateOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -44,6 +44,11 @@
|
|||
<el-input v-model="row.dbValue" @input="(val)=>integerNumber(val,row)"></el-input>
|
||||
</div>
|
||||
</template>
|
||||
<template #operation="{row}">
|
||||
<div class="deleBtn" @click="receiptsOnFunc(row)">
|
||||
<img src="./images/删除.png" alt="">
|
||||
</div>
|
||||
</template>
|
||||
</BaseTable>
|
||||
<div class="receiptsAddRow" style="margin-top: 30px;
|
||||
border: 1px dotted #ccc;
|
||||
|
@ -52,9 +57,9 @@
|
|||
line-height: 50px;"
|
||||
>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="receiptsAddRow"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@click="receiptsAddRow"
|
||||
:underline="false"
|
||||
>+ 添加
|
||||
</el-link>
|
||||
</div>
|
||||
|
@ -79,6 +84,11 @@ export default {
|
|||
{
|
||||
title: '格式规则',
|
||||
id: 'dbValue'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
id: 'operation',
|
||||
width: 70
|
||||
}
|
||||
],//单据规则表单
|
||||
ruleTypeOptions: [
|
||||
|
@ -96,12 +106,7 @@ export default {
|
|||
value: '4'
|
||||
}
|
||||
],//单据规则下啦
|
||||
receiptsFunData: [
|
||||
{
|
||||
text: '删除',
|
||||
color: 'red'
|
||||
}
|
||||
],//单据规则按钮
|
||||
receiptsFunData: [],//单据规则按钮
|
||||
dateOptions: [
|
||||
{
|
||||
label: 'yyyy-MM-dd',
|
||||
|
@ -119,7 +124,7 @@ export default {
|
|||
label: 'yyyyMMddHHmmssSSS',
|
||||
value: 'yyyyMMddHHmmssSSS'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -148,5 +153,20 @@ export default {
|
|||
|
||||
|
||||
<style scoped lang="scss">
|
||||
.deleBtn {
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: #EBEBED;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
> img {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -581,7 +581,7 @@ export default {
|
|||
{
|
||||
label: 'datepick',
|
||||
id: 'datepick'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// label: 'daterange',
|
||||
// id: 'daterange'
|
||||
|
@ -589,6 +589,17 @@ export default {
|
|||
]
|
||||
}
|
||||
this.optionFormRow[7].elCol[0].options = dist[val]
|
||||
if (val == 4) {
|
||||
this.optionFormRow[3].elCol[0].disabled = true
|
||||
this.optionFormRow[3].elCol[0].required = false
|
||||
this.$set(this.optionRuleForm, 'filedLength', '')
|
||||
} else {
|
||||
this.optionFormRow[3].elCol[0].disabled = false
|
||||
this.optionFormRow[3].elCol[0].required = true
|
||||
}
|
||||
} else {
|
||||
this.optionFormRow[3].elCol[0].disabled = false
|
||||
this.optionFormRow[3].elCol[0].required = true
|
||||
}
|
||||
if (!init) {
|
||||
this.$set(this.optionRuleForm, 'type', '')
|
||||
|
@ -597,6 +608,7 @@ export default {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
,
|
||||
//表单输入框失焦事件(为了让中文名称可以给显示名)
|
||||
|
@ -692,6 +704,10 @@ export default {
|
|||
this.$vmNews('长度不能大于255')
|
||||
return
|
||||
}
|
||||
if (this.optionRuleForm.filedType == 2 && this.optionRuleForm.filedLength * 1 > 65) {
|
||||
this.$vmNews('当字段类型为金额时长度不得大于65')
|
||||
return
|
||||
}
|
||||
this.$set(params, 'chName', this.optionRuleForm.chName)
|
||||
this.$set(params, 'enName', this.optionRuleForm.enName)
|
||||
this.$set(params, 'filedType', this.optionRuleForm.filedType)
|
||||
|
|
|
@ -4,25 +4,25 @@
|
|||
<div class="btn">
|
||||
<div class="chunk">
|
||||
<el-button
|
||||
v-if="!editFlag"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="editFlag=true"
|
||||
v-if="!editFlag"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="editFlag=true"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="editFlag"
|
||||
icon="el-icon-close"
|
||||
@click="getRuleForm"
|
||||
:loading="saveLoading"
|
||||
v-if="editFlag"
|
||||
icon="el-icon-close"
|
||||
@click="getRuleForm"
|
||||
:loading="saveLoading"
|
||||
>取消
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="editFlag"
|
||||
icon="el-icon-first-aid-kit"
|
||||
type="primary"
|
||||
@click="saveHandle"
|
||||
:loading="saveLoading"
|
||||
v-if="editFlag"
|
||||
icon="el-icon-first-aid-kit"
|
||||
type="primary"
|
||||
@click="saveHandle"
|
||||
:loading="saveLoading"
|
||||
>保存
|
||||
</el-button>
|
||||
</div>
|
||||
|
@ -37,15 +37,15 @@
|
|||
</div>
|
||||
<div class="form" v-if="displayType == 1">
|
||||
<baseNewForm
|
||||
ref="optionForm"
|
||||
:spanNumber="24"
|
||||
:isFunBtn="false"
|
||||
:formRow="formRow"
|
||||
:ruleForm="ruleForm"
|
||||
:labelPosition="'right'"
|
||||
labelWidth="100px"
|
||||
@onSubmit="onSubmit"
|
||||
:lookFlag="true"
|
||||
ref="optionForm"
|
||||
:spanNumber="24"
|
||||
:isFunBtn="false"
|
||||
:formRow="formRow"
|
||||
:ruleForm="ruleForm"
|
||||
:labelPosition="'right'"
|
||||
labelWidth="100px"
|
||||
@onSubmit="onSubmit"
|
||||
:lookFlag="true"
|
||||
>
|
||||
</baseNewForm>
|
||||
</div>
|
||||
|
@ -60,14 +60,14 @@
|
|||
</div>
|
||||
<div class="form" v-if="displayType == 1">
|
||||
<baseNewForm
|
||||
ref="optionForm"
|
||||
:spanNumber="24"
|
||||
:isFunBtn="false"
|
||||
:formRow="formRow"
|
||||
:ruleForm="ruleForm"
|
||||
:labelPosition="'right'"
|
||||
labelWidth="100px"
|
||||
@onSubmit="onSubmit"
|
||||
ref="optionForm"
|
||||
:spanNumber="24"
|
||||
:isFunBtn="false"
|
||||
:formRow="formRow"
|
||||
:ruleForm="ruleForm"
|
||||
:labelPosition="'right'"
|
||||
labelWidth="100px"
|
||||
@onSubmit="onSubmit"
|
||||
>
|
||||
</baseNewForm>
|
||||
</div>
|
||||
|
@ -177,14 +177,14 @@
|
|||
|
||||
<!-- -->
|
||||
<base-right-dialog
|
||||
ref="mainTableAddtDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="mainTableDialogShow"
|
||||
:title="activeTitle + '设置'"
|
||||
:submitShow="true"
|
||||
:size="'50%'"
|
||||
@handleConfirmClick="mainTableSaveHandle"
|
||||
@handleClose="mainTableDialogShow=false"
|
||||
ref="mainTableAddtDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="mainTableDialogShow"
|
||||
:title="activeTitle + '设置'"
|
||||
:submitShow="true"
|
||||
:size="'50%'"
|
||||
@handleConfirmClick="mainTableSaveHandle"
|
||||
@handleClose="mainTableDialogShow=false"
|
||||
>
|
||||
<div class="mainTable">
|
||||
<settingChunk ref="settingChunk" @saveSuccessEmit="saveSuccessEmit"></settingChunk>
|
||||
|
@ -442,8 +442,9 @@ export default {
|
|||
.displayInfo {
|
||||
background-color: #fbfbfb;
|
||||
position: relative;
|
||||
margin-left: 5px;
|
||||
|
||||
width: 99%;
|
||||
margin: 10px 10px 0 5px;
|
||||
|
||||
> .btn {
|
||||
display: flex;
|
||||
|
@ -469,7 +470,7 @@ export default {
|
|||
> .title {
|
||||
font-weight: 600;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 25px;
|
||||
margin-bottom: 20px;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
|
@ -480,7 +481,7 @@ export default {
|
|||
}
|
||||
|
||||
> .radio {
|
||||
margin: 20px 20px;
|
||||
margin: 10px 20px;
|
||||
}
|
||||
|
||||
> .tabIndex {
|
||||
|
@ -525,7 +526,7 @@ export default {
|
|||
|
||||
.setting {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
height: 15vh;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
@ -539,8 +540,8 @@ export default {
|
|||
cursor: pointer;
|
||||
|
||||
.img {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 5vh;
|
||||
height: 5vh;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
methods: {
|
||||
//删除
|
||||
deleteHandle(row) {
|
||||
this.$confirm('该操作会将数据所有信息都会被删除,是否确认删除?。', '警告', {
|
||||
this.$confirm('该操作将删除所有数据。确定删除吗?。', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'error'
|
||||
|
@ -325,8 +325,8 @@ export default {
|
|||
}
|
||||
|
||||
main {
|
||||
margin-top: 10px;
|
||||
padding: 20px 20px 5px;
|
||||
margin-top: 5px;
|
||||
padding: 5px 20px 5px;
|
||||
height: 80vh;
|
||||
border-radius: 20px;
|
||||
background-color: #fff;
|
||||
|
@ -363,8 +363,9 @@ export default {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
> img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@ export default {
|
|||
//margin-right: 1%;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
margin-top: 10px;
|
||||
overflow: auto;
|
||||
|
||||
.appInfo {
|
||||
|
@ -235,9 +236,9 @@ export default {
|
|||
}
|
||||
|
||||
.content {
|
||||
margin-left: 180px;
|
||||
margin-left: 185px;
|
||||
flex: 1;
|
||||
width: calc(100% - 190px);
|
||||
width: calc(100% - 195px);
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ export default {
|
|||
let routeData = this.$router.resolve({
|
||||
path: item.path,
|
||||
name: item.name,
|
||||
query: {mdmCode: item.meta.mdmCode, viewType: item.meta.viewType}
|
||||
});
|
||||
window.open(routeData.href, "_self");
|
||||
},
|
||||
|
@ -154,4 +155,4 @@ export default {
|
|||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -312,18 +312,18 @@ $activeColor: var(--bg-color, yellow);
|
|||
|
||||
.el-tree-node__content:hover,
|
||||
.el-upload-list__item:hover {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
|
||||
.el-tree-node:focus>.el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
color: #333;
|
||||
background-color: #eef5fe !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<!-- <template v-slot:option="{row}">
|
||||
<el-radio v-model="radioIndex" :label="row.$index"><span></span></el-radio>
|
||||
</template> -->
|
||||
<template #enableState="{row}">
|
||||
{{ row.row.enableState == 0 ? '启用' : '停用'}}
|
||||
</template>
|
||||
</base-table>
|
||||
</div>
|
||||
</base-layout>
|
||||
|
@ -107,6 +110,12 @@ export default {
|
|||
prop: 'description',
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
label: '启用状态',
|
||||
prop: 'enableState',
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
],
|
||||
RoleAdd: false,
|
||||
ruleForm: {
|
||||
|
|
|
@ -1,98 +1,109 @@
|
|||
<template>
|
||||
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible" :appendBody="true"
|
||||
:title="dialogTitle + ' 角色'" :submitShow="submitShow" @handleClose="handleDialogClose"
|
||||
@handleConfirmClick="handleConfirmClick">
|
||||
<base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="rules" class="dialog_form"
|
||||
:spanWidth="`120px`" :loading="vLoading" @elDialogClick="elDialogClick"></base-form>
|
||||
</base-right-dialog>
|
||||
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible" :appendBody="true"
|
||||
:title="dialogTitle + ' 角色'" :submitShow="submitShow" @handleClose="handleDialogClose"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="rules" class="dialog_form"
|
||||
:spanWidth="`120px`" :loading="vLoading" @elDialogClick="elDialogClick"
|
||||
></base-form>
|
||||
</base-right-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseRightDialog from "@/components/base/baseRightDialog";
|
||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
||||
import configData from "./configData";
|
||||
import {
|
||||
authApi
|
||||
} from '@/api/apis/auth'
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogTitle: '新增',
|
||||
dialogVisible: false,
|
||||
submitShow: true,
|
||||
formRow: configData.formRow,
|
||||
rules: configData.rules,
|
||||
vLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openDialog(dialogTitle,id) {
|
||||
this.dialogVisible = true
|
||||
this.dialogTitle = dialogTitle
|
||||
this.formRow[0].elCol[1].disabled = false
|
||||
this.getMenuData()
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.basicsForm.getField('sorts',1)
|
||||
this.$refs.basicsForm.getField('isEnable','1')
|
||||
this.$refs.basicsForm.getField('externalType','0')
|
||||
this.$refs.basicsForm.getField('isDeleted','0')
|
||||
this.$refs.basicsForm.getField('frontAuthorization','1')
|
||||
this.$refs.basicsForm.getField('personSelectionInterface','1')
|
||||
this.$refs.basicsForm.getField('isBenchmark','1')
|
||||
})
|
||||
if(dialogTitle == '编辑'){
|
||||
this.formRow[0].elCol[1].disabled = true
|
||||
this.getDetail(id)
|
||||
}
|
||||
},
|
||||
async getDetail(id){
|
||||
this.openLoading('detail')
|
||||
let res = await authApi('roleService', 'role', 'queryEntity','',{id:id})
|
||||
if(res.status == '200'){
|
||||
this.$refs.basicsForm.choiceAssignment(res.attribute)
|
||||
}
|
||||
},
|
||||
// 获得树状图
|
||||
async getMenuData() {
|
||||
let res = await authApi('orgService', 'org', 'queryTree')
|
||||
if(res.status == '200'){
|
||||
this.formRow[1].elCol[1].options = res.attribute
|
||||
}
|
||||
},
|
||||
handleConfirmClick() {
|
||||
async function submitForm(dialogTitle,ruleForm){
|
||||
let params = {
|
||||
...ruleForm
|
||||
}
|
||||
let res = await authApi('roleService','role',dialogTitle == '新增'?'addEntity':'updateEntity','',params)
|
||||
return res
|
||||
}
|
||||
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
|
||||
if(!valid){
|
||||
return
|
||||
}else{
|
||||
submitForm(this.dialogTitle,this.$refs.basicsForm.ruleForm).then(res=>{
|
||||
if(res.status == '200'){
|
||||
this.$vmNews('保存成功', 'success')
|
||||
this.handleDialogClose()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDialogClose() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('handleDialogClose')
|
||||
},
|
||||
elDialogClick() {},
|
||||
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||
import configData from './configData'
|
||||
import {
|
||||
authApi
|
||||
} from '@/api/apis/auth'
|
||||
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogTitle: '新增',
|
||||
dialogVisible: false,
|
||||
submitShow: true,
|
||||
formRow: configData.formRow,
|
||||
rules: configData.rules,
|
||||
vLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openDialog(dialogTitle, id) {
|
||||
this.dialogVisible = true
|
||||
this.dialogTitle = dialogTitle
|
||||
this.formRow[0].elCol[1].disabled = false
|
||||
this.getMenuData()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.getField('sorts', 1)
|
||||
this.$refs.basicsForm.getField('isEnable', '1')
|
||||
this.$refs.basicsForm.getField('externalType', '0')
|
||||
this.$refs.basicsForm.getField('isDeleted', '0')
|
||||
this.$refs.basicsForm.getField('frontAuthorization', '1')
|
||||
this.$refs.basicsForm.getField('personSelectionInterface', '1')
|
||||
this.$refs.basicsForm.getField('isBenchmark', '1')
|
||||
})
|
||||
if (dialogTitle == '编辑') {
|
||||
this.formRow[0].elCol[1].disabled = true
|
||||
this.getDetail(id)
|
||||
}
|
||||
},
|
||||
async getDetail(id) {
|
||||
this.openLoading('detail')
|
||||
let res = await authApi('roleService', 'role', 'queryEntity', '', { id: id })
|
||||
if (res.status == '200') {
|
||||
this.$refs.basicsForm.choiceAssignment(res.attribute)
|
||||
}
|
||||
},
|
||||
// 获得树状图
|
||||
async getMenuData() {
|
||||
let res = await authApi('orgService', 'org', 'queryTree')
|
||||
if (res.status == '200') {
|
||||
this.formRow[1].elCol[1].options = res.attribute
|
||||
}
|
||||
},
|
||||
handleConfirmClick() {
|
||||
async function submitForm(dialogTitle, ruleForm) {
|
||||
let params = {
|
||||
...ruleForm
|
||||
}
|
||||
let res = await authApi('roleService', 'role', dialogTitle == '新增' ? 'addEntity' : 'updateEntity', '', params)
|
||||
return res
|
||||
}
|
||||
|
||||
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
} else {
|
||||
submitForm(this.dialogTitle, this.$refs.basicsForm.ruleForm).then(res => {
|
||||
if (res.status == '200') {
|
||||
this.$vmNews('保存成功', 'success')
|
||||
this.handleDialogClose()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDialogClose() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('handleDialogClose')
|
||||
},
|
||||
elDialogClick() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-form-item--medium {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -41,8 +41,8 @@ module.exports = {
|
|||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://hzya.ufyct.com:9067/`,
|
||||
// target: `http://127.0.0.1:9081/`,
|
||||
// target: `http://192.168.2.78:9999`,
|
||||
target: `http://192.168.2.83:9999`,
|
||||
target: `http://192.168.2.78:9999`,
|
||||
// target: `http://192.168.2.83:9999`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||
|
|
Loading…
Reference in New Issue