<template>
|
<div class="screenage_doc_main">
|
<SearchCondition
|
:info="conItems"
|
ref="condRef"
|
:conForm="conForm"
|
:screenWidth="screenWidth"
|
:isShowDetail="isShowDetail"
|
@handleOnSeach="handleOnSeach"
|
@handleOnRest="handleOnRest"
|
@handleClick="isShowDetail = !isShowDetail"
|
/>
|
<div v-if="!isView" class="add-button">
|
<el-button
|
type="primary"
|
size="small"
|
icon="el-icon-circle-plus-outline"
|
@click="handleAddPage"
|
class="add-btn"
|
>新增配置</el-button
|
>
|
<el-button
|
type="primary"
|
size="small"
|
icon="el-icon-document-copy"
|
@click="handleCopyPage"
|
class="add-btn"
|
>
|
批量复制
|
</el-button>
|
<el-button
|
type="primary"
|
size="small"
|
icon="el-icon-minus"
|
@click="handleDeleteList"
|
class="add-btn"
|
>批量删除</el-button
|
>
|
</div>
|
<ProTable
|
:pageInfo="pageInfo"
|
@doAction="doAction"
|
@handleCurrentChange="handleCurrentChange"
|
:isMultipleSelect="!isView"
|
@handleSizeChange="handleSizeChange"
|
@handleSelectionChange="handleSelectionChange"
|
:noHistory="noHistory"
|
:isAutoIndex="true"
|
:list="docImgsList"
|
:header="tableHeader"
|
:loading="loading"
|
/>
|
<el-dialog
|
:title="dialogTitle"
|
:visible.sync="dialogVisible"
|
:close-on-click-modal="false"
|
:close-on-press-escape="false"
|
:destroy-on-close="true"
|
width="1000"
|
center
|
custom-class="pricing_dialog"
|
>
|
<CreateForms
|
ref="imagelist"
|
v-if="dialogVisible"
|
:isReset="true"
|
:isShowOld="showOld"
|
:oldVal="oldVal"
|
:isView="isView"
|
:isShowBorder="isShowBorder"
|
:screenWidth="1000"
|
:formItems="formItems"
|
:defValues="defValues"
|
:formRules="formRules"
|
@beforeFormAvatarUpload="beforeAvatarUpload"
|
@handleFormUpload="handleUpload"
|
@handleFormDelete="handleDelete"
|
@handleSelOnChange="handleSelOnChange"
|
/>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="handleDialogCancel">{{
|
isView ? "关 闭" : "取 消"
|
}}</el-button>
|
<el-button
|
type="primary"
|
v-if="!isView"
|
@click="saveImagelistConfiguration"
|
>确 定</el-button
|
>
|
</span>
|
</el-dialog>
|
<el-dialog
|
:title="delteTitle"
|
:visible.sync="dialogDelVisible"
|
:close-on-click-modal="false"
|
:close-on-press-escape="false"
|
:destroy-on-close="true"
|
width="1000"
|
center
|
custom-class="pricing_dialog del_dialog"
|
>
|
<div style="text-align: justify;">{{ tipContent }}</div>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="dialogDelVisible = false">取 消</el-button>
|
<el-button type="primary" @click="deleteListSure">确 定</el-button>
|
</span>
|
</el-dialog>
|
<el-dialog
|
:title="dialogTitle"
|
:visible.sync="dialogCopyVisible"
|
:close-on-click-modal="false"
|
:close-on-press-escape="false"
|
:destroy-on-close="true"
|
width="400"
|
center
|
custom-class="pricing_dialog copy_dialog"
|
>
|
<CreateForms
|
ref="copyImglist"
|
v-if="dialogCopyVisible"
|
:screenWidth="1000"
|
:formItems="copyFormItems"
|
:defValues="copyDefValues"
|
:formRules="copyFormRules"
|
/>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="dialogCopyVisible = false">取 消</el-button>
|
<el-button type="primary" @click="CopyImagelistConfig">确 定</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
<script>
|
import { Message } from "element-ui";
|
import { SCREENAGEDOCSETTINGCOLUMN } from "./config/tableConfig.js";
|
import {
|
addOrUpdateImagelistConfiguration,
|
qryImagelistConfigurationList,
|
addExampleFileForImgConfig,
|
delFileForProductInfo,
|
delImagelistConfiguration,
|
delImagelistConfigurationBatch,
|
qryImagelistConfigurationDetail,
|
qryImageListConfigImageInfo,
|
copyImagelistConfigurationBatch,
|
selectImageCode,
|
downloadFile,
|
selectFlowModelConfig,
|
getOccurTypeList
|
} from "../../../../api/productManage.api";
|
import { DIMENSIONENUM } from "../../../../utils/optionsQueryConfig.js";
|
import {
|
SCREENAGEDOCSETTINGCON,
|
SCREENAGEDOCSETTINGDEF
|
} from "../../../../utils/condtionConfig.js";
|
import ProTable from "../../../../components/ProTable.vue";
|
import SearchCondition from "../../../../components/SearchCondition.vue";
|
import CreateForms from "../../../../components/CreateForms.vue";
|
import {
|
SCREENAGEDOCSETTINGFORMS,
|
COPYIMGLISTFORM
|
} from "../../../../utils/formsConfig.js";
|
import {
|
SCREENAGEDOCSETTINGDEFVALUE,
|
COPYIMGLISTDEFVALUE
|
} from "../../../../utils/defValueConfig.js";
|
import {
|
SCREENAGEDOCSETTINGRULES,
|
COPYIMGLISTRULES
|
} from "../../../../utils/formRulesConfig.js";
|
import { setTimeout } from "timers";
|
export default {
|
props: {
|
edit: {
|
type: Boolean,
|
default: () => {
|
return false;
|
}
|
},
|
isView: {
|
type: Boolean,
|
default: () => {
|
return false;
|
}
|
},
|
noHistory: {
|
type: Boolean,
|
default: () => {
|
return false;
|
}
|
},
|
isShowBorder: {
|
type: Boolean,
|
default: () => {
|
return true;
|
}
|
},
|
options: {
|
type: Object,
|
default: () => {
|
return {};
|
}
|
}
|
},
|
watch: {
|
options: {
|
handler(val, oldVal) {
|
this.optionsData = val;
|
this.getOptionItems(val);
|
},
|
deep: true
|
},
|
isView: {
|
handler(val) {
|
this.isView = val;
|
},
|
deep: true
|
}
|
},
|
data() {
|
return {
|
docImgsList: [],
|
tableHeader: [...SCREENAGEDOCSETTINGCOLUMN],
|
formItems: [...SCREENAGEDOCSETTINGFORMS],
|
conForm: { ...SCREENAGEDOCSETTINGDEF },
|
defValues: { ...SCREENAGEDOCSETTINGDEFVALUE },
|
formRules: { ...SCREENAGEDOCSETTINGRULES(!this.isView) },
|
copyFormItems: [...COPYIMGLISTFORM],
|
copyDefValues: { ...COPYIMGLISTDEFVALUE },
|
copyFormRules: { ...COPYIMGLISTRULES },
|
isSave: false,
|
showOld:
|
this.$parent._data.objecttype === "jbo.app.BUSINESS_TYPE_CHANGE" &&
|
this.isView,
|
oldVal: {},
|
dialogTitle: "影像资料配置新增",
|
delteTitle: "影像资料配置删除确认",
|
tipContent: "",
|
serialno: "",
|
listSerialno: "",
|
dialogDelVisible: false,
|
dialogCopyVisible: false,
|
fileInfos: {},
|
selClounms: [],
|
screenWidth: document.body.offsetWidth,
|
optionsData: {},
|
imageCode: [],
|
flowValues: [],
|
loading: false,
|
dialogVisible: false,
|
pageInfo: {
|
currentPage: 1,
|
pageSize: 10,
|
total: 0
|
},
|
conItems: [...SCREENAGEDOCSETTINGCON],
|
restFormItems: [...SCREENAGEDOCSETTINGCON],
|
condtionValue: {}, // 表单value集合
|
isShowDetail: false // 是否显示所有表单项
|
};
|
},
|
components: {
|
SearchCondition,
|
ProTable,
|
CreateForms
|
},
|
mounted() {
|
this.initColumns();
|
(this.isView || this.edit) && this.getImagelistConfigurationList();
|
window.addEventListener("resize", this.getScreenWidth);
|
setTimeout(async () => {
|
await this.getSelectFlowModelConfig();
|
await this.getSelectImageCode();
|
await this.getOccurTypeList();
|
}, 1000);
|
},
|
destroyed() {
|
window.removeEventListener("resize", this.getScreenWidth);
|
},
|
methods: {
|
// 处理变更标志显示
|
initColumns() {
|
const { objecttype } = this.$parent._data;
|
const { tableHeader, noHistory } = this;
|
const isModify = objecttype === "jbo.app.BUSINESS_TYPE_CHANGE";
|
const newTableHeader =
|
isModify && !noHistory
|
? tableHeader
|
: tableHeader.filter(col => col.prop !== "changeflag");
|
this.$set(this, "tableHeader", newTableHeader);
|
},
|
// 重置表单配置项
|
setFormsItemConfig() {
|
const { showData } = this.$parent._data;
|
const newFormItems = [...this.formItems].map(form => {
|
const newForm = { ...form };
|
if (
|
newForm.name === "minmcreditterm" ||
|
newForm.name === "maxmcreditterm"
|
) {
|
newForm.show = showData.attribute3 === "M";
|
}
|
if (
|
newForm.name === "mindcreditterm" ||
|
newForm.name === "maxdcreditterm"
|
) {
|
newForm.show = showData.attribute3 === "D";
|
}
|
return newForm;
|
});
|
this.formItems = newFormItems;
|
},
|
getScreenWidth() {
|
this.$set(this, "screenWidth", document.body.offsetWidth);
|
},
|
async doAction(name, item, { key, label }) {
|
if (key === "edit") {
|
this.dialogTitle = "影像资料配置修改";
|
this.listSerialno = item.serialNo;
|
this.serialno = item.serialNo;
|
await this.getEditImageListConfigImageInfo(item.serialNo);
|
await this.getSelectFlowModelConfig();
|
await this.getSelectImageCode();
|
await this.getOccurTypeList();
|
await this.getOptionItems(this.options);
|
this.dialogVisible = true;
|
const infos = await this.getImagelistConfigurationDetail(item.serialNo);
|
let editData = {};
|
Object.getOwnPropertyNames(infos).forEach(key => {
|
editData[key] = infos[key].value;
|
});
|
setTimeout(() => {
|
this.defValues = { ...editData };
|
this.setFormItems(this.fileInfos);
|
}, 0);
|
}
|
if (key === "details") {
|
this.dialogTitle = "影像资料配置详情";
|
this.listSerialno = item.serialNo;
|
this.serialno = item.serialNo;
|
await this.getEditImageListConfigImageInfo(item.serialNo);
|
await this.getSelectFlowModelConfig();
|
await this.getSelectImageCode();
|
await this.getOccurTypeList();
|
await this.getOptionItems(this.options);
|
this.dialogVisible = true;
|
const infos = await this.getImagelistConfigurationDetail(item.serialNo);
|
let editData = {};
|
let oldValue = {};
|
Object.getOwnPropertyNames(infos).forEach(key => {
|
editData[key] = infos[key].value;
|
oldValue[key] = infos[key].oldValue;
|
});
|
setTimeout(() => {
|
const newFormItems = [...this.formItems].map(forms => {
|
const newForms = { ...forms };
|
newForms.placeholder = "";
|
newForms.readonly = true;
|
return newForms;
|
});
|
this.defValues = { ...editData };
|
this.formItems = newFormItems;
|
this.oldVal = oldValue;
|
this.setFormItems(this.fileInfos);
|
}, 0);
|
}
|
if (key === "delete") {
|
this.listSerialno = item.serialNo;
|
this.serialno = item.serialNo;
|
this.delteTitle = "影像资料配置删除确认";
|
this.tipContent = `请确认是否需要删除影像资料配置(流程阶:${item.phaseName},影像资料类型:${item.docNo}-${item.docName}`;
|
this.dialogDelVisible = true;
|
}
|
if (key === "download") {
|
await downloadFile({
|
serialno: item.serialNo,
|
fileName: item.theTemple
|
});
|
Message.closeAll();
|
}
|
},
|
handleOnSeach() {
|
const conRef = this.$refs.condRef;
|
this.$set(this, "condtionValue", conRef.$refs["conform"].model);
|
this.$set(this, "pageInfo", { currentPage: 1, pageSize: 10, total: 0 });
|
this.getImagelistConfigurationList();
|
},
|
handleOnRest() {
|
this.$set(this, "condtionValue", {});
|
// this.$set(this, 'pageInfo', { currentPage: 1, pageSize: 10, total: 0 })
|
// this.getImagelistConfigurationList()
|
},
|
// 获取下拉选择项
|
getOptionItems(optionsMap) {
|
const newFormItems = [...this.formItems].map(item => {
|
const newItems = { ...item };
|
if (newItems.name === "docNo") {
|
newItems.options = this.imageCode;
|
}
|
if (newItems.name === "phaseNo") {
|
newItems.options = this.flowValues;
|
}
|
if (newItems.name === "occurType") {
|
newItems.options = this.occurTypeList;
|
}
|
if (newItems.type === "file") {
|
newItems.fileInfo = {};
|
}
|
if (
|
newItems.type === "select" &&
|
newItems.name !== "docNo" &&
|
newItems.name !== "phaseNo" &&
|
newItems.name !== "occurType"
|
) {
|
newItems.options = optionsMap[DIMENSIONENUM[newItems.name]];
|
}
|
return newItems;
|
});
|
this.$set(this, "formItems", newFormItems);
|
},
|
// 下拉选择事件处理
|
handleSelOnChange(formName, selValue) {
|
if (formName === "docNo") {
|
const selItems = this.imageCode.filter(
|
({ value }) => value === selValue
|
);
|
const imagelistForm = this.$refs.imagelist;
|
imagelistForm.formValues.docName = selItems[0].label.split(",")[1];
|
}
|
},
|
// 获取影像资料类型编码
|
async getSelectImageCode() {
|
const { objectno, dimensionno } = this.$parent._data;
|
const params = { dimensionno, objectno };
|
const imgCodeRes = await selectImageCode(params);
|
if (imgCodeRes && imgCodeRes.code === "00") {
|
this.imageCode = imgCodeRes.result;
|
}
|
},
|
// 获取流程阶段名称
|
async getSelectFlowModelConfig() {
|
const { objectno } = this.$parent._data;
|
const params = { objectno };
|
const flowValRes = await selectFlowModelConfig(params);
|
if (flowValRes && flowValRes.code === "00") {
|
this.flowValues = flowValRes.result;
|
}
|
},
|
// 获取业务类型
|
async getOccurTypeList() {
|
const { productid } = this.$parent._data;
|
const params = { productid };
|
const occurTypeRes = await getOccurTypeList(params);
|
if (occurTypeRes && occurTypeRes.code === "00") {
|
this.occurTypeList = occurTypeRes.result.map(res => {
|
return {
|
value: res.itemno,
|
label: res.itemname
|
};
|
});
|
}
|
},
|
// 查询产品影像资料配置列表
|
async getImagelistConfigurationList() {
|
const { currentPage, pageSize } = this.pageInfo;
|
const { dimensionno, objectno, productid } = this.$parent._data;
|
const { phaseNo, docNo, docName, isMandatory } = this.condtionValue;
|
const params = {
|
docname: docName,
|
docno: docNo,
|
ismandatory: isMandatory,
|
phasename: phaseNo,
|
currentPage,
|
pageSize,
|
dimensionno,
|
objectno,
|
productid
|
};
|
const listRes = await qryImagelistConfigurationList(params);
|
if (!listRes || listRes.code !== "00") {
|
return;
|
}
|
const list =
|
listRes.result &&
|
listRes.result.records.map(item => {
|
const newitem = { ...item };
|
newitem.operationOption = this.isView
|
? [
|
{ key: "details", label: "详情", value: true },
|
{ key: "download", label: "下载", value: !!item.theTemple }
|
]
|
: [
|
{ key: "edit", label: "修改", value: true },
|
{ key: "delete", label: "删除", value: true },
|
{ key: "download", label: "下载", value: !!item.theTemple }
|
];
|
return newitem;
|
});
|
this.$set(this, "docImgsList", list);
|
this.pageInfo.total = listRes.result.total;
|
},
|
// 新增
|
handleAddPage() {
|
this.dialogVisible = false;
|
this.dialogTitle = "影像资料配置新增";
|
this.isSave = false;
|
this.serialno = "";
|
this.formItems = [...SCREENAGEDOCSETTINGFORMS];
|
this.defValues = { ...SCREENAGEDOCSETTINGDEFVALUE };
|
this.setFormsItemConfig();
|
this.getOptionItems(this.options);
|
this.dialogVisible = true;
|
},
|
handleDelPage() {
|
this.dialogVisible = false;
|
this.serialno && this.delImagelistConf([this.serialno], "init");
|
},
|
// 删除影像配置
|
delImagelistConf(list, isInit) {
|
this.setFormItems({});
|
setTimeout(async () => {
|
const params = { serialno: list };
|
const delRes = await delImagelistConfiguration(params);
|
if (!delRes || delRes.code !== "00") {
|
return;
|
}
|
this.serialno = "";
|
this.isSave = false;
|
isInit !== "init" && this.$message.success("删除成功!");
|
}, 0);
|
},
|
// 校验基本信息
|
validateForms() {
|
const imagelistForm = this.$refs.imagelist;
|
imagelistForm.$refs["createForm"].validate(async valid => {
|
if (valid) {
|
this.isValidate = true;
|
} else {
|
this.isValidate = false;
|
this.$message.error("请完必填项!");
|
return false;
|
}
|
});
|
},
|
// 获取显示表单对应的value值
|
getFormItemsValue(forms, values, defvalue) {
|
const showForms = forms.filter(form => form.show !== false);
|
let formsValue = {};
|
showForms.forEach(form => {
|
formsValue[form.name] = values[form.name];
|
});
|
return { ...defvalue, ...formsValue };
|
},
|
handleDialogCancel() {
|
const imagelistForm = this.$refs.imagelist;
|
imagelistForm.$refs["createForm"].resetFields();
|
this.dialogVisible = false;
|
},
|
// 保存影像资料配置新增
|
async saveImagelistConfiguration(type, file, key) {
|
await this.validateForms();
|
const { isValidate } = this;
|
if (!isValidate) {
|
return false;
|
}
|
const imagelistForm = this.$refs.imagelist;
|
const { dimensionno, objectno, productid } = this.$parent._data;
|
const params = {
|
...this.getFormItemsValue(
|
imagelistForm.formItems,
|
imagelistForm.formValues,
|
SCREENAGEDOCSETTINGDEFVALUE
|
),
|
dimensionNo: dimensionno,
|
objectNo: objectno,
|
productId: productid,
|
serialNo: this.serialno
|
};
|
const res = await addOrUpdateImagelistConfiguration(params);
|
if (!res || res.code !== "00") {
|
return false;
|
}
|
if (type !== "init") {
|
this.$message({
|
message: "保存成功!",
|
type: "success"
|
});
|
}
|
this.serialno = res.result.serialno;
|
this.isSave = true;
|
type !== "init" && this.getImagelistConfigurationList();
|
this.dialogVisible = type === "init";
|
!this.dialogVisible && imagelistForm.$refs["createForm"].resetFields();
|
type === "init" && this.getImageListConfigImageInfo(type, file, key);
|
},
|
// 上传前事件
|
beforeAvatarUpload(file, key) {
|
const { isSave } = this;
|
if (!isSave) {
|
this.saveImagelistConfiguration("init", file, key);
|
return false;
|
}
|
return isSave;
|
},
|
// 获取影像配置模板信息
|
async getImageListConfigImageInfo(isInit, filedata, key) {
|
const imageRes = await qryImageListConfigImageInfo({
|
objectno: this.serialno || this.listSerialno
|
});
|
if (imageRes.code !== "00") {
|
return "";
|
}
|
this.fileInfos = imageRes.result[0];
|
this.setFormItems(imageRes.result[0]);
|
if (isInit === "init") {
|
this.handleUpload(filedata, key);
|
}
|
},
|
// 编辑时获取影像配置模板信息
|
async getEditImageListConfigImageInfo(serialno) {
|
const imageRes = await qryImageListConfigImageInfo({
|
objectno: serialno
|
});
|
if (imageRes.code !== "00") {
|
return "";
|
}
|
this.fileInfos = imageRes.result[0];
|
},
|
// 给form表单赋值
|
setFormItems(fileInfo) {
|
const imageFormItems = [...this.formItems].map(item => {
|
const forms = { ...item };
|
if (forms.type === "file") {
|
forms.fileInfo = fileInfo;
|
}
|
return forms;
|
});
|
this.$set(this, "formItems", imageFormItems);
|
},
|
// 上传文件
|
handleUpload(fileData, key) {
|
if (!fileData || !this.isSave) {
|
return false;
|
}
|
const { docNo = "", docType = "" } = this.fileInfos;
|
const { serialno } = this;
|
const formData = new FormData();
|
formData.append("file", fileData);
|
formData.append("docNo", docNo);
|
formData.append("docType", docType);
|
formData.append("objectNo", serialno);
|
formData.append("objectType", "");
|
addExampleFileForImgConfig(formData).then(res => {
|
if (res.code === "00") {
|
this.$message.success("上传成功!");
|
this.getImageListConfigImageInfo();
|
}
|
});
|
},
|
// 删除文件
|
async handleDelete(attachmentno) {
|
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
})
|
.then(() => {
|
let params = {
|
attachmentno
|
};
|
delFileForProductInfo(params).then(res => {
|
if (res.code === "00") {
|
this.$message.success("删除成功!");
|
this.getImageListConfigImageInfo();
|
}
|
});
|
})
|
.catch(() => {});
|
},
|
// 查询影像资料配置信息
|
async getImagelistConfigurationDetail(serialno) {
|
const {
|
dimensionno,
|
objectno,
|
productid,
|
objecttype
|
} = this.$parent._data;
|
const params = {
|
dimensionno,
|
objectno,
|
productid,
|
serialno,
|
showoldvalue: objecttype === "jbo.app.BUSINESS_TYPE_CHANGE"
|
};
|
const detailRes = await qryImagelistConfigurationDetail(params);
|
if (!detailRes || detailRes.code !== "00") {
|
return;
|
}
|
return detailRes.result;
|
},
|
// 删除影像资料配置信息
|
async deleteImagelistConfiguration() {
|
const deleteRes = await delImagelistConfiguration({
|
serialno: this.listSerialno
|
});
|
if (!deleteRes || deleteRes.code !== "00") {
|
return;
|
}
|
this.dialogDelVisible = false;
|
this.$message.success("删除成功");
|
this.getImagelistConfigurationList();
|
return deleteRes.result;
|
},
|
// 修改翻页条数
|
handleSizeChange(val) {
|
this.pageInfo.pageSize = val;
|
this.getImagelistConfigurationList();
|
},
|
// 修改翻页数
|
handleCurrentChange(val) {
|
this.pageInfo.currentPage = val;
|
this.getImagelistConfigurationList();
|
},
|
//
|
handleSelectionChange(val) {
|
this.selClounms = val;
|
},
|
// 批量复制
|
handleCopyPage() {
|
if (this.selClounms.length < 1) {
|
this.$message.info("请至少选择一条需要复制的影像资料配置");
|
return;
|
}
|
this.copyFormItems.forEach(item => {
|
item.options = this.flowValues;
|
});
|
this.dialogCopyVisible = true;
|
},
|
// 删除列表确认
|
deleteListSure() {
|
if (this.delteTitle === "影像资料配置删除确认") {
|
this.deleteImagelistConfiguration();
|
} else {
|
this.deleteImagelistConfigurationBatch();
|
}
|
},
|
// 批量删除
|
async handleDeleteList() {
|
if (this.selClounms.length < 1) {
|
this.$message.info("请至少选择一条需要删除的影像资料配置");
|
return;
|
}
|
this.delteTitle = "影像资料批量删除确认";
|
this.tipContent = `请确认是否需要删除已选中的影像资料配置`;
|
this.dialogDelVisible = true;
|
},
|
async deleteImagelistConfigurationBatch() {
|
const params = {
|
serialno: this.selClounms.map(({ serialNo }) => {
|
return serialNo;
|
})
|
};
|
const delListsRes = await delImagelistConfigurationBatch(params);
|
if (delListsRes && delListsRes.code === "00") {
|
this.$message.success("删除成功");
|
this.dialogDelVisible = false;
|
this.getImagelistConfigurationList();
|
}
|
},
|
CopyImagelistConfig() {
|
const copyImglistForm = this.$refs.copyImglist;
|
copyImglistForm.$refs["createForm"].validate(async valid => {
|
if (valid) {
|
const { flowno } = copyImglistForm.formValues;
|
const params = {
|
flowno,
|
oldids: this.selClounms.map(({ serialNo }) => {
|
return serialNo;
|
})
|
};
|
const copyRes = await copyImagelistConfigurationBatch(params);
|
this.dialogCopyVisible = false;
|
if (!copyRes || copyRes.code !== "00") {
|
return false;
|
}
|
this.$message.success("复制成功");
|
this.getImagelistConfigurationList();
|
}
|
});
|
}
|
}
|
};
|
</script>
|
<style lang="stylus" scoped>
|
.screenage_doc_main {
|
padding: 20px 0 0 20px;
|
margin-bottom: 70px;
|
& .add-button {
|
padding: 10px 0 30px 0;
|
}
|
& >>> .form-content {
|
/* min-height: 90px!important; */
|
}
|
& >>> .pricing_dialog {
|
width: 1000px;
|
& .el-dialog__body {
|
& .form_main {
|
& .el-form {
|
& .el-form-item {
|
& .el-form-item__label {
|
line-height: 32px;
|
}
|
}
|
}
|
}
|
}
|
& .el-dialog__footer {
|
& .dialog-footer {
|
& .el-button--default {
|
width: 120px;
|
height: 30px;
|
line-height: 7px;
|
border-radius: 4px;
|
border: 1px solid rgba(204, 204, 204, 1);
|
}
|
& .el-button--primary {
|
width: 120px;
|
height: 30px;
|
line-height: 7px;
|
background: #0081f0;
|
border-color: #0081f0;
|
border-radius: 4px;
|
margin-left: 40px;
|
}
|
}
|
}
|
}
|
& >>> .del_dialog {
|
width: 500px !important;
|
}
|
& >>> .copy_dialog {
|
width: 480px !important;
|
}
|
}
|
</style>
|