|
|
@ -103,6 +103,31 @@
|
|
|
|
v-hasPermi="['tcZz/networkSecurity:jgdw:export']"
|
|
|
|
v-hasPermi="['tcZz/networkSecurity:jgdw:export']"
|
|
|
|
>导出</el-button
|
|
|
|
>导出</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
style="display: inline-block; margin: 0 10px"
|
|
|
|
|
|
|
|
action="1"
|
|
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
|
|
:limit="limit"
|
|
|
|
|
|
|
|
:multiple="false"
|
|
|
|
|
|
|
|
:accept="accept"
|
|
|
|
|
|
|
|
:before-upload="handleBeforeUpload"
|
|
|
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
|
|
|
:http-request="handleFile"
|
|
|
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button type="primary" size="mini">导入</el-button>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
|
|
|
|
|
|
|
|
>启用</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="banned"
|
|
|
|
|
|
|
|
autofocus
|
|
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
|
|
>禁用</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table
|
|
|
|
<el-table
|
|
|
|
v-loading="loading"
|
|
|
|
v-loading="loading"
|
|
|
@ -272,11 +297,11 @@
|
|
|
|
labelClassName="desLable"
|
|
|
|
labelClassName="desLable"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-descriptions-item label="区域">{{
|
|
|
|
<el-descriptions-item label="区域">{{
|
|
|
|
selectDictLabel(dict.type.tc_area,form.areaId)
|
|
|
|
selectDictLabel(dict.type.tc_area, form.areaId)
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="启用/禁用">{{
|
|
|
|
<el-descriptions-item label="启用/禁用">{{
|
|
|
|
selectDictLabel(dict.type.tc_start,form.isStatus)
|
|
|
|
selectDictLabel(dict.type.tc_start, form.isStatus)
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="单位名称">{{
|
|
|
|
<el-descriptions-item label="单位名称">{{
|
|
|
@ -304,7 +329,7 @@
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="记录类型">{{
|
|
|
|
<el-descriptions-item label="记录类型">{{
|
|
|
|
selectDictLabel(dict.type.tc_jslx,form.type)
|
|
|
|
selectDictLabel(dict.type.tc_jslx, form.type)
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="备注">{{
|
|
|
|
<el-descriptions-item label="备注">{{
|
|
|
@ -323,7 +348,10 @@ import {
|
|
|
|
addJgdw,
|
|
|
|
addJgdw,
|
|
|
|
updateJgdw,
|
|
|
|
updateJgdw,
|
|
|
|
exportJgdw,
|
|
|
|
exportJgdw,
|
|
|
|
|
|
|
|
isStatusJgdw,
|
|
|
|
|
|
|
|
importJgdw,
|
|
|
|
} from "@/api/tcZz/networkSecurity/jgdw";
|
|
|
|
} from "@/api/tcZz/networkSecurity/jgdw";
|
|
|
|
|
|
|
|
import { Loading } from "element-ui";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Jgdw",
|
|
|
|
name: "Jgdw",
|
|
|
|
//注释字典
|
|
|
|
//注释字典
|
|
|
@ -397,6 +425,10 @@ export default {
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {},
|
|
|
|
rules: {},
|
|
|
|
|
|
|
|
//===========
|
|
|
|
|
|
|
|
fileList: [],
|
|
|
|
|
|
|
|
limit: 1,
|
|
|
|
|
|
|
|
accept: ".xls,.xlsx",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -409,8 +441,74 @@ export default {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//导入
|
|
|
|
|
|
|
|
handleBeforeUpload(file) {
|
|
|
|
|
|
|
|
// 校检文件类型
|
|
|
|
|
|
|
|
const fileName = file.name.split(".");
|
|
|
|
|
|
|
|
const fileExt = fileName[fileName.length - 1];
|
|
|
|
|
|
|
|
const isTypeOk = this.accept.includes(fileExt);
|
|
|
|
|
|
|
|
if (!isTypeOk) {
|
|
|
|
|
|
|
|
this.$modal.msgError(`文件格式不正确, 请上传${this.accept}格式文件!`);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 校检文件大小
|
|
|
|
|
|
|
|
const isLt = file.size / 1024 / 1024 < 5;
|
|
|
|
|
|
|
|
if (!isLt) {
|
|
|
|
|
|
|
|
this.$modal.msgError(`上传文件大小不能超过5 MB!`);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleExceed() {
|
|
|
|
|
|
|
|
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleFile(data) {
|
|
|
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
|
|
|
text: "正在导入数据,请稍候",
|
|
|
|
|
|
|
|
spinner: "el-icon-loading",
|
|
|
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let form = new FormData();
|
|
|
|
|
|
|
|
form.append("file", data.file);
|
|
|
|
|
|
|
|
importJgdw(form)
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("导入成功");
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//批量启用
|
|
|
|
|
|
|
|
enable(row) {
|
|
|
|
|
|
|
|
this.isStatusFuc(row, 1);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//批量禁用
|
|
|
|
|
|
|
|
banned(row) {
|
|
|
|
|
|
|
|
this.isStatusFuc(row, 2);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
isStatusFuc(row, e) {
|
|
|
|
|
|
|
|
const ids = row.id || this.ids.join(",");
|
|
|
|
|
|
|
|
const src = e == 1 ? "启动" : "禁用";
|
|
|
|
|
|
|
|
this.$confirm("是否确认" + src + '编号为"' + ids + '"的数据项?', "警告", {
|
|
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(function () {
|
|
|
|
|
|
|
|
return isStatusJgdw({ ids: ids, isStatus: e });
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.getList(e);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 查询监管单位列表 */
|
|
|
|
/** 查询监管单位列表 */
|
|
|
|
getList() {
|
|
|
|
getList(e) {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
this.queryParams.params = {};
|
|
|
|
this.queryParams.params = {};
|
|
|
|
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
|
|
|
|
if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
|
|
|
@ -427,6 +525,11 @@ export default {
|
|
|
|
this.jgdwList = response.rows;
|
|
|
|
this.jgdwList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
if (e == 1) {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("启动成功");
|
|
|
|
|
|
|
|
} else if (e == 2) {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("禁用成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|