From 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期三, 16 七月 2025 22:39:23 +0800 Subject: [PATCH] 添加时间筛选 --- src/views/operate/baseSetting/violation/createUser/index.vue | 109 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 63 insertions(+), 46 deletions(-) diff --git a/src/views/operate/baseSetting/violation/createUser/index.vue b/src/views/operate/baseSetting/violation/createUser/index.vue index a3c7bdb..218a29d 100644 --- a/src/views/operate/baseSetting/violation/createUser/index.vue +++ b/src/views/operate/baseSetting/violation/createUser/index.vue @@ -18,10 +18,16 @@ </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 :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" + @node-click="handleCheck" + @check-change="handleCheck" + default-expand-all + node-key="id"> </el-tree> </el-option> </el-select> @@ -84,7 +90,7 @@ }, levelList: [ { - label: "杩濊涓被鍨�", + label: "杩濊绫诲瀷", value: 1, }, { @@ -221,7 +227,7 @@ item.children = []; }) } else if (index === 3) { - + this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond()); console.log(this.parentList); } else { @@ -243,32 +249,43 @@ return parentArr; }, handleCheck(data, checked) { + console.log(this.selectOrg.orgsid,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 + } + // // 鑾峰彇褰撳墠閫夋嫨鐨刬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 + // let _this = this; + // _this.$refs.projectApplicant.blur(); + // this.selectOrg.orgsid = [] + // this.selectOrg.orgsid.push(data.id) + // } else if ( + // indexs >= 0 && + // this.selectOrg.orgsid.length === 1 && + // !checked + // ) { + // // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣� + // this.selectOrg.orgsid = [] + // } }, }, props: ['changeDialog'] @@ -277,13 +294,13 @@ <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 { @@ -324,20 +341,20 @@ } } - &::v-deep .el-textarea__inner { - background-color: #09152f; - border: 1px solid #17324c; - font-size: 10px; - } + // &::v-deep .el-textarea__inner { + // // background-color: #09152f; + // border: 1px solid #17324c; + // font-size: 10px; + // } - ::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; - font-size: 10px; - } + // ::v-deep .el-input__inner { + // // background-color: #09152f; + // border: 1px solid #17324c; + // font-size: 10px; + // } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0