-
+
新增
-
+ >
@@ -227,15 +258,32 @@ export default {
type: String,
default: "",
},
+ infoUrl: {
+ type: String,
+ default: "",
+ },
exportUrl: {
type: String,
default: "",
},
+ importUrl: {
+ type: String,
+ default: "",
+ },
+ mubanUrl: {
+ type: String,
+ default: "",
+ },
editParams: {
type: Array,
default: () => [],
},
+
+ idName: {
+ type: String,
+ default: "id",
+ },
},
data() {
@@ -308,6 +356,89 @@ export default {
this.getTableData();
},
+ beforeExcelUpload(file) {
+ console.log("file", file);
+ const isType = file.type === "application/vnd.ms-excel";
+ const isTypeComputer =
+ file.type ===
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ const fileType = isType || isTypeComputer;
+ const isLt1M = file.size / 1024 / 1024 < 10;
+ if (!fileType) {
+ this.$message.error("上传文件只能是xls/xlsx格式!");
+ }
+
+ if (!isLt1M) {
+ this.$message.error("上传文件大小不能超过 10MB!");
+ }
+ return fileType && isLt1M;
+ },
+ async uploadHttpRequest(file) {
+ let { importUrl: url } = this;
+ if (!url) return;
+
+ this.$message({
+ showClose: true,
+ message: "导入中,请到系统管理-导入记录中查看进度",
+ duration: 0,
+ });
+
+ const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
+ formData.append("file", file.file); //添加文件对象
+ await this.$http
+ .post(url, formData)
+ .then((res) => {
+ console.log("res-up", res);
+ if (res.data.code == 0 && res.data.msg == "success") {
+ // this.$message.success('导入成功')
+ this.getTableData();
+ this.$refs.upload.clearFiles();
+ } else this.$message.error(res.data.msg);
+ })
+ .catch((err) => {
+ console.log("失败", err);
+ file.onError(); //上传失败的文件会从文件列表中删除
+ // this.$message.error('导入失败')
+ });
+ },
+
+ async handleExportModule() {
+ let { mubanUrl: url } = this;
+ if (!url) return;
+
+ await this.$http({
+ method: "POST",
+ url,
+ responseType: "blob",
+ data: {},
+ })
+ .then((res) => {
+ // this.download(res.data, title + '.xls')
+ if (res.headers["content-disposition"]) {
+ let fileName = window.decodeURI(
+ res.headers["content-disposition"].split(";")[1].split("=")[1]
+ );
+ console.log("filename", fileName);
+ let blob = new Blob([res.data], {
+ type: "application/vnd.ms-excel",
+ });
+ var url = window.URL.createObjectURL(blob);
+ var aLink = document.createElement("a");
+ aLink.style.display = "none";
+ aLink.href = url;
+ aLink.setAttribute("download", fileName);
+ document.body.appendChild(aLink);
+ aLink.click();
+ document.body.removeChild(aLink); //下载完成移除元素
+ window.URL.revokeObjectURL(url); //释放掉blob对象
+ } else this.$message.error("下载失败");
+ })
+ .catch((err) => {
+ console.log("err", err);
+ return this.$message.error("网络错误");
+ });
+ },
+
async handleExport() {
const { exportUrl: url } = this;
if (!url) return;
@@ -353,15 +484,17 @@ export default {
},
handleWatch(row) {
+ const { idName } = this;
this.formType = "watch";
- this.formId = row.icServiceOrgId;
+ this.formId = row[idName];
this.formTitle = "查看";
this.formShow = true;
},
handleEdit(row) {
+ const { idName } = this;
this.formType = "edit";
- this.formId = row.icServiceOrgId;
+ this.formId = row[idName];
this.formTitle = "编辑";
this.formShow = true;
},
@@ -380,10 +513,10 @@ export default {
const { delUrl: url } = this;
if (!url) return;
- const { tableData } = this;
+ const { tableData, idName } = this;
const { data, code, msg } = await requestPost(url, {
- icServiceOrgId: tableData[rowIndex].icServiceOrgId,
+ [idName]: tableData[rowIndex][idName],
});
if (code === 0) {
@@ -447,5 +580,5 @@ export default {
diff --git a/src/views/modules/shequ/cpts/people-more.vue b/src/views/modules/shequ/cpts/people-more.vue
index 4ebad94f..69e549c3 100644
--- a/src/views/modules/shequ/cpts/people-more.vue
+++ b/src/views/modules/shequ/cpts/people-more.vue
@@ -252,6 +252,7 @@
style="margin-top: 10px; padding: 0 20px"
>
0) {
- if (ele.children.some(row => row.value === val)) {
+ if (ele.children.some((row) => row.value === val)) {
path.unshift(ele.label);
- this.getNodePath(ele.children,val,path);
+ this.getNodePath(ele.children, val, path);
} else {
- this.getNodePath(ele.children,val,path);
+ this.getNodePath(ele.children, val, path);
}
}
}
diff --git a/src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue b/src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue
index 79e71c99..91301a2e 100644
--- a/src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue
+++ b/src/views/modules/shequzhili/tuceng/anquan/weihua/index.vue
@@ -7,8 +7,12 @@
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
+ :infoUrl="infoUrl"
:exportUrl="exportUrl"
+ :importUrl="importUrl"
+ :mubanUrl="mubanUrl"
:editParams="editParams"
+ idName="icDangerousChemicalsId"
>
@@ -22,73 +26,114 @@ export default {
data() {
return {
searchParams: [
+ { field: "企业名称", keyName: "name", type: "input" },
{
- field: "服务类别",
- keyName: "serviceType",
+ field: "企业类型",
+ keyName: "category",
+ type: "select",
+ optionUrl: "/gov/org/coverage/dict-select-list/dangerous_chemicals",
+ optionUrlParams: {},
+ optionList: [],
+ },
+ {
+ field: "危化品种类",
+ keyName: "dangerType",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
- dictType: "ic_service_type",
+ dictType: "ic_danger_type",
},
optionList: [],
},
- { field: "服务组织", keyName: "orgName", type: "input" },
- { field: "服务地址", keyName: "address", type: "input" },
- { field: "备注", keyName: "remark", type: "input" },
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
- { field: "服务类别", keyName: "serviceType", type: "text" },
- { field: "服务组织名称", keyName: "orgName", type: "text" },
- { field: "服务地址", keyName: "address", type: "text" },
+ { field: "企业名称", keyName: "name", type: "text" },
+ { field: "企业类别", keyName: "categoryName", type: "text" },
+ { field: "周边安全间距", keyName: "safeDistanceName", type: "text" },
+ { field: "危化品种类", keyName: "dangerTypeName", type: "text" },
+ { field: "经营地址", keyName: "address", type: "text" },
+ { field: "负责人", keyName: "principalName", type: "text" },
+ { field: "联系电话", keyName: "principalMobile", type: "text" },
{ field: "备注", keyName: "remark", type: "text" },
],
- tableUrl: "/heart/icServiceOrg/list",
- exportUrl: "/gov/project/icEvent/export",
+ tableUrl: "/gov/org/icDangerousChemicals/list",
+ mubanUrl: "/gov/org/icDangerousChemicals/download",
+ importUrl: "/gov/org/icDangerousChemicals/import",
+ exportUrl: "/gov/org/icDangerousChemicals/export",
+
+ addUrl: "/gov/org/icDangerousChemicals/add",
+ editUrl: "/gov/org/icDangerousChemicals/edit",
+ infoUrl: "/gov/org/icDangerousChemicals/detail",
+ delUrl: "/gov/org/icDangerousChemicals/del",
editParams: [
{
- field: "服务类别",
- keyName: "serviceType",
+ field: "企业名称",
+ keyName: "name",
+ type: "input",
+ maxlength: 100,
+ editDisabled: true,
+ rules: [
+ {
+ required: true,
+ message: "企业名称不能为空",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ field: "企业分类",
+ keyName: "category",
type: "select",
- optionUrl: "/sys/dict/data/dictlist",
+ optionUrl: "/gov/org/coverage/dict-select-list/dangerous_chemicals",
optionUrlParams: {
- dictType: "ic_service_type",
+ // dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
- { required: true, message: "服务类别不能为空", trigger: "blur" },
+ { required: true, message: "企业分类不能为空", trigger: "blur" },
],
},
{
- field: "服务组织",
- keyName: "orgName",
- type: "input",
- maxlength: 100,
+ field: "周边安全间距",
+ keyName: "safeDistance",
+ type: "number",
+ min: 0,
+ max: 1000000000,
+ unitName: "公里",
+ },
+ {
+ field: "危化品种类",
+ keyName: "dangerType",
+ type: "select",
+ optionUrl: "/sys/dict/data/dictlist",
+ optionUrlParams: {
+ dictType: "ic_danger_type",
+ },
+ optionList: [],
editDisabled: true,
- rules: [
- {
- required: true,
- message: "服务组织名称不能为空",
- trigger: "blur",
- },
- ],
},
+ { field: "负责人", keyName: "principalName", type: "input" },
+ { field: "联系电话", keyName: "principalMobile", type: "input" },
{
- field: "服务地址",
+ field: "经营地址",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
+ rules: [
+ {
+ required: true,
+ message: "经营地址坐标不能为空",
+ trigger: "blur",
+ },
+ ],
},
- { field: "备注", keyName: "remark", type: "input" },
+ { field: "备注", keyName: "remark", type: "textarea" },
],
-
- addUrl: "/heart/icServiceOrg/add",
- editUrl: "/heart/icServiceOrg/edit",
- delUrl: "/heart/icServiceOrg/del",
};
},
components: { basePage },
diff --git a/src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue b/src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue
index 79e71c99..1d8aa749 100644
--- a/src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue
+++ b/src/views/modules/shequzhili/tuceng/yingji/ziyuan/index.vue
@@ -7,8 +7,12 @@
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
+ :infoUrl="infoUrl"
:exportUrl="exportUrl"
+ :importUrl="importUrl"
+ :mubanUrl="mubanUrl"
:editParams="editParams"
+ idName="icSuperiorResourceId"
>
@@ -22,73 +26,95 @@ export default {
data() {
return {
searchParams: [
+ { field: "场所名称", keyName: "name", type: "input" },
{
- field: "服务类别",
+ field: "场所分类",
keyName: "serviceType",
type: "select",
- optionUrl: "/sys/dict/data/dictlist",
- optionUrlParams: {
- dictType: "ic_service_type",
- },
+ optionUrl: "/gov/org/coverage/dict-select-list/superior_resource",
+ optionUrlParams: {},
optionList: [],
},
- { field: "服务组织", keyName: "orgName", type: "input" },
- { field: "服务地址", keyName: "address", type: "input" },
- { field: "备注", keyName: "remark", type: "input" },
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
- { field: "服务类别", keyName: "serviceType", type: "text" },
- { field: "服务组织名称", keyName: "orgName", type: "text" },
- { field: "服务地址", keyName: "address", type: "text" },
- { field: "备注", keyName: "remark", type: "text" },
+ { field: "场所名称", keyName: "name", type: "text" },
+ { field: "场所类别", keyName: "categoryName", type: "text" },
+ { field: "占地面积", keyName: "areaCoveredName", type: "text" },
+ { field: "容纳人数", keyName: "capacityName", type: "text" },
+ { field: "地址", keyName: "address", type: "text" },
],
- tableUrl: "/heart/icServiceOrg/list",
- exportUrl: "/gov/project/icEvent/export",
+ tableUrl: "/gov/org/icSuperiorResource/list",
+ mubanUrl: "/gov/org/icSuperiorResource/download",
+ importUrl: "/gov/org/icSuperiorResource/import",
+ exportUrl: "/gov/org/icSuperiorResource/export",
+
+ addUrl: "/gov/org/icSuperiorResource/add",
+ editUrl: "/gov/org/icSuperiorResource/edit",
+ infoUrl: "/gov/org/icSuperiorResource/detail",
+ delUrl: "/gov/org/icSuperiorResource/del",
editParams: [
{
- field: "服务类别",
+ field: "场所名称",
+ keyName: "name",
+ type: "input",
+ maxlength: 100,
+ editDisabled: true,
+ rules: [
+ {
+ required: true,
+ message: "场所名称不能为空",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ field: "场所分类",
keyName: "serviceType",
type: "select",
- optionUrl: "/sys/dict/data/dictlist",
+ optionUrl: "/gov/org/coverage/dict-select-list/superior_resource",
optionUrlParams: {
- dictType: "ic_service_type",
+ // dictType: "ic_service_type",
},
optionList: [],
editDisabled: true,
rules: [
- { required: true, message: "服务类别不能为空", trigger: "blur" },
+ { required: true, message: "场所分类不能为空", trigger: "blur" },
],
},
{
- field: "服务组织",
- keyName: "orgName",
- type: "input",
- maxlength: 100,
- editDisabled: true,
- rules: [
- {
- required: true,
- message: "服务组织名称不能为空",
- trigger: "blur",
- },
- ],
+ field: "占地面积",
+ keyName: "areaCovered",
+ type: "number",
+ min: 0,
+ max: 1000000000,
+ unitName: "平方公里",
+ },
+ {
+ field: "容纳人数",
+ keyName: "capacity",
+ type: "number",
+ min: 0,
+ max: 1000000000,
+ // unitName: "个",
},
{
- field: "服务地址",
+ field: "位置坐标",
keyName: "address",
type: "address",
supKeys: ["longitude", "latitude"],
supValues: ["", ""],
+ rules: [
+ {
+ required: true,
+ message: "地址坐标不能为空",
+ trigger: "blur",
+ },
+ ],
},
- { field: "备注", keyName: "remark", type: "input" },
],
-
- addUrl: "/heart/icServiceOrg/add",
- editUrl: "/heart/icServiceOrg/edit",
- delUrl: "/heart/icServiceOrg/del",
};
},
components: { basePage },
diff --git a/src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue b/src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue
index 79e71c99..0b98fd9e 100644
--- a/src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue
+++ b/src/views/modules/shequzhili/tuceng/zhonghe/xinfang.vue
@@ -1,104 +1,840 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
+
-
+