mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
--fix bug
This commit is contained in:
@@ -281,8 +281,7 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, defineComponent, ref, watch, computed } from "vue";
|
import { reactive, toRefs, defineComponent, watch, computed } from "vue";
|
||||||
import * as api1 from "../../../api/index1";
|
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -302,136 +301,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
imgList: [],
|
imgList: [],
|
||||||
options2222: [
|
|
||||||
{
|
|
||||||
title: "领导力",
|
|
||||||
value: "100",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "管理业务",
|
|
||||||
value: "1001",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "管理团队",
|
|
||||||
value: "1002",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "管理自我",
|
|
||||||
value: "1003",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "专业力",
|
|
||||||
value: "200",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "研发",
|
|
||||||
value: "2001",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "系统和解决方案",
|
|
||||||
value: "2002",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "生产技术与制造",
|
|
||||||
value: "2003",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "供应链",
|
|
||||||
value: "2004",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "营销",
|
|
||||||
value: "2005",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "品质",
|
|
||||||
value: "2006",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "专业职能",
|
|
||||||
value: "2007",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "战略与企划",
|
|
||||||
value: "200701",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "流程管理",
|
|
||||||
value: "200702",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "业绩管理",
|
|
||||||
value: "200703",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "项目管理",
|
|
||||||
value: "200704",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "信息技术",
|
|
||||||
value: "200705",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "环境与安全",
|
|
||||||
value: "200706",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "人力资源",
|
|
||||||
value: "200707",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "企业文化",
|
|
||||||
value: "200708",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "品牌",
|
|
||||||
value: "200709",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "财务",
|
|
||||||
value: "200710",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "法务",
|
|
||||||
value: "200711",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "风险控制",
|
|
||||||
value: "200712",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "行政",
|
|
||||||
value: "200713",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "医工",
|
|
||||||
value: "2008",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "通用力",
|
|
||||||
value: "300",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: "职业操守与道德",
|
|
||||||
value: "3001",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "职业素养与技能",
|
|
||||||
value: "3002",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "规章制度",
|
|
||||||
value: "3003",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
categoryName: "",
|
categoryName: "",
|
||||||
ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx",
|
ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx",
|
||||||
ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx",
|
ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx",
|
||||||
@@ -441,7 +310,7 @@ export default defineComponent({
|
|||||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sysTypeOptions = computed(() => store.state.sysType);
|
const sysTypeOptions = computed(() => store.state.content_type);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.detail.sysTypeId,
|
() => props.detail.sysTypeId,
|
||||||
@@ -452,22 +321,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
function findClassFullName(list, name = "") {
|
function findClassFullName(list, name = "") {
|
||||||
return (
|
return (
|
||||||
(list &&
|
(list && list.length && list.map((e) => props.detail.sysTypeId == e.code ? name ? name + "-" + e.name : e.name : findClassFullName(e.children, name ? name + "-" + e.name : e.name)).filter((name) => name).join("")) || ""
|
||||||
list.length &&
|
|
||||||
list
|
|
||||||
.map((e) =>
|
|
||||||
props.detail.sysTypeId == e.dictCode
|
|
||||||
? name
|
|
||||||
? name + "-" + e.dictName
|
|
||||||
: e.dictName
|
|
||||||
: findClassFullName(
|
|
||||||
e.children,
|
|
||||||
name ? name + "-" + e.dictName : e.dictName
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.filter((name) => name)
|
|
||||||
.join("")) ||
|
|
||||||
""
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,72 +332,13 @@ export default defineComponent({
|
|||||||
return "-";
|
return "-";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterSenceTxt = (txt) => {
|
|
||||||
let str = "-";
|
|
||||||
if (txt) {
|
|
||||||
options3.value.forEach((item) => {
|
|
||||||
if (item.value === String(txt)) {
|
|
||||||
str = item.label;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
emit("cancel");
|
emit("cancel");
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取分类、场景-----------字典配置-------------------------------
|
|
||||||
const options2 = ref([]);
|
|
||||||
const options3 = ref([]);
|
|
||||||
const getDictList = (param) => {
|
|
||||||
let obj = {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
setCode: param,
|
|
||||||
};
|
|
||||||
api1
|
|
||||||
.getDict(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log("获取字典成功", res);
|
|
||||||
if (res.data.code === 200) {
|
|
||||||
if (param === "faceclassClass") {
|
|
||||||
let arr = res.data.data.rows;
|
|
||||||
let newArr = [];
|
|
||||||
arr.forEach((item) => {
|
|
||||||
newArr.push({
|
|
||||||
value: item.dictCode,
|
|
||||||
label: item.dictName,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
options2.value = state.options2222;
|
|
||||||
}
|
|
||||||
if (param === "faceclassScene") {
|
|
||||||
let arr = res.data.data.rows;
|
|
||||||
let newArr = [];
|
|
||||||
arr.forEach((item) => {
|
|
||||||
newArr.push({
|
|
||||||
value: item.dictCode,
|
|
||||||
label: item.dictName,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
options3.value = newArr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log("获取字典失败", err);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
getDictList("faceclassClass");
|
|
||||||
getDictList("faceclassScene");
|
|
||||||
//获取分类、场景----------------字典配置---------------------------
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
filterTxt,
|
filterTxt,
|
||||||
filterSenceTxt,
|
|
||||||
handleCancel,
|
handleCancel,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user