|
|
|
@ -52,6 +52,7 @@ export default {
|
|
|
|
|
DraggableItem
|
|
|
|
|
},
|
|
|
|
|
dicts: ['bms_responsibility_unit', 'bms_level'],
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
let validateTime = (rule, value, callback) => {
|
|
|
|
|
if (new Date(value[1]) < new Date()) {
|
|
|
|
@ -68,7 +69,7 @@ export default {
|
|
|
|
|
selectComponents,
|
|
|
|
|
layoutComponents,
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
drawingList: drawingDefault,
|
|
|
|
|
drawingList: "",
|
|
|
|
|
drawingData: {},
|
|
|
|
|
activeId: drawingDefault[0].formId,
|
|
|
|
|
drawerVisible: false,
|
|
|
|
@ -78,49 +79,10 @@ export default {
|
|
|
|
|
showFileName: false,
|
|
|
|
|
activeData: drawingDefault[0],
|
|
|
|
|
options: [],
|
|
|
|
|
props: {
|
|
|
|
|
lazy: true,
|
|
|
|
|
lazyLoad(node, resolve) {
|
|
|
|
|
const { level, data, children } = node;
|
|
|
|
|
if (children?.length == 0) {
|
|
|
|
|
getAllList({ dictType: data.dict }).then(res => {
|
|
|
|
|
const nodes = Array.from(res.data).map((item) => {
|
|
|
|
|
return {
|
|
|
|
|
value: item.dictValue,
|
|
|
|
|
label: item.dictLabel,
|
|
|
|
|
dict: item.remark,
|
|
|
|
|
leaf: level >= 2
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
resolve(nodes)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单参数
|
|
|
|
|
dialogForm: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
// year: [
|
|
|
|
|
// { required: true, message: "请选择年份", trigger: "blur" },
|
|
|
|
|
// ],
|
|
|
|
|
responsibilityUnit: [
|
|
|
|
|
{ required: true, message: "请选择责任单位", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
level: [
|
|
|
|
|
{ required: true, message: "请选择级别", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
projectClassify: [
|
|
|
|
|
{ required: true, message: "请选择项目分类", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
templateName: [
|
|
|
|
|
{ required: true, message: "请输入模板名称", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
reportTime: [
|
|
|
|
|
{ required: true, message: "请选择模板使用有效期", trigger: "blur" },
|
|
|
|
|
{ validator: validateTime, trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
projectBigType: undefined,
|
|
|
|
|
projectMiddleType: undefined,
|
|
|
|
|
projectSmallType: undefined,
|
|
|
|
@ -176,17 +138,20 @@ export default {
|
|
|
|
|
this.$message.error('代码复制失败')
|
|
|
|
|
})
|
|
|
|
|
this.getDataList();
|
|
|
|
|
this.JsonShow()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
yanzheng() {
|
|
|
|
|
|
|
|
|
|
this.$refs["myfrom"].validate(valid => {
|
|
|
|
|
console.log(123123);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
jsonOpen(templateJson){
|
|
|
|
|
let list = []
|
|
|
|
|
list = JSON.parse(templateJson).fields
|
|
|
|
|
console.log(list);
|
|
|
|
|
list.forEach(item => {
|
|
|
|
|
if (item.tag == "el-upload") {
|
|
|
|
|
item.headers.Authorization = 'Bearer ' + getToken()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.drawingList = list
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
activeFormItem() {
|
|
|
|
@ -199,19 +164,7 @@ export default {
|
|
|
|
|
drawingItemDelete() {
|
|
|
|
|
console.log("drawingItemDelete");
|
|
|
|
|
},
|
|
|
|
|
JsonShow() {
|
|
|
|
|
if (localStorage.getItem("myJSON")) {
|
|
|
|
|
JSON.parse(localStorage.getItem("myJSON")).fields
|
|
|
|
|
|
|
|
|
|
let list = JSON.parse(localStorage.getItem("myJSON")).fields
|
|
|
|
|
list.forEach(item => {
|
|
|
|
|
if (item.tag == "el-upload") {
|
|
|
|
|
item.headers.Authorization = 'Bearer ' + getToken()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.drawingList = list
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getDataList() {
|
|
|
|
|
getAllList({ dictType: "project_categories" }).then(res => {
|
|
|
|
@ -427,7 +380,8 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@ -582,7 +536,7 @@ $lighterBlue: #409EFF;
|
|
|
|
|
.container {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 50vh;
|
|
|
|
|
min-height: 50vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.components-list {
|
|
|
|
|