+随保安单位许可备案审批,附件查看的id 去掉+1
| | |
| | | getTemplate, |
| | | getList, |
| | | getDetail, |
| | | remove, |
| | | remove |
| | | } from "@/api/resource/attachOnce"; |
| | | import { mapGetters } from "vuex"; |
| | | import ElImageViewer from "element-ui/packages/image/src/image-viewer"; |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | attachBox: false, |
| | | selectionList: [], |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入附件地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "附件地址", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入附件地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "附件格式", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入附件地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | data: [], |
| | | imgSee: false, |
| | | imgUrl: "", |
| | | ourData: [], |
| | | seeData: [], |
| | | seeData: [] |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | delBtn: this.vaildData(this.permission.attach_delete, false), |
| | | delBtn: this.vaildData(this.permission.attach_delete, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | handleUpload() { |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | this.loading = true; |
| | | this.data = []; |
| | | params["ptype"] = this.$route.query.type; |
| | | getTemplate(params, 1, 50).then((res) => { |
| | | getTemplate(params, 1, 50).then(res => { |
| | | //获取模板 |
| | | const mobel = res.data.data.records; |
| | | console.log(mobel); |
| | | params["userid"] = this.$route.query.deptid; |
| | | getUseInfor(params).then((res) => { |
| | | getUseInfor(params).then(res => { |
| | | //处理对应数据 |
| | | const data = res.data.data.records[0]; |
| | | console.log(data); |
| | |
| | | for (let k in links) { |
| | | this.data.push({ |
| | | link: links[k], |
| | | id: +id[k] + 1, |
| | | id: +id[k] |
| | | }); |
| | | } |
| | | console.log(this.data); |
| | |
| | | } |
| | | } |
| | | this.ourData = [ |
| | | ...this.data, |
| | | ...this.data |
| | | // ...this.data, |
| | | // ...this.data, |
| | | // ...this.data, |
| | |
| | | "webp", |
| | | "psd", |
| | | "svg", |
| | | "tiff", |
| | | "tiff" |
| | | ].indexOf(ext.toLowerCase()) == -1 |
| | | ); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |