ef094ce7 by renchao@pashanhoo.com

style:上传

1 parent 0e87777f
/*
* @Description: 材料信息
* @Autor: renchao
* @LastEditTime: 2023-09-08 13:41:46
* @LastEditTime: 2023-09-13 11:09:48
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
......@@ -49,9 +49,9 @@ export function saveClml (data) {
* @param {*} data
* @author: renchao
*/
export function updateClml (data) {
export function updateClml (data, bsmSldy) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/updateClml',
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/updateClml/' + bsmSldy,
method: 'post',
data
})
......
......@@ -278,7 +278,7 @@
}
uploadBatch(formData).then((res) => {
if (res.code == 200) {
this.$emit('updateList', res.result)
this.$emit('updateList', { children: res.result, bsmSj: this.previewImg.bsmSj })
this.$message({
message: '上传成功!',
type: 'success'
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-08 14:18:42
* @LastEditTime: 2023-09-13 11:26:39
-->
<template>
<div class="clxx">
......@@ -173,7 +173,6 @@
formdata.append("bsmSldy", this.$parent.bsmRepair);
formdata.append("clfl", 3);
} else {
//formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSldy", this.$parent.currentSelectProps.bsmSldy);
formdata.append("clfl", 2);
}
......@@ -235,7 +234,7 @@
this.previewImg.imgList = [];
this.tableData.forEach((item, index) => {
if (this.treeCheckId == item.bsmSj) {
item.children = [];
item.ys = 0;
that.treeCheckIndex = index;
}
});
......@@ -309,24 +308,6 @@
this.showImg = item;
this.titleYs = index + 1;
},
/**
* @description: 字典
* @param {*} val
* @param {*} code
* @author: renchao
*/
dicStatus (val, code) {
let data = this.$store.getters.dictData[code],
name = "暂无";
if (data) {
data.map((item) => {
if (item.dcode == val) {
name = item.dname;
}
});
return name;
}
},
//查看明细
viewDetail () {
this.$store.dispatch("user/reWorkFresh", false);
......@@ -335,6 +316,7 @@
"workflow/components/dialog/clxxDetailDialog",
{
data: this.tableData,
bsmSldy: this.$parent.currentSelectProps.bsmSldy,
unitData: this.$parent.unitData,
ableOperation: this.$parent.ableOperation,
bsmRepair: this.$parent.bsmRepair
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-13 10:33:50
* @LastEditTime: 2023-09-13 11:10:27
-->
<template>
<div class="clmlmx-box">
<div style="text-align:right">
<el-button type="primary" icon="el-icon-top">上移</el-button>
<el-button type="primary" icon="el-icon-bottom">下移</el-button>
</div>
<lb-table :column="column" :key="key" row-key="bsmSj" ref="listTable" :heightNumSetting="true" :calcHeight="600"
:pagination="false" :data="tableData">
</lb-table>
......@@ -38,10 +34,6 @@
sortable: null,
column: [
{
label: "选择",
type: 'selection'
},
{
prop: "isrequired",
label: "是否必选",
width: "80",
......@@ -132,6 +124,21 @@
},
},
{
label: "是否新建材料",
width: "80",
render: (h, scope) => {
if (scope.row.sfxjcl && scope.row.sfxjcl == '1') {
return (
<span></span>
);
} else {
return (
<span></span>
);
}
},
},
{
label: "操作",
width: "100",
render: (h, scope) => {
......@@ -140,7 +147,7 @@
<el-button
type="text"
icon="el-icon-delete"
disabled={scope.row.ys == 0 || !this.formData.ableOperation}
disabled={!(scope.row.ys == 0 && scope.row.sfxjcl == '1') || !this.formData.ableOperation}
onClick={() => {
this.handleDelete(scope.$index, scope.row);
}}
......@@ -177,7 +184,8 @@
methods: {
handleSubmit () {
this.loading = true
updateClml(this.tableData).then(res => {
store.dispatch('user/reWorkFresh', false)
updateClml(this.tableData, this.formData.bsmSldy).then(res => {
this.loading = false
if (res.code == 200) {
this.$message({
......@@ -227,16 +235,13 @@
* @param {*} row
*/
handleDelete (index, row) {
if (row.children.length > 0) {
this.$message.error('页数存在不可删除');
return
}
let that = this
this.$confirm('此操作将永久删除该 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.tableData.splice(index, 1);
}).catch(() => {
this.$message({
type: 'info',
......