修复周三测试提出的住数据bug

This commit is contained in:
hyt 2024-07-09 14:20:55 +08:00
parent 815be63697
commit 2a9ba611ed
25 changed files with 530 additions and 379 deletions

View File

@ -13,41 +13,42 @@
</template> </template>
<script> <script>
import { setTheme } from "@/utils/setTheme"; import { setTheme } from '@/utils/setTheme'
export default { export default {
name: "App", name: 'App',
data() { data() {
return { return {
chalk: "", // content of theme-chalk css chalk: '', // content of theme-chalk css
theme: "", theme: '',
routerAlive: true, routerAlive: true
}; }
}, },
provide() { provide() {
return { return {
routerRefresh: this.routerRefresh, routerRefresh: this.routerRefresh
}; }
}, },
mounted() { mounted() {
setTheme(this.$store.state.settings.theme); setTheme(this.$store.state.settings.theme)
window.addEventListener( window.addEventListener(
"hashchange", 'hashchange',
() => { () => {
let currentPath = window.location.hash.slice(1); let currentPath = window.location.hash.slice(1)
if (this.$route.path !== currentPath) { if (this.$route.path !== currentPath) {
this.$router.push(currentPath); this.$router.push(currentPath)
} }
}, },
false false
); )
}, },
methods: { methods: {
routerRefresh() { routerRefresh() {
this.routerAlive = false; this.routerAlive = false
this.$nextTick(() => { this.$nextTick(() => {
this.routerAlive = true; this.routerAlive = true
}); })
}, }
}, },
metaInfo() { metaInfo() {
return { return {
@ -57,26 +58,27 @@ export default {
titleTemplate: (title) => { titleTemplate: (title) => {
return title return title
? `${title} - ${process.env.VUE_APP_TITLE}` ? `${title} - ${process.env.VUE_APP_TITLE}`
: process.env.VUE_APP_TITLE; : process.env.VUE_APP_TITLE
}, }
}; }
}, },
activated() { activated() {
// 使 Vue.nextTick // 使 Vue.nextTick
this.$nextTick(() => { this.$nextTick(() => {
}); })
}, },
deactivated() { deactivated() {
// 使 Vue.nextTick // 使 Vue.nextTick
this.$nextTick(() => { this.$nextTick(() => {
}); })
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
.loadingclass { .loadingclass {
z-index: 9999999 !important; z-index: 9999999 !important;
} }
// //
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 5px; width: 5px;
@ -105,27 +107,56 @@ export default {
} }
</style> </style>
<style lang="scss"> <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 { .el-table__header-wrapper {
background: #f7f7f7 !important; background: #f7f7f7 !important;
} }
.el-button--primary{
.el-button--primary {
background-color: #3877f5 !important; background-color: #3877f5 !important;
} }
.el-table { .el-table {
width: 100%; width: 100%;
&::before { &::before {
display: none; display: none;
} }
// //
thead th { thead th {
font-size: 14px; font-size: 14px;
color: #575757; color: #575757;
&:nth-last-child(2) { &:nth-last-child(2) {
border-right: 1px solid rgba(0, 0, 0, 0.1) !important; border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
border-radius: 0 5px 5px 0; border-radius: 0 5px 5px 0;
right: 1px; right: 1px;
} }
} }
thead th, thead th,
.el-table__row td { .el-table__row td {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
@ -133,24 +164,29 @@ export default {
padding: 10px 0; padding: 10px 0;
border-top: 0px 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; border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
background: #fff; background: #fff;
&:first-child { &:first-child {
border-left: 0px 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: 5px 0 0 5px;
} }
} }
.el-table__row > td { .el-table__row > td {
font-size: 12px; font-size: 12px;
color: #333333; color: #333333;
&:last-child { &:last-child {
border-right: 0px 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 5px 5px 0;
right: 1px; right: 1px;
} }
} }
.el-table__body tr:hover > td.el-table__cell { .el-table__body tr:hover > td.el-table__cell {
background-color: rgba(0, 110, 255, 0.05); background-color: rgba(0, 110, 255, 0.05);
} }
.el-table__fixed::before { .el-table__fixed::before {
display: none; display: none;
} }

View File

@ -3342,7 +3342,6 @@
.custom-theme .el-radio-group { .custom-theme .el-radio-group {
display: inline-block; display: inline-block;
line-height: 1;
vertical-align: middle; vertical-align: middle;
font-size: 0 font-size: 0
} }
@ -3355,7 +3354,6 @@
.custom-theme .el-radio-button__inner { .custom-theme .el-radio-button__inner {
display: inline-block; display: inline-block;
line-height: 1;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; vertical-align: middle;
background: #fff; background: #fff;

View File

@ -468,6 +468,8 @@ export default {
} }
</script> </script>
<style> <style>
.el-form-item__label { .el-form-item__label {
/* width: 25%; */ /* width: 25%; */
line-height: 1.2; line-height: 1.2;
@ -485,6 +487,7 @@ export default {
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 100px !important; min-height: 100px !important;
} }
@ -554,6 +557,10 @@ export default {
} }
::v-deep .el-form-item__content {
line-height: 36px !important;
}
.ruleFormClass { .ruleFormClass {
::v-deep .el-input__inner { ::v-deep .el-input__inner {
border-color: #E6A23C !important border-color: #E6A23C !important
@ -580,3 +587,4 @@ export default {
} }
} }
</style> </style>

View File

@ -447,24 +447,23 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
$activeColor: var(--bg-color, "#00aaff"); $activeColor: var(--bg-color, "#00aaff");
.el-tree-node__content:hover, .el-tree-node__content:hover,
.el-upload-list__item:hover { .el-upload-list__item:hover {
// color: white; color: #333;
// background-color: $activeColor !important; background-color: #eef5fe !important;
background-color: #ecf5ff !important;
} }
.el-tree-node:focus > .el-tree-node__content { .el-tree-node:focus > .el-tree-node__content {
color: white; color: #333;
background-color: $activeColor !important; background-color: #eef5fe !important;
} }
.el-tree-node.is-current > .el-tree-node__content { .el-tree-node.is-current > .el-tree-node__content {
color: white; color: #333;
background-color: $activeColor !important; background-color: #eef5fe !important;
} }
.navbarSearch { .navbarSearch {

View File

@ -477,15 +477,6 @@ $activeColor: var(--bg-color, "#00aaff");
background-color: #ecf5ff !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 { .navbarSearch {
// width: 200px !important; // width: 200px !important;

View File

@ -108,7 +108,7 @@ export default {
.menu { .menu {
position: fixed; position: fixed;
width: 11%; width: 11%;
height: 90vh; height: 88vh;
//margin-right: 1%; //margin-right: 1%;
background-color: #fff; background-color: #fff;
border-radius: 16px; border-radius: 16px;

View File

@ -6,7 +6,7 @@
<div class="errLogs"> <div class="errLogs">
<div class="title">异常日志</div> <div class="title">异常日志</div>
<div class="errorInfo"> <div class="errorInfo">
<div class="img"> <div class="errLogsImg">
<img src="@/assets/images/index_v2_error.png"/> <img src="@/assets/images/index_v2_error.png"/>
</div> </div>
<div class="num">{{ errorNum }}</div> <div class="num">{{ errorNum }}</div>
@ -277,11 +277,10 @@ export default {
align-items: center; align-items: center;
height: 7vh; height: 7vh;
> .img { > .errLogsImg {
margin-right: 20px; margin-right: 20px;
width: 5vw; width: 5vw;
height: 100%; height: 100%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
img { img {
width: 5vw; width: 5vw;
height: 7vh; height: 7vh;
@ -376,7 +375,7 @@ export default {
} }
.content { .content {
height: 22vh; height: 24vh;
overflow: hidden; overflow: hidden;
> .tableContent { > .tableContent {
@ -423,7 +422,7 @@ export default {
> div { > div {
border-radius: 16px; border-radius: 16px;
width: 28%; width: 28%;
height: 23vh; height: 25vh;
display: flex; display: flex;
font-weight: 700; font-weight: 700;
flex-direction: column; flex-direction: column;
@ -463,9 +462,9 @@ export default {
color: #000; color: #000;
line-height: 6vh; line-height: 6vh;
padding-left: 1vw; padding-left: 1vw;
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
margin: 10px 0 15px;
} }
.echarts { .echarts {

View File

@ -7,7 +7,7 @@
:width="width" :width="width"
:fullscreen="false" :fullscreen="false"
append-to-body append-to-body
top="15vh" top="5vh"
:close-on-click-modal="false" :close-on-click-modal="false"
@open="$emit('open')" @open="$emit('open')"
@close="$emit('close')" @close="$emit('close')"
@ -100,3 +100,6 @@ export default {
transition: all .8s; transition: all .8s;
} }
</style> </style>
<style>
</style>

View File

@ -1,13 +1,13 @@
<template> <template>
<el-date-picker <el-date-picker
v-model="dateData" v-model="dateData"
:type="datePickerType" type="datetime"
align="left" align="left"
unlink-panels unlink-panels
range-separator="至" range-separator="至"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
:disabled="disabled" :disabled="disabled"
:picker-options=" :picker-options="
datePickerType === 'date' ? DatePickerOptions : datedateRangePickerOptions datePickerType === 'date' ? DatePickerOptions : datedateRangePickerOptions

View File

@ -16,7 +16,7 @@
:gutter="24" :gutter="24"
v-for="(item, index) in formRow" v-for="(item, index) in formRow"
:key="index" :key="index"
style="margin-bottom: 10px" style="margin-bottom: 20px"
> >
<el-col <el-col
v-for="(row, indexRow) in item.elCol" v-for="(row, indexRow) in item.elCol"
@ -73,24 +73,25 @@
:type="row.type ? row.type : 'text'" :type="row.type ? row.type : 'text'"
:maxlength="row.maxlength ? row.maxlength : ''" :maxlength="row.maxlength ? row.maxlength : ''"
:placeholder="!row.placeholder ? '请输入' : row.placeholder" :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)" @blur="searchByStationName(row.id)"
min="1" min="1"
@input="row.rules ? integerNumber(row) : ''" @input="(row.rules || row.type === 'num') ? integerNumber(row) : ''"
> >
</el-input> </el-input>
<el-input-number <!-- <el-input-number-->
v-if="row.tag === 'num' || (row.type === 'num' && !lookFlag)" <!-- v-if="row.tag === 'num' || (row.type === 'num' && !lookFlag)"-->
v-model="ruleForm[row.id]" <!-- v-model="ruleForm[row.id]"-->
style="width: 100%" <!-- style="width: 100%"-->
:disabled="row.disabled && !newFlag ? row.disabled : false" <!-- :disabled="row.disabled && !newFlag ? row.disabled : false"-->
:precision="row.precisionNum ? row.precisionNum : 0" <!-- :precision="row.precisionNum ? row.precisionNum : 0"-->
:step="row.stepNum ? row.stepNum : 1" <!-- :step="row.stepNum ? row.stepNum : 1"-->
@change="handleChange" <!-- @change="handleChange"-->
:min="0" <!-- :min="0"-->
:max="row.maxNum ? row.maxNum : 99999999999" <!-- :max="row.maxNum ? row.maxNum : 99999999999"-->
:label="!row.placeholder ? '描述文字' : row.placeholder" <!-- :label="!row.placeholder ? '描述文字' : row.placeholder"-->
></el-input-number> <!-- :controls="false"-->
<!-- ></el-input-number>-->
<!-- <div v-if="row.prop=='address'" id="container" <!-- <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;"> style="display:none;margin-top:30px;width: 730px;margin:0 auto;height: 590px;border: 1px solid gray;overflow:hidden;">
</div> --> </div> -->
@ -525,8 +526,8 @@ export default {
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '') this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '')
} }
// decimal // decimal
if (row.rulesName == 'decimal') { if (row.rulesName == 'decimal' || row.type === 'num') {
this.ruleForm[row.prop] = this.ruleForm[row.prop] this.ruleForm[row.id] = this.ruleForm[row.id]
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
.replace('.', '$#$') .replace('.', '$#$')
@ -828,6 +829,7 @@ export default {
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
.label { .label {
/* @include fontBase(16px, #333333) ; */ /* @include fontBase(16px, #333333) ; */
color: #333; color: #333;
@ -923,7 +925,8 @@ export default {
resize: none; resize: none;
} }
} }
::v-deep .el-form-item__label{
::v-deep .el-form-item__label {
padding: 0 !important; padding: 0 !important;
} }
</style> </style>

View File

@ -5,7 +5,7 @@
--> -->
<template> <template>
<div class="pageTion" flex="main:right"> <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"> @current-change="currentChange" @size-change="sizeChange" background layout="prev, pager, next,jumper,total,sizes">
</el-pagination> </el-pagination>
</div> </div>

View File

@ -77,7 +77,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 --> <!-- 定义插槽父组件可以使用 v-slot:prop="{row}" 搭配template标签自定义每一列单元格的样式与操作 -->
<el-radio v-model="radioIndex" :label="scope.$index" <el-radio v-model="radioIndex" :label="scope.$index"
><span></span ><span></span
></el-radio> ></el-radio>
</template> </template>
</el-table-column> </el-table-column>
@ -101,13 +101,14 @@
<template v-if="scope.$index + 1 != tableInfo.tableData.length || lookflag"> <template v-if="scope.$index + 1 != tableInfo.tableData.length || lookflag">
<template v-if="!lookflag"> <template v-if="!lookflag">
<el-input <el-input
v-if="item.type === 'input' || item.type === 'textrea'" v-if="item.type === 'input' || item.type === 'textrea' || item.type ==='num' "
:disabled=" :disabled="
lookflag || scope.$index + 1 == tableInfo.tableData.length lookflag || scope.$index + 1 == tableInfo.tableData.length
" "
v-model="tableInfo.tableData[scope.row.index][item.id]" v-model="tableInfo.tableData[scope.row.index][item.id]"
placeholder="" placeholder=""
:maxlength="item.maxlength ? item.maxlength : ''" :maxlength="item.maxlength ? item.maxlength : ''"
@input="(item.rules || item.type === 'num') ? integerNumber(item,tableInfo.tableData[scope.row.index]) : ''"
></el-input> ></el-input>
<el-input <el-input
v-if="item.type === 'number'" v-if="item.type === 'number'"
@ -163,8 +164,9 @@
>{{ >{{
tableInfo.tableData[scope.row.index][item.id] tableInfo.tableData[scope.row.index][item.id]
? tableInfo.tableData[scope.row.index][item.id] ? tableInfo.tableData[scope.row.index][item.id]
: "点击这里..." : '点击这里...'
}}</el-link }}
</el-link
> >
<div v-if="item.type === 'text'"> <div v-if="item.type === 'text'">
<el-tooltip class="item" effect="dark" placement="top"> <el-tooltip class="item" effect="dark" placement="top">
@ -292,7 +294,7 @@
</baseCascader> </baseCascader>
<div v-if="item.type === 'datepick'"> <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> </div>
<el-checkbox <el-checkbox
@ -335,7 +337,7 @@
<span <span
style="color: #fff; font-weight: 700" style="color: #fff; font-weight: 700"
v-if="!item.ifField && !item.hiddenField" v-if="!item.ifField && !item.hiddenField"
>{{ item.text }}</span >{{ item.text }}</span
> >
<span <span
:style="{ :style="{
@ -345,7 +347,7 @@
: item.color, : item.color,
}" }"
v-if="item.ifField" v-if="item.ifField"
>{{ >{{
scope.row[item.ifField] == item.fieldVal scope.row[item.ifField] == item.fieldVal
? item.fieldTxt ? item.fieldTxt
: item.text : item.text
@ -360,60 +362,61 @@
</div> </div>
</template> </template>
<script> <script>
import baseCascader from "./baseCascader/index"; import baseCascader from './baseCascader/index'
import { deepClone } from "@/utils/index.js"; import { deepClone } from '@/utils/index.js'
import execMathExpress from "exec-mathexpress"; import execMathExpress from 'exec-mathexpress'
import BaseDatePicker from "./baseDatePicker.vue"; import BaseDatePicker from './baseDatePicker.vue'
import BaseSelect from "./baseNewSelect.vue"; import BaseSelect from './baseNewSelect.vue'
export default { export default {
props: { props: {
// //
formIndex: { formIndex: {
type: Number, type: Number,
default: 0, default: 0
}, },
lookflag: { lookflag: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
tableInfo: { tableInfo: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, }
}, },
// //
tableMaxHeight: { tableMaxHeight: {
type: [String, Number], type: [String, Number]
}, },
// loading // loading
tabLoading: { tabLoading: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// icon // icon
indexOperate: { indexOperate: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// //
fixedTable: { fixedTable: {
type: [Boolean, String], type: [Boolean, String],
default: false, default: false
}, },
// //
slotrow: { slotrow: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
showsummary: { showsummary: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// //
tableHeight: { tableHeight: {
type: [Number, String], type: [Number, String],
default: "auto", default: 'auto'
}, },
// //
// windowHight: { // windowHight: {
@ -423,67 +426,67 @@ export default {
// //
size: { size: {
type: String, type: String,
default: "small", default: 'small'
}, },
// //
tableData: { tableData: {
type: Array, type: Array,
default: () => { default: () => {
return []; return []
}, }
}, },
// //
detailFields: { detailFields: {
type: Array, type: Array,
default: () => { default: () => {
return []; return []
}, }
}, },
// index // index
SummariesIndex: { SummariesIndex: {
type: Array, type: Array,
default: () => { default: () => {
return []; return []
}, }
}, },
// //
showSelect: { showSelect: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// //
showIndex: { showIndex: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// //
funData: { funData: {
type: Array, type: Array,
default: () => { default: () => {
return []; return []
}, }
}, },
// //
funWidth: { funWidth: {
type: Number, type: Number,
default: 100, default: 100
}, },
// //
border: { border: {
type: Boolean, type: Boolean,
default: true, default: true
}, },
// //
highlightCurrent: { highlightCurrent: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// //
sortableSwitch: { sortableSwitch: {
type: Boolean, type: Boolean,
default: false, default: false
}, }
// headerStyle:{ // headerStyle:{
// type: String, // type: String,
// default:{ // default:{
@ -495,60 +498,101 @@ export default {
data() { data() {
return { return {
headerStyle: { headerStyle: {
"background-color": "#F5F5F5", 'background-color': '#F5F5F5',
color: "#333333", color: '#333333'
}, },
itemKey: true, itemKey: true,
radioIndex: false, radioIndex: false
}; }
},
created() {
}, },
created() {},
mounted() { mounted() {
}, },
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
calculator(item, row) { integerNumber(row, table) {
let obj = {}; console.log(row, 'row')
item.computeId.forEach((ele) => { // decimal
obj[ele] = row[ele]; if (row.rulesName == 'decimal' || row.type === 'num') {
}); table[row.id] = table[row.id]
let result; .replace(/[^\d.]/g, '')
try { .replace(/\.{2,}/g, '.')
let { num, den } = execMathExpress(item.total, obj); .replace('.', '$#$')
result = num / den; .replace(/\./g, '')
} catch (error) { .replace('$#$', '.')
return "数字不合法"; .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) { clickBoxHandle(row) {
this.$emit( this.$emit(
"clickBox", 'clickBox',
this.tableInfo, this.tableInfo,
row.index, row.index,
this.tableInfo.tableData[row.index].id, this.tableInfo.tableData[row.index].id,
this.formIndex this.formIndex
); )
}, },
select(selection, row) { select(selection, row) {
this.$emit("select", selection, row); this.$emit('select', selection, row)
}, },
selectAll(selection) { selectAll(selection) {
this.$emit("selectAll", selection); this.$emit('selectAll', selection)
}, },
setTableKey() { setTableKey() {
this.itemKey = !this.itemKey; this.itemKey = !this.itemKey
}, },
// //
doubleClick(row, column, cell, event) { doubleClick(row, column, cell, event) {
this.$emit("doubleClick", row, column, cell, event); this.$emit('doubleClick', row, column, cell, event)
}, },
// //
clearSelect() { clearSelect() {
this.$refs.elTable.clearSelection(); this.$refs.elTable.clearSelection()
}, },
/** /**
* @description 单元格点击事件 * @description 单元格点击事件
@ -563,34 +607,34 @@ export default {
* } * }
*/ */
getCellClick(row, column) { getCellClick(row, column) {
let label = column.label; let label = column.label
// let itemColumn = this.detailFields.filter(item => { // let itemColumn = this.detailFields.filter(item => {
// return item.label === label // return item.label === label
// }) // })
// if (itemColumn[0] && itemColumn[0].other && itemColumn[0].other.isClick) { // 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); this.$emit('onCellClick', row, label)
}, },
// //
getRowClick(row, column, event) { getRowClick(row, column, event) {
this.handleCurrentChange(row); this.handleCurrentChange(row)
this.$emit("onRowClick", row); this.$emit('onRowClick', row)
}, },
// //
rowDblclick(row, column, event) { rowDblclick(row, column, event) {
if (this.showSelect) { if (this.showSelect) {
this.toggleSelection([row]); this.toggleSelection([row])
} }
this.$emit("rowDblclick", row); this.$emit('rowDblclick', row)
}, },
// id,row-keykey // id,row-keykey
getRowKey(row) { getRowKey(row) {
return row.id; return row.id
}, },
// //
handleSelectionChange(selectTable) { handleSelectionChange(selectTable) {
this.$emit("onSelectionChange", selectTable); this.$emit('onSelectionChange', selectTable)
}, },
/** /**
* 触发操作事件 * 触发操作事件
@ -598,27 +642,27 @@ export default {
* 参数2当前按钮所在行数据 * 参数2当前按钮所在行数据
*/ */
funcEmit(row, item) { funcEmit(row, item) {
this.$emit("onFunc", row, item, this.tableInfo, this.formIndex); this.$emit('onFunc', row, item, this.tableInfo, this.formIndex)
}, },
// :descending;ascending // :descending;ascending
sortChange(column) { sortChange(column) {
this.$emit("sortChange", column); this.$emit('sortChange', column)
}, },
// //
handleCurrentChange(val) { handleCurrentChange(val) {
this.radioIndex = val.index; this.radioIndex = val.index
this.$emit("radioChange", val); this.$emit('radioChange', val)
}, },
clearRadioIndex() { clearRadioIndex() {
this.radioIndex = false; this.radioIndex = false
}, },
setRadioIndex(index) { setRadioIndex(index) {
this.radioIndex = index; this.radioIndex = index
}, },
// index // index
tableCellName({ row, column, rowIndex, columnINdex }) { tableCellName({ row, column, rowIndex, columnINdex }) {
row.index = rowIndex; row.index = rowIndex
column.index = columnINdex; column.index = columnINdex
}, },
// tableRowClassName({ row,rowIndex}) { // tableRowClassName({ row,rowIndex}) {
// if (rowIndex === 1) { // if (rowIndex === 1) {
@ -628,19 +672,19 @@ export default {
// } // }
// return ''; // return '';
// }, // },
tableRowClassName: function ({ row, rowIndex }) { tableRowClassName: function({ row, rowIndex }) {
let data = ""; let data = ''
this.$emit("row-class-name", { row: row, rowIndex: rowIndex }, (val) => { this.$emit('row-class-name', { row: row, rowIndex: rowIndex }, (val) => {
data = val; data = val
}); })
return data; //string return data //string
}, },
newRow() { newRow() {
this.$emit("newRow", this.tableInfo, this.formIndex); this.$emit('newRow', this.tableInfo, this.formIndex)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.elTable.bodyWrapper.scrollTop = this.$refs.elTable.bodyWrapper.scrollTop =
this.$refs.elTable.bodyWrapper.scrollHeight; this.$refs.elTable.bodyWrapper.scrollHeight
}); })
}, },
//, //,
// rowDrop() { // rowDrop() {
@ -671,49 +715,49 @@ export default {
toggleSelection(rowData, selected) { toggleSelection(rowData, selected) {
if (rowData) { if (rowData) {
rowData.forEach((row) => { rowData.forEach((row) => {
this.$refs.elTable.toggleRowSelection(row, selected); this.$refs.elTable.toggleRowSelection(row, selected)
}); })
} else { } else {
this.$refs.elTable.clearSelection(); this.$refs.elTable.clearSelection()
} }
}, },
// //
getSummaries(params) { getSummaries(params) {
const { columns, data } = params; const { columns, data } = params
const sums = []; const sums = []
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = "合计"; sums[index] = '合计'
return; return
} }
this.SummariesIndex.forEach((el) => { this.SummariesIndex.forEach((el) => {
if (index == 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))) { if (!values.every((value) => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
return prev + curr; return prev + curr
} else { } else {
return prev; return prev
} }
}, 0); }, 0)
sums[index] = sums[index].toFixed(2); sums[index] = sums[index].toFixed(2)
} else { } else {
sums[index] = ""; sums[index] = ''
} }
} }
}); })
}); })
return sums; return sums
}, }
}, },
components: { components: {
BaseSelect, BaseSelect,
BaseDatePicker, BaseDatePicker,
baseCascader, baseCascader
}, }
}; }
</script> </script>
<style> <style>
@ -721,6 +765,7 @@ input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { input::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
} }
.el-table .warning-row { .el-table .warning-row {
background: #ffe562; background: #ffe562;
} }
@ -739,7 +784,7 @@ input::-webkit-inner-spin-button {
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
>>> .el-radio__label { > > > .el-radio__label {
// display: none; // display: none;
} }
@ -754,10 +799,12 @@ input::-webkit-inner-spin-button {
::v-deep .cell { ::v-deep .cell {
font-weight: 400; font-weight: 400;
} }
::v-deep .el-table__row { ::v-deep .el-table__row {
height: 60px !important; height: 60px !important;
background-color: #fcfcfc; background-color: #fcfcfc;
} }
// ::v-deep .el-table .sort-caret.ascending { // ::v-deep .el-table .sort-caret.ascending {
// top: 1px // top: 1px
// } // }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.2"> <div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.18">
<BaseMenuTree <BaseMenuTree
:menuData="treeData" :menuData="treeData"
:filterShow="false" :filterShow="false"
@ -13,7 +13,7 @@
ref="menuTree" ref="menuTree"
></BaseMenuTree> ></BaseMenuTree>
</div> </div>
<div class="main" :style="{flex:$route.query.viewType === '1'?0.8:1}" v-loading="mainLoading"> <div class="main" :style="{flex:$route.query.viewType === '1'?0.82:1}" v-loading="mainLoading">
<div class="top"> <div class="top">
<div class="search"> <div class="search">
<BaseNewForm <BaseNewForm
@ -67,7 +67,7 @@
</div> </div>
</div v-> </div v->
<baseDialog title="数据设置" 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 style="margin: 20px 10px; font-size: 18px; font-weight: 700">
基本信息 基本信息
</h1> </h1>
<div class="dialogForm" v-if="dialogShow" style="padding: 0 20px"> <div class="dialogForm" v-if="dialogShow" style="padding: 0 20px">
@ -82,7 +82,7 @@
:isFunBtn="false" :isFunBtn="false"
ref="dialogForm" ref="dialogForm"
></BaseNewForm> ></BaseNewForm>
</div v-> </div>
<template v-for="(item, index) in dialogTabaleInfo"> <template v-for="(item, index) in dialogTabaleInfo">
<div class="sonTable"> <div class="sonTable">
<h1 style="margin: 20px 0; font-size: 20px; font-weight: 700"> <h1 style="margin: 20px 0; font-size: 20px; font-weight: 700">
@ -309,6 +309,7 @@ export default {
dj: 'queryMdmShow' dj: 'queryMdmShow'
}, { mdmCode: this.$route.meta.mdmCode }) }, { mdmCode: this.$route.meta.mdmCode })
// //
if (this.$route.query.viewType === '1') { if (this.$route.query.viewType === '1') {
this.treeObj.label = res.attribute.mdmModuleViewEntity.viewFiled this.treeObj.label = res.attribute.mdmModuleViewEntity.viewFiled
this.treeObj.upId = res.attribute.mdmModuleViewEntity.upIdFiled this.treeObj.upId = res.attribute.mdmModuleViewEntity.upIdFiled
@ -418,6 +419,7 @@ export default {
// //
async buttonHandle(item) { async buttonHandle(item) {
if (item.buttonType === 'search') { if (item.buttonType === 'search') {
this.pageModel.pageIndex = 1
this.searchHandle() this.searchHandle()
} else if (item.buttonType === 'resize') { } else if (item.buttonType === 'resize') {
this.searchForm = {} this.searchForm = {}
@ -895,7 +897,7 @@ export default {
// this.sendHandle(row.rowId) // this.sendHandle(row.rowId)
} }
}, },
created() { created() {
this.init() this.init()
} }
, ,

View File

@ -324,6 +324,7 @@ import baseDatePicker from './baseDatePicker.vue'
import baseNewSelect from './baseNewSelect' import baseNewSelect from './baseNewSelect'
import { checkMobile } from '@/utils/util' import { checkMobile } from '@/utils/util'
import { BaseSelect } from './baseSelect.vue' import { BaseSelect } from './baseSelect.vue'
export default { export default {
components: { components: {
// uploadFile, // uploadFile,
@ -813,10 +814,6 @@ export default {
line-height: 1.2; 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 { .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
margin-right: 0; margin-right: 0;
@ -824,6 +821,11 @@ export default {
} }
</style> </style>
<style scoped lang="scss"> <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 { ::v-deep .el-form-item__label {
padding: 0 0 10px !important; padding: 0 0 10px !important;
} }

View File

@ -250,7 +250,7 @@ export default {
// ( // (
mainDeleOnFunc(row, item) { mainDeleOnFunc(row, item) {
console.log(row, 'row') console.log(row, 'row')
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '确定是否删除?' let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '是否确定删除?'
this.$confirm(msg) this.$confirm(msg)
.then(async(_) => { .then(async(_) => {
this.openLoading('submit') this.openLoading('submit')
@ -299,7 +299,7 @@ export default {
}, },
// //
activedOnFunc(row) { activedOnFunc(row) {
this.$confirm('确定删除?') this.$confirm('是否确定删除?')
.then(async(_) => { .then(async(_) => {
this.openLoading('submit') this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', { const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
@ -566,7 +566,7 @@ export default {
width: 100%; width: 100%;
.name { .name {
margin-right: 20px; margin-right: 10px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
@ -579,6 +579,9 @@ export default {
.value { .value {
display: flex; display: flex;
align-items: center; align-items: center;
border: 1px solid #ebebeb;
padding: 10px 15px;
border-radius: 5px;
} }
.btn { .btn {

View File

@ -1,24 +1,24 @@
<template> <template>
<div class="ruleAddTable"> <div class="ruleAddTable">
<BaseTable <BaseTable
ref="receiptsTable" ref="receiptsTable"
:showIndex="true" :showIndex="true"
:tableData="ruleAddTableData" :tableData="ruleAddTableData"
:tableColumn="receiptsTableColumn" :tableColumn="receiptsTableColumn"
:border="false" :border="false"
:funData="receiptsFunData" :funData="receiptsFunData"
tableHeight="60vh" tableHeight="60vh"
@onFunc="receiptsOnFunc" @onFunc="receiptsOnFunc"
> >
<template #dbType="{row}"> <template #dbType="{row}">
<el-select v-model="row['dbType']" placeholder="请选择" <el-select v-model="row['dbType']" placeholder="请选择"
@change="(val)=>ruleTypeSeleceChangHandle(val,row)" @change="(val)=>ruleTypeSeleceChangHandle(val,row)"
> >
<el-option <el-option
v-for="item in ruleTypeOptions" v-for="item in ruleTypeOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -32,10 +32,10 @@
<div v-else-if="row['dbType'] === '3'"> <div v-else-if="row['dbType'] === '3'">
<el-select v-model="row.dbValue" placeholder="请选择" style="width: 100%;"> <el-select v-model="row.dbValue" placeholder="请选择" style="width: 100%;">
<el-option <el-option
v-for="item in dateOptions" v-for="item in dateOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -44,6 +44,11 @@
<el-input v-model="row.dbValue" @input="(val)=>integerNumber(val,row)"></el-input> <el-input v-model="row.dbValue" @input="(val)=>integerNumber(val,row)"></el-input>
</div> </div>
</template> </template>
<template #operation="{row}">
<div class="deleBtn" @click="receiptsOnFunc(row)">
<img src="./images/删除.png" alt="">
</div>
</template>
</BaseTable> </BaseTable>
<div class="receiptsAddRow" style="margin-top: 30px; <div class="receiptsAddRow" style="margin-top: 30px;
border: 1px dotted #ccc; border: 1px dotted #ccc;
@ -52,9 +57,9 @@
line-height: 50px;" line-height: 50px;"
> >
<el-link <el-link
type="primary" type="primary"
@click="receiptsAddRow" @click="receiptsAddRow"
:underline="false" :underline="false"
>+ 添加 >+ 添加
</el-link> </el-link>
</div> </div>
@ -79,6 +84,11 @@ export default {
{ {
title: '格式规则', title: '格式规则',
id: 'dbValue' id: 'dbValue'
},
{
title: '操作',
id: 'operation',
width: 70
} }
],// ],//
ruleTypeOptions: [ ruleTypeOptions: [
@ -96,12 +106,7 @@ export default {
value: '4' value: '4'
} }
],// ],//
receiptsFunData: [ receiptsFunData: [],//
{
text: '删除',
color: 'red'
}
],//
dateOptions: [ dateOptions: [
{ {
label: 'yyyy-MM-dd', label: 'yyyy-MM-dd',
@ -119,7 +124,7 @@ export default {
label: 'yyyyMMddHHmmssSSS', label: 'yyyyMMddHHmmssSSS',
value: 'yyyyMMddHHmmssSSS' value: 'yyyyMMddHHmmssSSS'
} }
], ]
} }
}, },
methods: { methods: {
@ -148,5 +153,20 @@ export default {
<style scoped lang="scss"> <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> </style>

View File

@ -581,7 +581,7 @@ export default {
{ {
label: 'datepick', label: 'datepick',
id: 'datepick' id: 'datepick'
}, }
// { // {
// label: 'daterange', // label: 'daterange',
// id: 'daterange' // id: 'daterange'
@ -589,6 +589,17 @@ export default {
] ]
} }
this.optionFormRow[7].elCol[0].options = dist[val] 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) { if (!init) {
this.$set(this.optionRuleForm, 'type', '') this.$set(this.optionRuleForm, 'type', '')
@ -597,6 +608,7 @@ export default {
} }
} }
} }
, ,
// //
@ -692,6 +704,10 @@ export default {
this.$vmNews('长度不能大于255') this.$vmNews('长度不能大于255')
return 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, 'chName', this.optionRuleForm.chName)
this.$set(params, 'enName', this.optionRuleForm.enName) this.$set(params, 'enName', this.optionRuleForm.enName)
this.$set(params, 'filedType', this.optionRuleForm.filedType) this.$set(params, 'filedType', this.optionRuleForm.filedType)

View File

@ -4,25 +4,25 @@
<div class="btn"> <div class="btn">
<div class="chunk"> <div class="chunk">
<el-button <el-button
v-if="!editFlag" v-if="!editFlag"
icon="el-icon-edit" icon="el-icon-edit"
type="primary" type="primary"
@click="editFlag=true" @click="editFlag=true"
>编辑 >编辑
</el-button> </el-button>
<el-button <el-button
v-if="editFlag" v-if="editFlag"
icon="el-icon-close" icon="el-icon-close"
@click="getRuleForm" @click="getRuleForm"
:loading="saveLoading" :loading="saveLoading"
>取消 >取消
</el-button> </el-button>
<el-button <el-button
v-if="editFlag" v-if="editFlag"
icon="el-icon-first-aid-kit" icon="el-icon-first-aid-kit"
type="primary" type="primary"
@click="saveHandle" @click="saveHandle"
:loading="saveLoading" :loading="saveLoading"
>保存 >保存
</el-button> </el-button>
</div> </div>
@ -37,15 +37,15 @@
</div> </div>
<div class="form" v-if="displayType == 1"> <div class="form" v-if="displayType == 1">
<baseNewForm <baseNewForm
ref="optionForm" ref="optionForm"
:spanNumber="24" :spanNumber="24"
:isFunBtn="false" :isFunBtn="false"
:formRow="formRow" :formRow="formRow"
:ruleForm="ruleForm" :ruleForm="ruleForm"
:labelPosition="'right'" :labelPosition="'right'"
labelWidth="100px" labelWidth="100px"
@onSubmit="onSubmit" @onSubmit="onSubmit"
:lookFlag="true" :lookFlag="true"
> >
</baseNewForm> </baseNewForm>
</div> </div>
@ -60,14 +60,14 @@
</div> </div>
<div class="form" v-if="displayType == 1"> <div class="form" v-if="displayType == 1">
<baseNewForm <baseNewForm
ref="optionForm" ref="optionForm"
:spanNumber="24" :spanNumber="24"
:isFunBtn="false" :isFunBtn="false"
:formRow="formRow" :formRow="formRow"
:ruleForm="ruleForm" :ruleForm="ruleForm"
:labelPosition="'right'" :labelPosition="'right'"
labelWidth="100px" labelWidth="100px"
@onSubmit="onSubmit" @onSubmit="onSubmit"
> >
</baseNewForm> </baseNewForm>
</div> </div>
@ -177,14 +177,14 @@
<!-- --> <!-- -->
<base-right-dialog <base-right-dialog
ref="mainTableAddtDialog" ref="mainTableAddtDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="mainTableDialogShow" :dialogVisible.sync="mainTableDialogShow"
:title="activeTitle + '设置'" :title="activeTitle + '设置'"
:submitShow="true" :submitShow="true"
:size="'50%'" :size="'50%'"
@handleConfirmClick="mainTableSaveHandle" @handleConfirmClick="mainTableSaveHandle"
@handleClose="mainTableDialogShow=false" @handleClose="mainTableDialogShow=false"
> >
<div class="mainTable"> <div class="mainTable">
<settingChunk ref="settingChunk" @saveSuccessEmit="saveSuccessEmit"></settingChunk> <settingChunk ref="settingChunk" @saveSuccessEmit="saveSuccessEmit"></settingChunk>
@ -442,8 +442,9 @@ export default {
.displayInfo { .displayInfo {
background-color: #fbfbfb; background-color: #fbfbfb;
position: relative; position: relative;
margin-left: 5px;
width: 99%; width: 99%;
margin: 10px 10px 0 5px;
> .btn { > .btn {
display: flex; display: flex;
@ -469,7 +470,7 @@ export default {
> .title { > .title {
font-weight: 600; font-weight: 600;
margin-left: 20px; margin-left: 20px;
margin-bottom: 25px; margin-bottom: 20px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
@ -480,7 +481,7 @@ export default {
} }
> .radio { > .radio {
margin: 20px 20px; margin: 10px 20px;
} }
> .tabIndex { > .tabIndex {
@ -525,7 +526,7 @@ export default {
.setting { .setting {
width: 100%; width: 100%;
height: 140px; height: 15vh;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
@ -539,8 +540,8 @@ export default {
cursor: pointer; cursor: pointer;
.img { .img {
width: 44px; width: 5vh;
height: 44px; height: 5vh;
img { img {
width: 100%; width: 100%;

View File

@ -132,7 +132,7 @@ export default {
methods: { methods: {
// //
deleteHandle(row) { deleteHandle(row) {
this.$confirm('该操作会将数据所有信息都会被删除,是否确认删除?。', '警告', { this.$confirm('该操作将删除所有数据。确定删除吗?。', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'error' type: 'error'
@ -325,8 +325,8 @@ export default {
} }
main { main {
margin-top: 10px; margin-top: 5px;
padding: 20px 20px 5px; padding: 5px 20px 5px;
height: 80vh; height: 80vh;
border-radius: 20px; border-radius: 20px;
background-color: #fff; background-color: #fff;
@ -363,8 +363,9 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
> img { > img {
width: 60px; width: 50px;
height: 60px; height: 50px;
border-radius: 13px;
} }
} }

View File

@ -140,6 +140,7 @@ export default {
//margin-right: 1%; //margin-right: 1%;
background-color: #fff; background-color: #fff;
border-radius: 16px; border-radius: 16px;
margin-top: 10px;
overflow: auto; overflow: auto;
.appInfo { .appInfo {
@ -235,9 +236,9 @@ export default {
} }
.content { .content {
margin-left: 180px; margin-left: 185px;
flex: 1; flex: 1;
width: calc(100% - 190px); width: calc(100% - 195px);
border-radius: 16px; border-radius: 16px;
} }
} }

View File

@ -59,6 +59,7 @@ export default {
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
path: item.path, path: item.path,
name: item.name, name: item.name,
query: {mdmCode: item.meta.mdmCode, viewType: item.meta.viewType}
}); });
window.open(routeData.href, "_self"); window.open(routeData.href, "_self");
}, },

View File

@ -312,18 +312,18 @@ $activeColor: var(--bg-color, yellow);
.el-tree-node__content:hover, .el-tree-node__content:hover,
.el-upload-list__item:hover { .el-upload-list__item:hover {
color: white; color: #333;
background-color: $activeColor !important; background-color: #eef5fe !important;
} }
.el-tree-node:focus>.el-tree-node__content { .el-tree-node:focus>.el-tree-node__content {
color: white; color: #333;
background-color: $activeColor !important; background-color: #eef5fe !important;
} }
.el-tree-node.is-current>.el-tree-node__content { .el-tree-node.is-current>.el-tree-node__content {
color: white; color: #333;
background-color: $activeColor !important; background-color: #eef5fe !important;
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -10,6 +10,9 @@
<!-- <template v-slot:option="{row}"> <!-- <template v-slot:option="{row}">
<el-radio v-model="radioIndex" :label="row.$index"><span></span></el-radio> <el-radio v-model="radioIndex" :label="row.$index"><span></span></el-radio>
</template> --> </template> -->
<template #enableState="{row}">
{{ row.row.enableState == 0 ? '启用' : '停用'}}
</template>
</base-table> </base-table>
</div> </div>
</base-layout> </base-layout>
@ -107,6 +110,12 @@ export default {
prop: 'description', prop: 'description',
tooltip: true, tooltip: true,
}, },
{
label: '启用状态',
prop: 'enableState',
tooltip: true,
},
], ],
RoleAdd: false, RoleAdd: false,
ruleForm: { ruleForm: {

View File

@ -1,98 +1,109 @@
<template> <template>
<base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible" :appendBody="true" <base-right-dialog ref="baseRightDialog" :footerShow="true" :dialogVisible.sync="dialogVisible" :appendBody="true"
:title="dialogTitle + ' 角色'" :submitShow="submitShow" @handleClose="handleDialogClose" :title="dialogTitle + ' 角色'" :submitShow="submitShow" @handleClose="handleDialogClose"
@handleConfirmClick="handleConfirmClick"> @handleConfirmClick="handleConfirmClick"
<base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="rules" class="dialog_form" >
:spanWidth="`120px`" :loading="vLoading" @elDialogClick="elDialogClick"></base-form> <base-form ref="basicsForm" :formRow="formRow" :isFunBtn="false" :rules="rules" class="dialog_form"
</base-right-dialog> :spanWidth="`120px`" :loading="vLoading" @elDialogClick="elDialogClick"
></base-form>
</base-right-dialog>
</template> </template>
<script> <script>
import baseRightDialog from "@/components/base/baseRightDialog"; import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from "@/components/base/baseNewForm/index.vue"; import baseForm from '@/components/base/baseNewForm/index.vue'
import configData from "./configData"; import configData from './configData'
import { import {
authApi authApi
} from '@/api/apis/auth' } 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() {},
} 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> </script>
<style> <style lang="scss" scoped>
::v-deep .el-form-item--medium {
display: flex;
align-items: center;
flex-direction: column;
justify-content: flex-end;
}
</style> </style>

View File

@ -41,8 +41,8 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://hzya.ufyct.com:9067/`, // target: `http://hzya.ufyct.com:9067/`,
// target: `http://127.0.0.1:9081/`, // target: `http://127.0.0.1:9081/`,
// target: `http://192.168.2.78:9999`, target: `http://192.168.2.78:9999`,
target: `http://192.168.2.83:9999`, // target: `http://192.168.2.83:9999`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",