You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1139 lines
34 KiB

<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="堤防编码" prop="dikeCode">
<el-input
v-model="queryParams.data.dikeCode"
placeholder="请输入堤防编码"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<!-- <el-button
type="cyan"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
> -->
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['df:bzhjs:add']"
>新增</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['df:bzhjs:edit']"
>修改</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['df:bzhjs:remove']"
>删除</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="bzhjsList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
<el-table-column
label="堤防编码"
align="center"
prop="dikeCode"
min-width="120"
/>
<el-table-column
label="堤防名称"
align="center"
prop="dikeName"
min-width="120"
/>
<el-table-column
label="堤防类型"
align="center"
prop="dikeType"
:formatter="dikeTypeFormat"
min-width="120"
/>
<!-- <el-table-column
label="工程规模"
align="center"
prop="engScal"
:formatter="projectScaleFormat"
min-width="120"
/>
<el-table-column
label="堤防主管部门"
align="center"
prop="unit"
min-width="120"
/>-->
<el-table-column
label="所在行政区划"
align="center"
prop="adcd"
:formatter="$formatAdcd"
min-width="120"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="180"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row, true)"
v-if="scope.row.status !== '0'"
>{{ formatStatusText(scope.row) }}</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row, true)"
v-hasPermi="['df:bzhjs:edit']"
v-if="scope.row.status == 0 || scope.row.status == null"
>自评审核</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['df:bzhjs:remove']"
v-if="
scope.row.status == 0 ||
scope.row.status == 2 ||
scope.row.status == null
"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改堤防标准化建设对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1600px"
append-to-body
:close-on-click-modal="false"
@close="closeDialog"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="堤防名称" prop="dikeCode">
<linkDike
:form="form"
v-if="open"
:disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"
/>
<!-- <el-select
v-model="form.dikeCode"
placeholder="请选择堤防名称"
style="width: 100%"
>
<el-option
v-for="dict in dikeNameOptions"
:key="dict.id"
:label="dict.dikeName"
:value="dict.dikeCode"
></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="验收申请" prop="acceptanceAttachment">
<myUpload
:fileList="fileList1"
:disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"
/>
<!-- <el-upload
class="upload-demo"
:action="uploadUrl"
:headers="headers"
:on-preview="handlePreview"
:on-remove="(file) => handleRemove(file, 'fileList1')"
:before-remove="beforeRemove"
multiple
:on-exceed="handleExceed"
:on-success="(_, fileList) => submitUpload(fileList, 'fileList1')"
:file-list="fileList1"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div slot="tip" class="el-upload__tip">
支持jpg/png文件等,不超过100M
</div>
</el-upload> -->
</el-form-item>
<!-- <el-form-item label="状态" prop="stauts">
<el-input v-model="form.stauts" placeholder="请输入状态" />
</el-form-item> -->
<!-- <el-form-item label="分数" prop="score">
<el-input v-model="form.score" placeholder="请输入分数" />
</el-form-item> -->
</el-form>
<div class="listTitle">
<span>评价表</span>
<!-- <span class="addBtn" @click="handleAddList('0')">
<i class="el-icon-plus"></i>
添加
</span> -->
</div>
<div class="tableBox">
<table class="infoTable" border="1">
<tbody>
<!-- 头部第一行 -->
<tr class="ant-descriptions-row">
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 50px"
>
<span>类别</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 50px"
>
<span>项目</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 80px"
>
<span>标准化基本要求</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="4"
rowspan="1"
style="width: 400px"
>
<span>
广东省司价标准<br />
(一: 900分以上,前四类85%:二: 800分以上,前四类75%: 三:
700分以上,前四65%:不达标 700分以下,前四类65%)
</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 50px"
>
<span>评审方式</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 50px"
>
<span>扣分值</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="2"
style="width: 80px"
>
<span>扣分原因</span>
</th>
</tr>
<!-- 头部第二行 -->
<tr class="ant-descriptions-row">
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="1"
style="width: 50px"
>
<span>评价内容及要求</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="1"
style="width: 30px"
>
<span>标准分</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="1"
style="width: 50px"
>
<span>评价指标及赋分</span>
</th>
<th
class="ant-descriptions-item-label"
colspan="1"
rowspan="1"
style="width: 200px"
>
<span>赋分解释</span>
</th>
</tr>
<!-- 正文 -->
<template v-for="(sub, no) in evalData">
<!-- 正文第一行 -->
<tr class="ant-descriptions-row" :key="sub.category + no">
<!-- 类别 -->
<td
class="ant-descriptions-item-content"
colspan="1"
:rowspan="sub.children ? sub.children.length : '2'"
style="max-width: 50px"
>
<span>{{ sub.category }}</span>
</td>
<!-- 项目 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].project }}</span>
</td>
<!-- 标准化基本要求 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].basicRequirements }}</span>
</td>
<!-- 评价内容及要求 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].evaluationContent }}</span>
</td>
<!-- 标准分 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>
{{ sub.children[0] ? sub.children[0].score : "--" }}</span
>
</td>
<!-- 评价指标及赋分 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].evaluationIndicators }}</span>
</td>
<!-- 赋分解释 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].scoringInterpretation }}</span>
</td>
<!-- 评审方式 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 120px"
>
<span>{{ sub.children[0].reviewMethod }}</span>
</td>
<!-- 扣分值 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 100px"
>
<!-- <span>空</span> -->
<!-- oninput="if ( value > sub.children[0] ? sub.children[0].score:0) value = sub.children[0] ? sub.children[0].score:0; value = value .replace(/^0|[^0-9]/g,'')" -->
<el-input
v-model.number="
evalForm.score[`${sub.orderBy + '-' + 'S1'}`]
"
placeholder="0"
@input="
diffScore(
`${sub.orderBy + '-' + 'S1'}`,
sub.children[0] ? sub.children[0].score : 0
)
"
>
<template slot="append">分</template>
</el-input>
</td>
<!-- 扣分原因 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 200px"
>
<!-- <span>空</span> -->
<el-input
v-model="evalForm.reason[`${sub.orderBy + '-' + 'R1'}`]"
placeholder="扣分原因"
style="width: 90%"
type="textarea"
rows="4"
>
</el-input>
</td>
</tr>
<!-- 二级内容,即表格中的第三列后的内容(除了第一个children) -->
<template v-for="(item, index) in sub.children">
<tr
class="ant-descriptions-row"
:key="item.id"
v-if="index != 0"
style="max-width: 310px"
>
<!-- 项目 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="white-space: pre-wrap; text-align: left"
>
<span>{{ item.project }}</span>
</td>
<!-- 标准化基本要求 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.basicRequirements }}</span>
</td>
<!-- 评价内容及要求 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.evaluationContent }}</span>
</td>
<!-- 标准分 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.score }}</span>
</td>
<!-- 评价指标及赋分 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.evaluationIndicators }}</span>
</td>
<!-- 赋分解释 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.scoringInterpretation }}</span>
</td>
<!-- 评审方式 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<span>{{ item.reviewMethod }}</span>
</td>
<!-- 扣分值 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 100px"
>
<!-- <span>空</span> -->
<el-input
v-model.number="
evalForm.score[
`${sub.orderBy + '-' + 'S' + (index + 1)}`
]
"
placeholder="0"
@input="
diffScore(
`${sub.orderBy + '-' + 'S' + (index + 1)}`,
item.score ? item.score : 0
)
"
>
<template slot="append">分</template>
</el-input>
</td>
<!-- 扣分原因 -->
<td
class="ant-descriptions-item-content"
colspan="1"
style="max-width: 50px"
>
<!-- <span>空</span> -->
<el-input
v-model="
evalForm.reason[
`${sub.orderBy + '-' + 'R' + (index + 1)}`
]
"
placeholder="扣分原因"
style="width: 90%"
type="textarea"
rows="4"
>
</el-input>
</td>
</tr>
</template>
</template>
<!-- 底部描述 -->
<tr>
<td :colspan="10" style="text-align: left">
<span style="white-space: pre-wrap">
说明:<br />
1.本标准中“标准化基本要求”为省级制定标准化评价标准的基本要求,“广东省评价标准”为申报广东省标准化评价的标准。<br />
2.根据标准化评价内容及要求采用千分制考核,总分达到
900分(含)以上,且工程状况、安全管理、运行管护、管理保障四个类别评价得分均不低于该类别总分85%的为一级达标;总分达到
800
分(含)以上,且工程状况、安全管理、运行管护、管理保障四个类别评价得分均不低于该类别总分75%的为二级达标;总分达到
700分(含)以上,且工程状况、安全管理、运行管护、管理保障四个类别评价得分均不低于该类别总分65%的为三级达标。评价中若出现合理缺项,合理缺项评价得分计算方法为“合理缺项得分=[项目所在类别评价得分/(项目所在类别标准分-合理缺项标准分)]×合理缺项标准分”。<br />
3.表中扣分值为评分要点的最高扣分值,评分时可依据具体情况在该分值范围内酌情扣分。<br />
4.原则上县域内同一法人单位管理的同一河流(湖泊)上的堤防工程视为同一个评价单元。<br />
5.满分最高一千分,超出一千分仍按照一千分计。<br />
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="ipt-wrap" v-if="statusBtnShow(['1', '2', '3', '4'])">
<div class="listTitle">
<span>意见</span>
</div>
<el-input
type="textarea"
:rows="3"
placeholder="请输入意见"
v-model="form.auditOpinion"
:disabled="!statusBtnShow(['1', '2'])"
>
</el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0', '1', '2', '3'])"
>{{ formatBtnText() }}</el-button
>
<el-button
type="warning"
@click="submitForm(true)"
v-if="statusBtnShow(['1'])"
>驳 回</el-button
>
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0']) || !this.form.status"
>确 定</el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listBzh,
listBzhjs,
getBzhjs,
delBzhjs,
addBzhjs,
updateBzhjs,
exportBzhjs,
} from "@/api/yg/dike/bzhjs";
import { listJbxx } from "@/api/yg/dike/jbxx";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
import linkDike from "@/components/linkNameSelect/linkDike.vue";
export default {
name: "Bzhjs",
components: {
linkDike,
},
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 堤防标准化建设表格数据
bzhjsList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 堤防类型字典
dikeTypeOptions: [],
// 工程规模字典
projectScaleOptions: [],
dikeNameOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
dikeCode: null,
stauts: null,
acceptanceAttachment: null,
score: null,
createUid: null,
updateUid: null,
},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
},
// 表单参数
form: {
// status: "0", //新增
},
// 表单校验
rules: {
dikeCode: [
{ required: true, message: "请选择堤防名称", trigger: "change" },
],
},
// 请求头
headers: {
shuili: "water " + getToken(),
},
fileList1: [],
evalData: [],
evalForm: {
score: {},
reason: {},
},
totalScore: 0,
statusHandle: false,
statusType: {
0: "新增",
1: "已上报",
2: "被驳回",
3: "审核通过",
4: "已备案",
},
};
},
computed: {},
created() {
this.getList();
this.getEval();
listJbxx({ data: {} }).then((res) => {
// console.log(111, res);
this.dikeNameOptions = res.records;
});
this.getDicts("engineering_scale").then((response) => {
this.projectScaleOptions = response.data;
});
this.getDicts("embankment_type").then((response) => {
this.dikeTypeOptions = response.data;
});
},
methods: {
diffScore(name, value) {
// console.log("value", name, value);
var rep = new RegExp("^[0-9]*[1-9][0-9]*$");
// console.log(777777777, rep.test(this.evalForm.score[name]));
// 非整数变为空
if (!rep.test(this.evalForm.score[name])) {
this.evalForm.score[name] = "";
}
// 超过最大值,赋值为最大值
if (this.evalForm.score[name] > value) {
this.evalForm.score[name] = parseInt(value);
}
let startScore = 100;
console.log(88888888, Object.values(this.evalForm.score));
Object.values(this.evalForm.score).forEach(
(item) => (startScore = startScore - item)
);
this.totalScore = startScore;
},
getEval() {
listBzh({ data: {}, pageSize: 200 }).then((data) => {
console.log("data", data);
let newArr = [];
let getChildren = (newArr, pid) => {
for (const i of data.records) {
if (i.parentId == pid) {
// console.log(9999, parentId);
const newItem = { ...i, children: [] };
newArr.push(newItem);
getChildren(newItem.children, newItem.id);
}
}
};
getChildren(newArr, 0);
this.evalData = newArr;
this.evalData = this.evalData.sort((a, b) => a.orderBy - b.orderBy);
this.evalData.forEach((sub, index) => {
this.evalData[index].children = sub.children.sort(
(a, b) => a.orderBy - b.orderBy
);
});
console.log("评价表", this.evalData);
});
},
closeDialog() {
this.fileList1 = [];
this.evalForm = {
score: {},
reason: {},
};
this.reset();
},
/** 查询堤防标准化建设列表 */
getList() {
this.loading = true;
listBzhjs(this.queryParams).then((response) => {
this.bzhjsList = response.records;
this.total = response.total;
this.loading = false;
});
},
// 工程规模字典翻译
projectScaleFormat(row, column) {
return this.selectDictLabel(this.projectScaleOptions, row.engScal);
},
// 堤防类型字典翻译
dikeTypeFormat(row, column) {
return this.selectDictLabel(this.dikeTypeOptions, row.dikeType);
},
// 取消按钮
cancel() {
this.open = false;
this.statusHandle = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
dikeCode: null,
stauts: null,
acceptanceAttachment: null,
score: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: null,
auditOpinion:''
};
this.resetForm("form");
},
// 查询表单重置
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
dikeCode: null,
stauts: null,
acceptanceAttachment: null,
score: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加堤防标准化建设";
},
formatStatusText(row) {
console.log("formatStatusText", row);
let status = row.status;
return this.statusType[status];
},
formatBtnText() {
let data = this.form;
let status = JSON.parse(JSON.stringify(data.status));
switch (status) {
case "0":
return "上 报";
case "1":
return "审 核";
case "2":
return "重新上报";
case "3":
return "备 案";
}
},
statusBtnShow(typeList) {
console.log("statusBtnShowtypeList", typeList);
console.log("statusBtnShowform", this.form);
console.log("-----------");
// let data = this.form;
let data = JSON.parse(JSON.stringify(this.form));
// let status = JSON.parse(JSON.stringify(data.status));
if (data.status) {
return typeList.includes(data.status);
} else {
return false;
}
},
/** 修改按钮操作 */
handleUpdate(row, statusHandle = false) {
this.statusHandle = statusHandle;
this.reset();
const id = row.id || this.ids;
getBzhjs(id).then((response) => {
this.form = response.data;
if (this.form.acceptanceAttachment) {
this.fileList1 = JSON.parse(this.form.acceptanceAttachment);
}
if (this.form.score) {
this.evalForm = JSON.parse(this.form.score);
}
this.open = true;
this.title = "修改堤防标准化建设";
});
},
/** 提交按钮 */
submitForm(status) {
this.form.acceptanceAttachment = this.fileList1.length
? JSON.stringify(this.fileList1)
: null;
this.$refs["form"].validate((valid) => {
if (valid) {
console.log("----------", status);
// return;
this.form.score = JSON.stringify(this.evalForm);
if (this.form.id != null) {
if (this.statusHandle) {
if (status) {
this.form.status = "2";
} else if (this.form.status == "2") {
this.form.status = "1";
} else if (this.form.status == "1") {
this.form.status = "3";
} else {
this.form.status = parseInt(this.form.status) + 1;
}
}
updateBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("自评成功");
this.open = false;
this.getList();
}
});
} else {
this.form.status = "0";
this.form.auditOpinion = "";
addBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delBzhjs(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
// 上传意见附件
submitUpload(fileList, name) {
console.log(name, fileList);
this[name].push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
console.log(name, this[name]);
},
handleRemove(file, name) {
// console.log(file, fileList1);
let index = this[name].findIndex((item) => item.uid === file.uid);
// 删除文件
this[name].splice(index, 1);
},
downloadFile(item, index) {
let file = JSON.parse(item)[index];
this.handlePreview(file);
},
downloadFile2(info, index) {
console.log(info);
this.handlePreview(info);
},
// 点击预览的文件进行下载
handlePreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type类型后端返回来的数据中会有,根据自己实际进行修改
// 表格下载为 application/xlsx,压缩包为 application/zip等,
type: "application/xlsx",
}); //excel,pdf等
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象
const a = document.createElement("a"); //创建a标签
a.style.display = "none";
a.href = href; // 指定下载链接
a.download = file.name; //指定下载文件名
a.click(); //触发下载
URL.revokeObjectURL(a.href); //释放URL对象
});
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
::v-deep .el-dialog {
margin-top: 2vh !important;
}
.listTitle {
font-size: 14px;
padding-left: 10px;
padding-right: 30px;
margin: 20px 0;
border-left: 2px solid #36b29e;
display: flex;
justify-content: space-between;
span:nth-child(1) {
font-weight: bold;
// color: #000;
}
.addBtn {
color: #36b29e;
cursor: pointer;
}
.addBtn:hover {
color: #31a08e;
}
}
.listTitle:nth-child(1) {
margin-top: 0;
}
.ipt-wrap {
margin-top: 30px;
}
.tableBox {
height: 600px;
overflow-y: auto;
.infoTable,
.detialsTable {
width: 100%;
border-collapse: collapse;
border-color: #ccc;
}
.infoTable th,
.infoTable tr,
.detialsTable th,
.detialsTable tr {
padding: 20px 0;
text-align: center;
}
.infoTable tr td span {
line-height: 24px;
// padding: 0 10px;
}
.infoTable tr td ::v-deep {
.el-input {
width: 90px;
}
.el-input-group__append {
padding: 0 10px;
}
}
}
</style>