flx:修复bug

This commit is contained in:
Rain_ 2025-09-10 20:15:48 +08:00
parent d7e70362ab
commit e76fc2656d
3 changed files with 79 additions and 41 deletions

View File

@ -54,11 +54,11 @@
<vue-scroll class="treeList">
<div style="padding-top: 10px">
<ul v-for="(ele, eIndex) in dataListUp" :key="eIndex">
<li :class="{ active: eIndex == ele.currentRight }">
<li :class="{ active: ele.id == ele.currentRight }">
<div class="clickName" @click="isOpen(ele, eIndex)">
<div class="imgbox">
<i
v-if="ele.currentRight != eIndex"
v-if="ele.currentRight != ele.id"
class="el-icon-arrow-right"
></i>
<i v-else class="el-icon-arrow-down"></i>
@ -86,7 +86,7 @@
<ul
id="child"
class="child1"
v-if="ele.currentRight == eIndex"
v-if="ele.currentRight == ele.id"
v-for="(name, index) in ele.children"
:key="index"
>
@ -99,7 +99,7 @@
>
<div class="imgbox">
<i
v-if="name.currentRight != index"
v-if="name.currentRight != name.id"
class="el-icon-arrow-right"
></i>
<i v-else class="el-icon-arrow-down"></i>
@ -157,7 +157,7 @@
<ul
v-for="(item, i) in name.children"
id="child2"
v-if="name.currentRight == index"
v-if="name.currentRight == name.id"
:key="i"
>
<!-- <li :class="{actives:index==current&&i==threeIndex}"> -->
@ -223,7 +223,12 @@
</div>
</vue-scroll>
<div class="sidebar_btn2">
<el-button style="color: #b3b3b3" @click="setCheckedNodes" size="mini" type="text" plain
<el-button
style="color: #b3b3b3"
@click="setCheckedNodes"
size="mini"
type="text"
plain
>全部展开</el-button
>
<el-button
@ -738,7 +743,10 @@ export default {
return { Authorization: this.$store.state.userInfo.token };
},
dataListUp() {
const searchResult = this.fuzzySearchTree(this.dataList, this.riskListForm.name);
const searchResult = this.fuzzySearchTree(
this.dataList,
this.riskListForm.name
);
return searchResult;
},
},
@ -753,7 +761,11 @@ export default {
result.push(newNode);
} else if (node.children && node.children.length > 0) {
//
const childrenResult = this.fuzzySearchTree(node.children, keyword, key);
const childrenResult = this.fuzzySearchTree(
node.children,
keyword,
key
);
if (childrenResult.length > 0) {
newNode.children = childrenResult;
result.push(newNode);
@ -782,13 +794,13 @@ export default {
.catch(() => {});
},
isOpen(ele, eIndex) {
const find = this.dataList.find(item => item.id == ele.id)
const find = this.dataList.find((item) => item.id == ele.id);
if (find.currentRight == eIndex) {
if (find.currentRight == ele.id) {
find.currentRight = -1;
return;
}
find.currentRight = eIndex;
find.currentRight = ele.id;
},
//
getDicProjectTypeList() {
@ -826,10 +838,10 @@ export default {
this.dataList.forEach((item, index) => {
if (item.children && item.children.length > 0) {
item.children.forEach((ele, index) => {
this.$set(ele, "currentRight", index);
this.$set(ele, "currentRight", ele.id);
});
}
this.$set(item, "currentRight", index);
this.$set(item, "currentRight", item.id);
});
console.log(this.dataList);
},
@ -956,7 +968,7 @@ export default {
this.dialogVisible = false;
this.dialogVisible2 = false;
this.dialogVisible3 = false;
this.loadList();
this.loadList("unfold");
this.$message.success("更新成功!");
});
} else {
@ -965,7 +977,7 @@ export default {
this.dialogVisible = false;
this.dialogVisible2 = false;
this.dialogVisible3 = false;
this.loadList();
this.loadList("unfold");
this.$message.success("添加成功!");
});
}
@ -1037,7 +1049,7 @@ export default {
message: "删除成功",
type: "success",
});
this.loadList();
this.loadList("unfold");
this.loadRigthtList();
} else {
this.$message({
@ -1054,7 +1066,7 @@ export default {
message: "删除成功",
type: "success",
});
this.loadList();
this.loadList("unfold");
this.loadRigthtList();
} else {
this.$message({
@ -1126,15 +1138,15 @@ export default {
this.threeData = [];
this.type = type;
this.parentid1 = data.id;
if (this.current == index || data.currentRight == index) {
if (this.current == index || data.currentRight == data.id) {
this.current = -1;
data.currentRight = -1;
} else {
this.current = index;
data.currentRight = index;
data.currentRight = data.id;
}
},
loadList() {
loadList(type) {
let param = {
sn: this.$store.state.userInfo.headquartersSn,
projectClassify: this.riskListForm.projectClassify,
@ -1164,6 +1176,11 @@ export default {
...item,
};
});
if (type == "unfold") {
this.$nextTick(() => {
this.setCheckedNodes();
});
}
// if(res.result.length>0){
// }

View File

@ -8,7 +8,7 @@
v-if="
($store.state.userInfo.addProjectType == 1 &&
$store.state.userInfo.accountType != 7) ||
$store.state.userInfo.addProjectType == 0
$store.state.userInfo.addProjectType == 0
"
class="plusBtn"
@click="
@ -345,7 +345,7 @@
<div
@click="editGroup(scope.row)"
class="operationText"
style="margin-right: 10px;"
style="margin-right: 10px"
>
<i class="el-icon-s-operation"></i>
<span>调整组织</span>
@ -353,7 +353,7 @@
<div
@click="deleteAccountFn(scope.row)"
class="operationText"
style="margin-right: 10px;"
style="margin-right: 10px"
>
<img
src="@/assets/images/icon-delete.png"
@ -1204,11 +1204,11 @@
>
<div class="dialog_content">
<div class="dialog_content-part">
<div class="dialog-search" style="margin-top: 20px;">
<div class="dialog-search" style="margin-top: 20px">
<el-input
placeholder="请输入组织名称搜索"
suffix-icon="el-icon-search"
style="flex: 1;"
style="flex: 1"
v-model="filterText"
size="small"
>
@ -1288,7 +1288,7 @@
<el-input
placeholder="请输入组织名称搜索"
suffix-icon="el-icon-search"
style="flex: 1;"
style="flex: 1"
v-model="filterText"
size="small"
>
@ -1351,12 +1351,16 @@
</div>
</el-dialog>
<largeScreenConfig :uniqueFlag="this.uniqueFlag" :authType="this.authType" v-model="largeVisible" ></largeScreenConfig>
<largeScreenConfig
:uniqueFlag="this.uniqueFlag"
:authType="this.authType"
v-model="largeVisible"
></largeScreenConfig>
</div>
</template>
<script>
import gdMap from "../../components/map/gd-map";
import largeScreenConfig from '@/views/jxjadmin/largeScreenConfig.vue'
import largeScreenConfig from "@/views/jxjadmin/largeScreenConfig.vue";
import {
getCompanyProjectListApi,
addCompanyApi,
@ -1403,7 +1407,7 @@ import { checkPhone } from "@/assets/js/util.js";
export default {
components: {
gdMap,
largeScreenConfig
largeScreenConfig,
},
data() {
var checkAge = (rule, value, callback) => {
@ -1528,7 +1532,8 @@ export default {
trigger: "blur",
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
pattern:
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message:
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
@ -1541,7 +1546,8 @@ export default {
trigger: "blur",
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
pattern:
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message:
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
@ -2200,7 +2206,8 @@ export default {
// })
},
mounted() {
this.addCompanyForm.headquartersSn = this.$store.state.userInfo.headquartersSn;
this.addCompanyForm.headquartersSn =
this.$store.state.userInfo.headquartersSn;
this.getModuleList();
this.initData();
this.loadProvincesCityList();
@ -2209,9 +2216,9 @@ export default {
},
methods: {
handleSettingLarge(authType, uniqueFlag) {
this.authType = authType
this.uniqueFlag = uniqueFlag
this.largeVisible = true
this.authType = authType;
this.uniqueFlag = uniqueFlag;
this.largeVisible = true;
},
filterNode(value, data) {
if (!value) return true;
@ -3344,8 +3351,10 @@ export default {
this.editGroupDialog = true;
this.filterText = "";
//
const res = await getSelectedGroupApi({ userId: row.userId,
headquartersSn: this.$store.state.userInfo.headquartersSn, });
const res = await getSelectedGroupApi({
userId: row.userId,
headquartersSn: this.$store.state.userInfo.headquartersSn,
});
//
this.$nextTick(() => {
this.$refs.groupTree.setCheckedKeys(this.getRelativeKeys(res.result));
@ -3554,7 +3563,9 @@ export default {
item.provincesCode,
item.cityCode,
item.areaCode,
];
].filter((item) => item);
console.log(this.provincesCityArr);
}, 200);
});
},
@ -3568,8 +3579,8 @@ export default {
}
this.$refs["addProjectForm"].validate((valid) => {
if (valid) {
console.log(this.addProjectForm);
if (this.isAdd) {
console.log(this.addProjectForm);
addProjectApi(this.addProjectForm).then((res) => {
console.log("添加成功", res);
this.addProjectDialog = false;
@ -3579,7 +3590,12 @@ export default {
); //
});
} else {
editProjectApi(this.addProjectForm).then((res) => {
editProjectApi({
...this.addProjectForm,
areaCode: this.addProjectForm.areaCode
? this.addProjectForm.areaCode
: "",
}).then((res) => {
console.log("信息编辑", res);
this.addProjectDialog = false;
this.initData();

View File

@ -998,7 +998,9 @@
v-for="item in workTicketDetail.otherAttachment"
:key="item.url"
>
<div>
<div @click="perviewFile(
$store.state.FILEURL + item.url
)">
<i class="el-icon-files"></i>
<div>{{ item.name }}</div>
</div>
@ -2037,6 +2039,9 @@ export default {
console.error(error);
});
},
perviewFile(url) {
window.open(url, "_blank");
},
},
computed: {
itemListDevNameUp() {