From 829f5116884f98643ffc5b2a548a600d40c0cedb Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 14 四月 2025 23:09:32 +0800
Subject: [PATCH] 处理图片显示问题
---
src/views/operate/baseSetting/illegalBuild/createUser/index.vue | 133 +++++++++++++++++++++----------------------
1 files changed, 65 insertions(+), 68 deletions(-)
diff --git a/src/views/operate/baseSetting/illegalBuild/createUser/index.vue b/src/views/operate/baseSetting/illegalBuild/createUser/index.vue
index 4cd1a56..c38d71b 100644
--- a/src/views/operate/baseSetting/illegalBuild/createUser/index.vue
+++ b/src/views/operate/baseSetting/illegalBuild/createUser/index.vue
@@ -18,12 +18,18 @@
</el-form-item>
<!-- 鐖剁骇id -->
<el-form-item class="optionItem" label="鐖剁骇:" prop="parentId">
- <el-select v-model="things.parentId" placeholder="璇烽�夋嫨鎵�灞炵埗绾�" :disabled="things.level===1">
+ <el-select ref="projectApplicant" v-model="things.parentId" placeholder="璇烽�夋嫨鎵�灞炵埗绾�" :disabled="things.level===1">
<!-- <el-option v-for="item in parentList" :key="item.id" :label="item.name" :value="item.id">
</el-option> -->
<el-option :value="mylabel">
- <el-tree ref="tree" :check-strictly="true" :data="parentList" :props="defaultProps" show-checkbox
- @check-change="handleCheck" default-expand-all node-key="id">
+ <el-tree ref="tree" :check-strictly="true"
+ :data="parentList"
+ :props="defaultProps"
+ :show-checkbox="false"
+ @check-change="handleCheck"
+ @node-click="handleCheck"
+ default-expand-all
+ node-key="id">
</el-tree>
</el-option>
</el-select>
@@ -67,7 +73,6 @@
parentId:'',
level:'',
},
- parentList: [],
createIll: {
name: [
{ required: true, trigger: 'blur', validator: checkName }
@@ -80,7 +85,7 @@
},
levelList: [
{
- label: "杩濆缓涓被鍨�",
+ label: "杩濆缓绫诲瀷",
value: 1,
},
{
@@ -128,9 +133,7 @@
},
// 鎻愪氦鏂板杩濊绫诲瀷
handleSubmit() {
- console.log(this.things);
this.$refs.user.validate((valid) => {
- console.log(valid);
if (valid) {
const { things,selectOrg } = this;
this.$axios({
@@ -147,7 +150,6 @@
}
})
.then(res => {
- console.log(res);
if (res.code === 200) {
this.$message({
type: 'success',
@@ -167,53 +169,49 @@
})
},
// 妗堜欢绾у埆鍙樺寲
- async resetParentList(index) {
- if (index === 1) {
-
- }else{
- this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond());
- }
- },
- addChildren(parentArr, childArr) {
- // console.log(parentArr.length,childArr);
- parentArr.forEach(item => {
- item.children = [];
- childArr.forEach(child => {
- if (item.id === child.parentId) {
- item.children.push(child);
- }
- })
- })
- console.log(parentArr);
- return parentArr;
- },
+ async resetParentList(index) {
+ if (index === 1) {
+
+ } else {
+ this.parentList = await this.getTypeThird()
+ }
+ },
handleCheck(data, checked) {
+ //鍙兘鐐瑰嚮鏈�鍚庝竴绾�
+ if(checked.childNodes.length == 0){
this.things.parentId = data.name;
- console.log(this.selectOrg.orgsid);
- // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
- const indexs = this.selectOrg.orgsid.indexOf(data.id)
- // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
- if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
- this.$message({
- message: '鍙兘閫夋嫨涓�涓尯鍩燂紒',
- type: 'error',
- showClose: true
- })
- // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
- this.$refs.tree.setChecked(data, false)
- } else if (this.selectOrg.orgsid.length === 0 && checked) {
- // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
- // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
- this.selectOrg.orgsid = []
- this.selectOrg.orgsid.push(data.id)
- } else if (
- indexs >= 0 &&
- this.selectOrg.orgsid.length === 1 &&
- !checked
- ) {
- // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
- this.selectOrg.orgsid = []
- }
+ let _this = this;
+ _this.$refs.projectApplicant.blur();
+ this.selectOrg.orgsid = []
+ this.selectOrg.orgsid.push(data.id)
+ }else {
+ return
+ }
+ // this.things.parentId = data.name;
+ // // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
+ // const indexs = this.selectOrg.orgsid.indexOf(data.id)
+ // // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
+ // if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
+ // this.$message({
+ // message: '鍙兘閫夋嫨涓�涓尯鍩燂紒',
+ // type: 'warning',
+ // showClose: true
+ // })
+ // // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
+ // this.$refs.tree.setChecked(data, false)
+ // } else if (this.selectOrg.orgsid.length === 0 && checked) {
+ // // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
+ // // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
+ // this.selectOrg.orgsid = []
+ // this.selectOrg.orgsid.push(data.id)
+ // } else if (
+ // indexs >= 0 &&
+ // this.selectOrg.orgsid.length === 1 &&
+ // !checked
+ // ) {
+ // // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
+ // this.selectOrg.orgsid = []
+ // }
},
},
props: ['changeDialog']
@@ -222,13 +220,12 @@
<style lang="scss" scoped>
.createUser {
border-radius: 1px;
- background-color: #09152f;
+ background-color: #fff;
main {
- // border: 1px solid #fff;
text-align: left;
padding: 0 55px;
- background-color: #09152f;
+ background-color: #fff;
padding-bottom: 50px;
.mainContent {
@@ -269,18 +266,18 @@
}
}
- &::v-deep .el-textarea__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-textarea__inner {
+ // // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
- ::v-deep .el-form-item__label {
- color: #4b9bb7;
- }
+ // ::v-deep .el-form-item__label {
+ // color: #4b9bb7;
+ // }
- ::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // ::v-deep .el-input__inner {
+ // // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0