From 514c220eb2800b7e945e1bb46db178500b4f16c9 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 29 十一月 2023 10:46:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 149 +++++----
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 80 ++---
Source/UBCS-WEB/src/views/system/user.vue | 660 +++++++++++++++++++++----------------------
3 files changed, 444 insertions(+), 445 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
index b633a29..b8bfceb 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -75,7 +75,7 @@
// 琛ㄥ崟绫诲瀷锛坅dd, edit, detail锛�
type: {
type: String,
- default: "",
+ default: "add",
},
// 鑷畾涔夎〃鍗曠被鍨�
selfColumnType: {
@@ -106,6 +106,8 @@
},
data() {
return {
+ //骞翠唬鍙�
+ dataYearValue:null,
filteredObject: {},
filteredArray: [],
isSeriesType: {},
@@ -139,7 +141,7 @@
// 琛ㄥ崟灞炴��
attributes: [],
slotColumnList: [],
- isShow:null,
+ isShow: "",
};
},
mounted() {
@@ -170,12 +172,6 @@
immediate: true,
handler(newV) {
this.$emit("getFormData", newV);
- // console.log("filteredObject",this.filteredObject)
- if (this.filteredObject.label === "绯诲垪鍙�") {
- if (newV.isSeries === "false") {
- this.filteredObject.disabled = true;
- }
- }
},
},
attrList: {
@@ -184,15 +180,6 @@
handler(newVal, oldVal) {
if (newVal) {
this.$emit("attrList", newVal)
- }
- }
- },
- isSeriesType: {
- deep: true,
- immediate: true,
- handler(newVal, oldVal) {
- if (newVal) {
- this.$emit("isSeriesType", newVal)
}
}
},
@@ -205,11 +192,22 @@
deep: true,
immediate: true
},
+ isShow: {
+ handler(newV) {
+ this.$emit("isShow", newV)
+ }
+ },
+ dataYearValue:{
+ handler(newV){
+ if(newV){
+ this.$emit("dataYearValue",newV)
+ }
+ }
+ }
},
methods: {
// 娓叉煋琛ㄥ崟妯℃澘
templateRender(formItemList, TreeValue) {
- // debugger
if (this.eventList) {
this.eventFlag = this.eventList.some(item => {
if (item.classifyInvokeEditFlag === 'true') {
@@ -224,18 +222,12 @@
let dictKeys = [];
let slotColumnList = [];
formItemList.forEach((formItem) => {
- console.log('formItem',formItem);
formItem = this.resetFormConfig(formItem);
//灞炴�х爜娈佃鍒�
if (formItem.secType === "codeattrsec") {
this.attrList.push(formItem);
}
//绯诲垪鍙疯鍒�
- if (formItem.label === "绯诲垪鍙�") {
- this.isSeriesType = formItem;
- // console.log("绯诲垪鍙�",formItem)
- }
- //鏇存敼鏂瑰紡瑙勫垯
if (formItem.field === "codeStandardEditType") {
if (this.status === "amend") {
formItem.readOnly = true;
@@ -281,23 +273,27 @@
formItem.fieldMap[formItem.field + 'id'] = 'id'
}
-
let columnItem = {
change: (val) => {
- // console.log(val)
if (val.column.field === "drawingno") {
this.codeattrsecValue = val.value;
return;
}
- ;
+ //鏄惁绯诲垪-绯诲垪鍙�
if (val.column.field === "isSeries") {
if (val.value === "false") {
this.isShow = true;
- }else {
+ } else {
this.isShow = false;
}
}
-
+ if(val.column.field === "releaseDate"){
+ if(val.value){
+ this.dataYearValue = val.column.valueFormat;
+ }else {
+ this.dataYearValue = null;
+ }
+ }
},
dataKey: formItem.dataKey || formItem.field,
label: formItem.text,
@@ -308,8 +304,7 @@
field: formItem.field,
type: this.columnType[formItem.type],
dicData: this.getDataList(formItem.type, formItem.data),
- disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false) ||
- (this.isShow && formItem.label === "绯诲垪鍙�" ? true : false),
+ disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false),
prepend: this.preOrSufFixShow("text", formItem.prefix),
append: this.preOrSufFixShow("text", formItem.suffix),
prefixIcon: this.preOrSufFixShow("icon", formItem.prefix),
@@ -319,13 +314,10 @@
keyAttr: formItem.keyAttr,
value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) ||
(formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) ||
- (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) ||
- (formItem.field === "isSeries" ? "true" : null),
+ (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null),
placeholder: formItem.inputTip,
comboxKey: formItem.comboxKey,
tip: formItem.tooltips,
- // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false,
- // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false ,
display: !formItem.hidden,
maxlength: formItem.maxlength,
filterable: true,
@@ -364,7 +356,6 @@
},
};
this.filteredObject = columnItem
- // console.log("columnItem", columnItem)
slotColumnList.push(columnItem);
if (group.length === 0) {
column.push(columnItem);
@@ -373,9 +364,7 @@
}
});
- // this.filteredArray = column.filter(obj => obj.label === "绯诲垪鍙�");
this.slotColumnList = slotColumnList;
- // console.log(slotColumnList)
this.$set(this.option, "column", column);
this.$set(this.option, "group", group);
this.updateIndex++;
@@ -387,9 +376,12 @@
this.getFormDetail();
},
//淇敼绾ц仈椤�
- changeChildItem(items, TreeValue) {
- let column = this.option.column;
- let group = this.option.group;
+ changeChildItem(items, TreeValue, type) {
+ type = type || "add"
+ // let column = this.option.column;
+ // let group = this.option.group;
+ let column = [];
+ let group = [];
let that = this;
items.forEach((item) => {
let formItem = this.resetFormConfig(item);
@@ -412,9 +404,6 @@
formItem.fieldMap[formItem.field + 'id'] = 'id'
}
let columnItem = {
- change: (val) => {
- // console.log('1', val)
- },
label: formItem.text,
labelslot: true,
prop: this.$utilFunc.isValuableObj(formItem.referConfig)
@@ -423,7 +412,7 @@
field: formItem.field,
type: this.columnType[formItem.type],
dicData: this.getDataList(formItem.type, formItem.data),
- disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false),
+ disabled: type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false),
prepend: this.preOrSufFixShow("text", formItem.prefix),
append: this.preOrSufFixShow("text", formItem.suffix),
prefixIcon: this.preOrSufFixShow("icon", formItem.prefix),
@@ -475,7 +464,6 @@
value: "key",
},
};
-
if (group.length === 0) {
that.slotColumnList.forEach((colItem, index) => {
if (colItem.field == columnItem.field) {
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index dd94ab2..2ad4a80 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -1,85 +1,88 @@
<template>
<el-dialog
- :visible.sync="dialogVisible"
v-if="dialogVisible"
v-dialogDrag
- top="-5vh"
- class="avue-dialog avue-dialog--top"
:title="title"
+ :visible.sync="dialogVisible"
:width="width"
append-to-body
+ class="avue-dialog avue-dialog--top"
+ top="-5vh"
@opened="openDialog"
>
<FormTemplate
- key="masterForm" data-key="masterForm"
- :status="status"
- v-bind="$attrs"
- :type="type"
- :TreeValue="TreeValue"
- :rowOid="rowOid"
- :eventList="eventList"
- :templateOid="templateOid"
- v-if="dialogVisible"
+ v-if="dialogVisible" key="masterForm"
ref="FormTemplate"
+ v-bind="$attrs"
+ :TreeValue="TreeValue"
+ :eventList="eventList"
+ :rowOid="rowOid"
+ :status="status"
+ :templateOid="templateOid"
+ :type="type"
+ data-key="masterForm"
@getFormData="getFormData"
+ @isShow="isShowHandler"
+ @dataYearValue="dataYearHandler"
></FormTemplate>
<div
- class="tab_box"
v-if="
type !== 'detail' &&
dialogVisible &&
(showCodeApply || showResembleQuery) &&
type !== 'preview'
"
+ class="tab_box"
>
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
- <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply">
+ <el-tab-pane v-if="showCodeApply" label="鐮佸�肩敵璇�" name="codeApply">
<FormTemplate
- key="codeApplyForm" data-key="codeApplyForm"
- secDTOListv-bind="$attrs"
- :type="type"
- :selfColumnType="selfColumnType"
+ key="codeApplyForm" ref="CodeApply"
:selfColumnConfig="selfColumnConfig"
- ref="CodeApply"
- @getFormData="getCodeApplyFormData"
+ :selfColumnType="selfColumnType"
+ :type="type"
+ data-key="codeApplyForm"
+ secDTOListv-bind="$attrs"
@attrList="attrListForm"
- @isSeriesType="isSeriesTypeString"
+ @getFormData="getCodeApplyFormData"
@referConfigDataUpdate="referConfigDataUpdate"
></FormTemplate>
</el-tab-pane>
<el-tab-pane
+ v-if="showResembleQuery"
label="鐩镐技椤规煡璇�"
name="resembleQuery"
- v-if="showResembleQuery"
>
<ResembleQuery
- v-bind="$attrs"
ref="resembleQueryRef"
- :hasResemble="this.hasResemble"
- :column="this.resembleTableColumn"
+ v-bind="$attrs"
:codeClassifyOid="codeClassifyOid"
+ :column="this.resembleTableColumn"
:form="this.form"
+ :hasResemble="this.hasResemble"
:templateOid="templateOid"
></ResembleQuery>
</el-tab-pane>
</el-tabs>
</div>
<template #footer>
- <div class="" v-if="type !== 'detail'">
- <el-button @click="close()" size="small">鍙� 娑�</el-button>
+ <div v-if="type !== 'detail'" class="">
+ <el-button size="small" @click="close()">鍙� 娑�</el-button>
<el-button
- @click="submit()"
- type="primary"
:loading="submitBtnLoading"
size="small"
- >{{ submitText }}</el-button
+ type="primary"
+ @click="submit()"
+ >{{ submitText }}
+ </el-button
>
<el-button
- @click="resembleQuerySubmit"
- type="primary"
- size="small"
v-if="showResembleQuery"
- >鐩镐技鍍忔煡璇�</el-button
+ size="small"
+ type="primary"
+ @click="resembleQuerySubmit"
+ >鐩镐技鍍忔煡璇�
+ </el-button
>
</div>
</template>
@@ -87,14 +90,15 @@
</template>
<script>
-import { getCodeRule, getFormTemplate } from "@/api/formTemplate.js";
+import {getCodeRule, getFormTemplate} from "@/api/formTemplate.js";
import FormTemplate from "./FormTemplate";
import ResembleQuery from "./ResembleQuery";
+
export default {
name: "FormTemplateDialog",
- components: { ResembleQuery, FormTemplate },
+ components: {ResembleQuery, FormTemplate},
props: {
- status:{
+ status: {
type: String,
default: "",
},
@@ -102,7 +106,7 @@
type: Boolean,
default: false,
},
- TreeValue:{
+ TreeValue: {
type: String,
default: "",
},
@@ -138,11 +142,11 @@
},
data() {
return {
- isSeriesType:{},
- attrList:[],
- eventList:[],
+ isSeriesType: {},
+ attrList: [],
+ eventList: [],
//鐮佸�肩殑绗簩绉嶅彧璇婚殣钘忔儏鍐�
- codeValueApplyStatus:'',
+ codeValueApplyStatus: '',
loading: false,
submitBtnLoading: false,
hasResemble: false,
@@ -222,9 +226,11 @@
"secretgrade",
],
codeRuleOid: "",
+ isShowStatus: ""
};
},
- created() {},
+ created() {
+ },
computed: {
dialogVisible: {
get() {
@@ -235,9 +241,9 @@
},
},
},
- watch:{
- codeApplyForm:{
- handler(newval,oldval){
+ watch: {
+ codeApplyForm: {
+ handler(newval, oldval) {
// console.log('newval',newval)
}
}
@@ -275,7 +281,7 @@
this.$refs.FormTemplate.templateRender(
res.data.formDefineVO.items
);
- this.eventList=res.data.templateVO.attributes
+ this.eventList = res.data.templateVO.attributes
// this.$refs.FormTemplate.$emit('eventList', res.data.templateVO.attributes);
if (Object.keys(this.setForm).length > 0) {
this.$refs.FormTemplate.form = this.setForm;
@@ -316,6 +322,7 @@
if (that.secVOList.length > 0 && that.type === "add") {
that.showCodeApply = true;
that.activeName = "codeApply";
+
this.$nextTick(() => {
that.$refs.CodeApply.templateRender(that.secVOList, this.TreeValue);
});
@@ -326,12 +333,7 @@
});
},
getFormData(form) {
- // if (this.status === "apply"){
- // form.codeStandardEditType = "鍒跺畾";
- // return;
- // }
this.form = form;
- // console.log("form",form)
//灞炴�х爜娈佃祴鍊�
if (this.attrList) {
this.attrList.forEach(item => {
@@ -342,12 +344,28 @@
}
},
- isSeriesTypeString(val){
- this.isSeriesType = val;
+ //绯诲垪鍙疯鍒�
+ isShowHandler(val) {
+ let that = this;
+ this.isShowStatus = val;
+
+ this.secVOList.forEach(item => {
+ if (item.name === "绯诲垪鍙�") {
+ this.$set(item, "readOnly", val)
+ }
+ })
+ if(this.$refs.CodeApply.changeChildItem ){
+ this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type);
+ }
+ },
+ //骞翠唬鍙�
+ dataYearHandler(val){
+ console.log("val",val)
+
},
//灞炴�х爜娈佃祴鍊�
- attrListForm(attrListForm){
- this.attrList=attrListForm;
+ attrListForm(attrListForm) {
+ this.attrList = attrListForm;
},
getCodeApplyFormData(codeApplyForm) {
// console.log("codeApplyForm",codeApplyForm)
@@ -355,21 +373,21 @@
},
// 鍙傜収缁勪欢鏁版嵁鍙樻洿
referConfigDataUpdate(data) {
- const { field } = data;
- let childItems=[];
+ const {field} = data;
+ let childItems = [];
this.secVOList = this.secVOList.map((item) => {
if (item.parentClassifySecOid === field) {
this.$refs.CodeApply.form[item.oid] = undefined;
this.$refs.CodeApply.form[item.name] = undefined;
- item.readOnly=false;
- item.referConfig.extraParams.parentClassifyValueOid=data.value;
+ item.readOnly = false;
+ item.referConfig.extraParams.parentClassifyValueOid = data.value;
item.referConfig.reloadData = true;
childItems.push(item)
}
return item;
});
//this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue);
- this.$refs.CodeApply.changeChildItem(childItems);
+ this.$refs.CodeApply.changeChildItem(childItems,this.TreeValue,this.type);
},
resembleQuerySubmit() {
this.activeName = "resembleQuery";
@@ -426,7 +444,7 @@
"lastmodifier"
];
let resForm = {};
- const { defaultValue, formValue } = this.getDefaultValueAndFormValues(
+ const {defaultValue, formValue} = this.getDefaultValueAndFormValues(
this.form
);
noData.forEach((item) => {
@@ -534,9 +552,13 @@
if (!this.codeApplyForm[item.parentClassifySecOid]) {
return true;
} else {
- return false;
+ return item.readOnly || false;
}
+ } else {
+ return item.readOnly || false;
}
+ } else {
+ return item.readOnly || false;
}
},
isRequired(item) {
@@ -577,6 +599,7 @@
top: 2px;
color: red;
}
+
// 瑙e喅swich缁勪欢涓嶅瀭鐩村眳涓殑闂
/deep/ .el-switch {
vertical-align: baseline;
diff --git a/Source/UBCS-WEB/src/views/system/user.vue b/Source/UBCS-WEB/src/views/system/user.vue
index bbd3232..8503d84 100644
--- a/Source/UBCS-WEB/src/views/system/user.vue
+++ b/Source/UBCS-WEB/src/views/system/user.vue
@@ -199,22 +199,6 @@
export default {
data() {
- const validatePass = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('璇疯緭鍏ュ瘑鐮�'));
- } else {
- callback();
- }
- };
- const validatePass2 = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�'));
- } else if (value !== this.form.password) {
- callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!'));
- } else {
- callback();
- }
- };
return {
tenantId:'',
form: {},
@@ -278,310 +262,6 @@
value: 'value',
children: 'children'
}
- },
- option: {
- height:'auto',
- calcHeight: 80,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- columnBtn:false,
- border: true,
- index: true,
- selection: true,
- /* 涓嬮潰杩欎笁涓睘鎬ч粯璁よ缃负true锛�
- 瀹為檯鏍规嵁permissionList涓鐓х殑灞炴�ц繘琛屾帶鍒剁殑 */
- viewBtn: true,
- editBtn: true,
- delBtn: true,
- addBtn: true,
- dialogType: 'drawer',
- dialogClickModal: false,
- highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
- column: [
- {
- label: "鐧诲綍璐﹀彿",
- prop: "account",
- search: true,
- display: false
- },
- {
- label: "鎵�灞炵鎴�",
- prop: "tenantName",
- slot: true,
- display: false
- },
- {
- label: "鐢ㄦ埛濮撳悕",
- prop: "realName",
- search: true,
- display: false
- },
- {
- label: "鎵�灞炶鑹�",
- prop: "roleName",
- slot: true,
- display: false
- },
- {
- label: "瀵嗙爜绛栫暐",
- prop: "pwdStrategy",
- slot: true,
- display: false
- },
- {
- label: "鎵�灞為儴闂�",
- prop: "deptName",
- slot: true,
- display: false
- },
- {
- label: "鐢ㄦ埛骞冲彴",
- prop: "userTypeName",
- slot: true,
- display: false
- },
- {
- label: "鐢ㄦ埛骞冲彴",
- type: "select",
- dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- search: true,
- hide: true,
- display: false,
- prop: "userType",
- rules: [{
- required: true,
- message: "璇烽�夋嫨鐢ㄦ埛骞冲彴",
- trigger: "blur"
- }],
- },
- {
- label: "鐘舵��",
- display: false,
- sortable:true,
- html:true,
- prop: "userStatus",
- formatter : function (row, column) {
- return row.userStatus == 0 ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
- }
- },
- ],
- group: [
- {
- label: '鍩虹淇℃伅',
- prop: 'baseInfo',
- icon: 'el-icon-user-solid',
- column: [
- {
- label: "鎵�灞炵鎴�",
- prop: "tenantId",
- type: "tree",
- dicUrl: "/api/ubcs-system/tenant/select",
- props: {
- label: "tenantName",
- value: "tenantId"
- },
- hide: !website.tenantMode,
- addDisplay: website.tenantMode,
- editDisplay: website.tenantMode,
- viewDisplay: website.tenantMode,
- rules: [{
- required: true,
- message: "璇疯緭鍏ユ墍灞炵鎴�",
- trigger: "click"
- }],
- span: 24,
- value:""
- },
- {
- label: "鐧诲綍璐﹀彿",
- prop: "account",
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ櫥褰曡处鍙�",
- trigger: "blur"
- }],
- },
- {
- label: "鐢ㄦ埛骞冲彴",
- type: "select",
- dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- value:'1',
- dataType: "number",
- slot: true,
- prop: "userType",
- rules: [{
- required: true,
- message: "璇烽�夋嫨鐢ㄦ埛骞冲彴",
- trigger: "blur"
- }]
- },
- {
- label: '瀵嗙爜',
- prop: 'password',
- type: "password",
- hide: true,
- editDisplay: false,
- viewDisplay: false,
- rules: [{required: true, validator: validatePass, trigger: 'blur'}]
- },
- {
- label: '纭瀵嗙爜',
- prop: 'password2',
- hide: true,
- type: "password",
- editDisplay: false,
- viewDisplay: false,
- rules: [{required: true, validator: validatePass2, trigger: 'blur'}]
- },
- ]
- },
- {
- label: '璇︾粏淇℃伅',
- prop: 'detailInfo',
- icon: 'el-icon-s-order',
- column: [
- {
- label: "鐢ㄦ埛鏄电О",
- prop: "name",
- hide: true,
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ敤鎴锋樀绉�",
- trigger: "blur"
- }]
- },
- {
- label: "鐢ㄦ埛濮撳悕",
- prop: "realName",
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ敤鎴峰鍚�",
- trigger: "blur"
- }, {
- min: 2,
- max: 5,
- message: '濮撳悕闀垮害鍦�2鍒�5涓瓧绗�'
- }]
- },
- {
- label: "鎵嬫満鍙风爜",
- prop: "phone",
- overHidden: true
- },
- {
- label: "鐢靛瓙閭",
- prop: "email",
- hide: true,
- overHidden: true
- },
- {
- label: "鐢ㄦ埛鎬у埆",
- prop: "sex",
- type: "select",
- dicData: [
- {
- label: "鐢�",
- value: 1
- },
- {
- label: "濂�",
- value: 2
- },
- {
- label: "鏈煡",
- value: 3
- }
- ],
- hide: true
- },
- {
- label: "鐢ㄦ埛鐢熸棩",
- type: "date",
- prop: "birthday",
- format: "yyyy-MM-dd hh:mm:ss",
- valueFormat: "yyyy-MM-dd hh:mm:ss",
- hide: true
- },
- {
- label: "璐﹀彿鐘舵��",
- prop: "statusName",
- hide: true,
- display: false
- }
- ]
- },
- {
- label: '鑱岃矗淇℃伅',
- prop: 'dutyInfo',
- icon: 'el-icon-s-custom',
- column: [
- {
- label: "鐢ㄦ埛缂栧彿",
- prop: "code",
- },
- {
- label: "鎵�灞炶鑹�",
- prop: "roleId",
- multiple: true,
- type: "tree",
- dicData: [],
- props: {
- label: "title"
- },
- checkStrictly: true,
- slot: true,
- rules: [{
- required: true,
- message: "璇烽�夋嫨鎵�灞炶鑹�",
- trigger: "click"
- }]
- },
- {
- label: "鎵�灞為儴闂�",
- prop: "deptId",
- type: "tree",
- multiple: true,
- dicData: [],
- props: {
- label: "title"
- },
- checkStrictly: true,
- slot: true,
- rules: [{
- required: true,
- message: "璇烽�夋嫨鎵�灞為儴闂�",
- trigger: "click"
- }]
- },
- /*{
- label: "鎵�灞炲矖浣�",
- prop: "postId",
- type: "tree",
- multiple: true,
- dicData: [],
- props: {
- label: "postName",
- value: "id"
- },
- rules: [{
- required: false,
- message: "璇烽�夋嫨鎵�灞炲矖浣�",
- trigger: "click"
- }],
- },*/
- ]
- },
- ]
},
data: [],
platformQuery: {},
@@ -714,7 +394,8 @@
pwdstrategyId:''
},
userflag:true,
- usernumber:0
+ usernumber:0,
+ userStatus:false,
};
},
watch: {
@@ -749,21 +430,322 @@
unsealBtn: this.vaildData(this.permission.user.user_unseal,false),
};
},
- // platformPermissionList() {
- // return {
- // addBtn: this.vaildData(this.permission.user.user_add, false),
- // viewBtn: this.vaildData(this.permission.user.user_view, false),
- // delBtn: this.vaildData(this.permission.user.user_delete, false),
- // editBtn: this.vaildData(this.permission.user.user_edit, false),
- // deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false),
- // exportBtn: this.vaildData(this.permission.user.user_export,false),
- // pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false),
- // importBtn: this.vaildData(this.permission.user.user_import,false),
- // resetBtn: this.vaildData(this.permission.user.user_reset,false),
- // roleBtn: this.vaildData(this.permission.user.user_role,false),
- // unsealBtn: this.vaildData(this.permission.user.user_unseal,false),
- // };
- // },
+ option() {
+ return{
+ height:'auto',
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ columnBtn:false,
+ border: true,
+ index: true,
+ selection: true,
+ /* 涓嬮潰杩欎笁涓睘鎬ч粯璁よ缃负true锛�
+ 瀹為檯鏍规嵁permissionList涓鐓х殑灞炴�ц繘琛屾帶鍒剁殑 */
+ viewBtn: true,
+ editBtn: true,
+ delBtn: true,
+ addBtn: true,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
+ column: [
+ {
+ label: "鐧诲綍璐﹀彿",
+ prop: "account",
+ search: true,
+ display: false
+ },
+ {
+ label: "鎵�灞炵鎴�",
+ prop: "tenantName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "鐢ㄦ埛濮撳悕",
+ prop: "realName",
+ search: true,
+ display: false
+ },
+ {
+ label: "鎵�灞炶鑹�",
+ prop: "roleName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "瀵嗙爜绛栫暐",
+ prop: "pwdStrategy",
+ slot: true,
+ display: false
+ },
+ {
+ label: "鎵�灞為儴闂�",
+ prop: "deptName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "鐢ㄦ埛骞冲彴",
+ prop: "userTypeName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "鐢ㄦ埛骞冲彴",
+ type: "select",
+ dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ search: true,
+ hide: true,
+ display: false,
+ prop: "userType",
+ rules: [{
+ required: true,
+ message: "璇烽�夋嫨鐢ㄦ埛骞冲彴",
+ trigger: "blur"
+ }],
+ },
+ {
+ label: "鐘舵��",
+ display: false,
+ sortable:true,
+ html:true,
+ prop: "userStatus",
+ formatter : function (row, column) {
+ return row.userStatus == 0 ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
+ }
+ },
+ ],
+ group: [
+ {
+ label: '鍩虹淇℃伅',
+ prop: 'baseInfo',
+ icon: 'el-icon-user-solid',
+ column: [
+ {
+ label: "鎵�灞炵鎴�",
+ prop: "tenantId",
+ type: "tree",
+ dicUrl: "/api/ubcs-system/tenant/select",
+ props: {
+ label: "tenantName",
+ value: "tenantId"
+ },
+ hide: !website.tenantMode,
+ addDisplay: website.tenantMode,
+ editDisplay: website.tenantMode,
+ viewDisplay: website.tenantMode,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ユ墍灞炵鎴�",
+ trigger: "click"
+ }],
+ span: 24,
+ value:""
+ },
+ {
+ label: "鐧诲綍璐﹀彿",
+ prop: "account",
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ョ櫥褰曡处鍙�",
+ trigger: "blur"
+ }],
+ },
+ {
+ label: "鐢ㄦ埛骞冲彴",
+ type: "select",
+ dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ value:'1',
+ dataType: "number",
+ slot: true,
+ prop: "userType",
+ rules: [{
+ required: true,
+ message: "璇烽�夋嫨鐢ㄦ埛骞冲彴",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '瀵嗙爜',
+ prop: 'password',
+ type: "password",
+ hide: true,
+ editDisplay: false,
+ viewDisplay: false,
+ rules: [{
+ required: true,
+ validator:(rule, value,callback) => {
+ if (value === '') {
+ callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�'));
+ } else if (value !== this.form.password) {
+ callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!'));
+ } else {
+ callback();
+ }
+ },
+ trigger: 'blur'
+ }]
+ },
+ {
+ label: '纭瀵嗙爜',
+ prop: 'password2',
+ hide: true,
+ type: "password",
+ editDisplay: false,
+ viewDisplay: false,
+ rules: [{
+ required: true,
+ validator:(rule, value,callback) => {
+ if (value === '') {
+ callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�'));
+ } else if (value !== this.form.password) {
+ callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!'));
+ } else {
+ callback();
+ }
+ },
+ trigger: 'blur'
+ }]
+ },
+ ]
+ },
+ {
+ label: '璇︾粏淇℃伅',
+ prop: 'detailInfo',
+ icon: 'el-icon-s-order',
+ column: [
+ {
+ label: "鐢ㄦ埛鏄电О",
+ prop: "name",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ョ敤鎴锋樀绉�",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "鐢ㄦ埛濮撳悕",
+ prop: "realName",
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ョ敤鎴峰鍚�",
+ trigger: "blur"
+ }, {
+ min: 2,
+ max: 5,
+ message: '濮撳悕闀垮害鍦�2鍒�5涓瓧绗�'
+ }]
+ },
+ {
+ label: "鎵嬫満鍙风爜",
+ prop: "phone",
+ overHidden: true
+ },
+ {
+ label: "鐢靛瓙閭",
+ prop: "email",
+ hide: true,
+ overHidden: true
+ },
+ {
+ label: "鐢ㄦ埛鎬у埆",
+ prop: "sex",
+ type: "select",
+ dicData: [
+ {
+ label: "鐢�",
+ value: 1
+ },
+ {
+ label: "濂�",
+ value: 2
+ },
+ {
+ label: "鏈煡",
+ value: 3
+ }
+ ],
+ hide: true
+ },
+ {
+ label: "鐢ㄦ埛鐢熸棩",
+ type: "date",
+ prop: "birthday",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
+ hide: true
+ },
+ {
+ label: "璐﹀彿鐘舵��",
+ prop: "statusName",
+ hide: true,
+ display: false
+ }
+ ]
+ },
+ {
+ label: '鑱岃矗淇℃伅',
+ prop: 'dutyInfo',
+ icon: 'el-icon-s-custom',
+ column: [
+ {
+ label: "鐢ㄦ埛缂栧彿",
+ prop: "code",
+ },
+ {
+ label: "鎵�灞炶鑹�",
+ prop: "roleId",
+ multiple: true,
+ type: "tree",
+ dicData: [],
+ disabled:this.userStatus,
+ props: {
+ label: "title"
+ },
+ checkStrictly: true,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "璇烽�夋嫨鎵�灞炶鑹�",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "鎵�灞為儴闂�",
+ prop: "deptId",
+ type: "tree",
+ multiple: true,
+ dicData: [],
+ props: {
+ label: "title"
+ },
+ checkStrictly: true,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "璇烽�夋嫨鎵�灞為儴闂�",
+ trigger: "click"
+ }]
+ },
+ ]
+ },
+ ]
+
+ }
+ },
ids() {
let ids = [];
this.selectionList.forEach(ele => {
@@ -1116,6 +1098,12 @@
})
},
beforeOpen(done, type) {
+ // console.log(type)
+ if(type === "edit"){
+ this.userStatus = true;
+ }else {
+ this.userStatus = false;
+ }
//console.log(type)
// console.log('this.tenantId',this.tenantId)
// const column = this.findObject(this.option.group,'tenantId');
--
Gitblit v1.9.3