Commit 67714962 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 4aea065c 25be7be9
#开发环境 #开发环境
NODE_ENV = "development" NODE_ENV = "development"
#VUE_APP_API_BASE_URL=http://192.168.0.98:11078 VUE_APP_API_BASE_URL=http://192.168.0.98:11078
VUE_APP_API_BASE_URL=http://10.12.185.213:11071 VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
\ No newline at end of file #VUE_APP_API_BASE_URL=http://10.12.185.213:11071
\ No newline at end of file
...@@ -3,3 +3,4 @@ NODE_ENV = production ...@@ -3,3 +3,4 @@ NODE_ENV = production
VUE_APP_API_BASE_URL=/basics_api VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_portal_URL=/portal_home VUE_APP_API_portal_URL=/portal_home
VUE_APP_API_IMG_URL =
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
NODE_ENV = "test" NODE_ENV = "test"
VUE_APP_API_BASE_URL=/basics_api VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_portal_URL=/portal_home VUE_APP_API_portal_URL=/portal_home
VUE_APP_API_IMG_URL =
\ No newline at end of file
...@@ -9,6 +9,8 @@ yarn-error.log* ...@@ -9,6 +9,8 @@ yarn-error.log*
/test/e2e/reports/ /test/e2e/reports/
selenium-debug.log selenium-debug.log
dist.zip dist.zip
基础设置系统.zip
zip/
# Editor directories and files # Editor directories and files
.idea .idea
.vscode .vscode
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
data() { data() {
return { return {
previewInfo: this.$route.query, previewInfo: this.$route.query,
previewUrl: "http://192.168.0.192:8082", previewUrl: "",
loading: true, loading: true,
}; };
}, },
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
<img <img
v-if="text.img" v-if="text.img"
width="50" width="50"
:src="api + text.img" :src="api2 + text.img"
@click="handlePreview('img', api + text.img)" @click="handlePreview('img', api2 + text.img)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
<video <video
v-if="text.video" v-if="text.video"
width="50" width="50"
:src="api + text.video" :src="api2 + text.video"
@click="handlePreview('vidoe', api + text.video)" @click="handlePreview('vidoe', api2 + text.video)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
appId: this.$route.query.id, appId: this.$route.query.id,
loading: false, loading: false,
current: 1, current: 1,
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
v-if="text.appIconPath" v-if="text.appIconPath"
height="20" height="20"
width="20" width="20"
:src="api + text.appIconPath" :src="api2 + text.appIconPath"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -172,6 +172,7 @@ export default { ...@@ -172,6 +172,7 @@ export default {
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
columns, columns,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<img <img
class="icon" class="icon"
v-if="form.appIconPath" v-if="form.appIconPath"
:src="api + form.appIconPath" :src="api2 + form.appIconPath"
/> />
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
...@@ -173,6 +173,7 @@ export default { ...@@ -173,6 +173,7 @@ export default {
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
labelCol: { labelCol: {
span: 3, span: 3,
}, },
...@@ -273,7 +274,7 @@ export default { ...@@ -273,7 +274,7 @@ export default {
} }
}); });
}, },
// 图标删除之前 // 图标上传之前
iconBeforeUpload(file) { iconBeforeUpload(file) {
const isJpgOrPng = const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png"; file.type === "image/jpeg" || file.type === "image/png";
...@@ -293,7 +294,6 @@ export default { ...@@ -293,7 +294,6 @@ export default {
return; return;
} }
if (info.file.status === "done") { if (info.file.status === "done") {
console.log(info);
this.form.appIconPath = info.file.response.url; this.form.appIconPath = info.file.response.url;
this.loading = false; this.loading = false;
} }
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
<a-table <a-table
bordered bordered
:pagination="{ :pagination="{
showTotal: (total) => `共 ${total} 条`,
current: rightCurrent, current: rightCurrent,
total: rightTotal, total: rightTotal,
pageSize: rightSize, pageSize: rightSize,
......
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
<!-- 模块图标 --> <!-- 模块图标 -->
<template slot="modelIcon" slot-scope="text"> <template slot="modelIcon" slot-scope="text">
<div v-if="text.modelIcon"> <div v-if="text.modelIcon">
<div class="svg-box" v-if="isSvg(text.modelIcon)"> <!-- <div class="svg-box" v-if="isSvg(text.modelIcon)">
<img width="30" height="30" :src="api + text.modelIcon" /> <img width="30" height="30" :src="api2 + text.modelIcon" />
</div> </div> -->
<div class="svg-box" v-else> <div class="svg-box">
<img width="30" height="30" :src="api + text.modelIcon" /> <img width="30" height="30" :src="api2 + text.modelIcon" />
</div> </div>
</div> </div>
<span v-else>--</span> <span v-else>--</span>
...@@ -161,9 +161,7 @@ ...@@ -161,9 +161,7 @@
> >
<div v-if="fileList.length < 1"> <div v-if="fileList.length < 1">
<a-icon type="plus" /> <a-icon type="plus" />
<div class="ant-upload-text"> <div class="ant-upload-text">点击上传</div>
点击上传
</div>
</div> </div>
</a-upload> </a-upload>
...@@ -275,6 +273,7 @@ export default { ...@@ -275,6 +273,7 @@ export default {
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png,image/svg+xml", // 上传类型 accept: "image/jpeg,image/png,image/svg+xml", // 上传类型
previewData: {}, // 预览 previewData: {}, // 预览
previewVisible: false, previewVisible: false,
...@@ -370,7 +369,7 @@ export default { ...@@ -370,7 +369,7 @@ export default {
uid: -1, uid: -1,
status: "done", status: "done",
name: this.formData.modelIcon, name: this.formData.modelIcon,
url: this.api + this.formData.modelIcon, url: this.api2 + this.formData.modelIcon,
url2: this.formData.modelIcon, url2: this.formData.modelIcon,
}, },
]; ];
...@@ -438,7 +437,7 @@ export default { ...@@ -438,7 +437,7 @@ export default {
this.fileList = this.fileList.map((v) => { this.fileList = this.fileList.map((v) => {
if (v.response) { if (v.response) {
v.url2 = v.response.url; v.url2 = v.response.url;
v.url = this.api + v.response.url; v.url = this.api2 + v.response.url;
} }
return v; return v;
}); });
...@@ -477,15 +476,15 @@ export default { ...@@ -477,15 +476,15 @@ export default {
this.handleReset(); this.handleReset();
}, },
// 图片类型 // 图片类型
isSvg(url) { // isSvg(url) {
let index = url.lastIndexOf("."); // let index = url.lastIndexOf(".");
let str = url.slice(index + 1); // let str = url.slice(index + 1);
if (str === "svg") { // if (str === "svg") {
return true; // return true;
} else { // } else {
return false; // return false;
} // }
}, // },
}, },
}; };
</script> </script>
......
...@@ -110,12 +110,8 @@ ...@@ -110,12 +110,8 @@
class="select-department" class="select-department"
placeholder="事项来源" placeholder="事项来源"
> >
<a-select-option :value="0"> <a-select-option :value="0"> 一体化添加 </a-select-option>
一体化添加 <a-select-option :value="1"> 手动添加 </a-select-option>
</a-select-option>
<a-select-option :value="1">
手动添加
</a-select-option>
</a-select> </a-select>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
...@@ -145,7 +141,6 @@ ...@@ -145,7 +141,6 @@
:data-source="siteMatterData" :data-source="siteMatterData"
:rowKey="(record) => record.id" :rowKey="(record) => record.id"
:row-selection="{ :row-selection="{
type: 'radio',
selectedRowKeys: matterKeys, selectedRowKeys: matterKeys,
onChange: handleChange, onChange: handleChange,
}" }"
...@@ -162,39 +157,6 @@ ...@@ -162,39 +157,6 @@
</template> </template>
</a-table> </a-table>
</div> </div>
<!-- <a-form-model
:model="formData"
:rules="rules"
ref="formData"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 18 }"
>
<a-form-model-item label="事项名称" prop="siteMatterId">
<a-select
style="width: 354px"
show-search
:filter-option="filterOption"
v-model="formData.siteMatterId"
placeholder="请选择事项"
@change="handleChange"
>
<a-select-option
v-for="v in siteMatterData"
:key="v.id"
:value="v.id"
>
{{ v.matterName }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="排序" prop="sort">
<a-input v-model="formData.sort" placeholder="请输入排序" />
</a-form-model-item>
<a-form-model-item label="是否显示" prop="isShow">
<y-switch v-model="formData.isShow"></y-switch>
</a-form-model-item>
</a-form-model> -->
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -202,7 +164,7 @@ ...@@ -202,7 +164,7 @@
<script> <script>
import { getSiteMatterList } from "@/services/matter"; import { getSiteMatterList } from "@/services/matter";
import { import {
saveWindowmatter, saveWindowbatch,
getWindowmatterList, getWindowmatterList,
delWindowmatter, delWindowmatter,
getWindowInfo, getWindowInfo,
...@@ -224,6 +186,7 @@ const leftColumns = [ ...@@ -224,6 +186,7 @@ const leftColumns = [
{ {
title: "事项名称", title: "事项名称",
dataIndex: "matterName", dataIndex: "matterName",
ellipsis: true,
}, },
{ {
title: "排序", title: "排序",
...@@ -403,19 +366,20 @@ export default { ...@@ -403,19 +366,20 @@ export default {
}, },
// 保存 // 保存
async handleOk() { async handleOk() {
if (this.matterKeys.length) { if (this.matterRows.length) {
let obj = { let arr = this.matterRows.map((v) => {
return {
windowId: this.windowInfo.id, windowId: this.windowInfo.id,
windowName: this.windowInfo.name, windowName: this.windowInfo.name,
siteMatterId: this.matterKeys.join(","), siteMatterId: v.id,
matterName: this.matterRows[0].matterName, matterName: v.matterName,
deptId: this.matterRows[0].deptId, deptId: v.deptId,
deptName: this.matterRows[0].deptName, deptName: v.deptName,
isShow: 1,
sort: 99,
}; };
let res = await saveWindowmatter({
...this.formData,
...obj,
}); });
let res = await saveWindowbatch(arr);
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
...@@ -440,17 +404,10 @@ export default { ...@@ -440,17 +404,10 @@ export default {
// 事项选择选择 // 事项选择选择
handleChange(keys, rows) { handleChange(keys, rows) {
this.matterKeys = keys; this.matterKeys = keys;
this.matterRows = rows; this.matterRows = [...new Set([...this.matterRows, ...rows])];
// let { text } = event.componentOptions.children[0]; this.matterRows = this.matterRows.filter((v) => {
// this.formData.matterName = text; return this.matterKeys.some((val) => val == v.id);
}, });
// 事项搜索
filterOption(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
// 关闭添加窗口 // 关闭添加窗口
handleClose() { handleClose() {
...@@ -501,10 +458,10 @@ export default { ...@@ -501,10 +458,10 @@ export default {
async handleEdit(data) { async handleEdit(data) {
data.isEdit = !data.isEdit; data.isEdit = !data.isEdit;
if (!data.isEdit) { if (!data.isEdit) {
let res = await saveWindowmatter(data); let res = await saveWindowbatch([data]);
let { code, msg } = res.data; let { code } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success("修改成功");
this.getWindowmatterData(); this.getWindowmatterData();
} else { } else {
this.getWindowmatterData(); this.getWindowmatterData();
......
<template>
<!-- 关联业务 -->
<div>
<a-modal
title="关联业务"
:visible="Visible"
@cancel="handleClose"
width="600px"
:maskClosable="false"
destroyOnClose
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button :loading="btnLoading" type="primary" @click="handleWork"
>确定</a-button
>
</template>
<div class="main">
<div class="mb20">
<span>窗口名称:</span>
<span style="color: #0595fd"
>{{ formData.windowName }}-{{ formData.fromnum }}</span
>
</div>
<div class="business-search">
<div>
已关联
<span style="color: #0595fd"> ({{ rowKeys.length }}) </span>
条业务
</div>
<a-input-search
style="width: 300px"
placeholder="请输入业务名称搜索"
enter-button="搜索"
v-model="businessName"
@search="onSearch"
allowClear
/>
</div>
<a-table
bordered
ref="tableList"
:loading="loading"
:scroll="{ y: 400 }"
size="small"
:expandIconColumnIndex="2"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
defaultPageSize: 10000,
current: page,
total: total,
size: 'small',
onChange: changePage,
}"
:columns="columns"
:data-source="siteBusinessList"
:rowKey="(record) => record.id"
:row-selection="{
selectedRowKeys: rowKeys,
onChange: handleChange,
onSelect: onSelectRow,
}"
>
<template
v-if="record.parentId === 0"
slot="num"
slot-scope="text, record, index"
>
<span>
{{ index + 1 }}
</span>
</template>
</a-table>
</div>
</a-modal>
</div>
</template>
<script>
import { getSiteBusinessList } from "@/services/business";
import { addBusinessToWindow } from "@/services/dept";
import { extractTree } from "@/utils/util";
import local from "@/utils/local";
const columns = [
{
title: "序号",
width: "50px",
scopedSlots: { customRender: "num" },
},
{
title: "业务名称",
align: "left",
dataIndex: "businessName",
},
];
export default {
props: {
visibleWork: {
type: Boolean,
required: true,
default: false,
},
},
data() {
return {
columns,
siteId: local.getLocal("siteId"), // 站点id
loading: false,
btnLoading: false,
size: -1,
page: 1,
total: 0,
siteBusinessList: [], // 站点业务列表
businessName: "",
rowKeys: [],
formData: {
windowId: "", // 窗口id
windowName: "", // 窗口名称
siteBusinessId: "", // 业务id
},
};
},
computed: {
Visible: {
get() {
return this.visibleWork;
},
set(val) {
this.$emit("update:visibleWork", val);
},
},
},
created() {
this.getSiteBusinessList();
},
methods: {
// 获取窗口信息
getWindowInfo(info) {
this.formData = info;
if (info.businessIds.length) {
let arr = extractTree(this.siteBusinessList, "children").map((v) =>
Number(v.id)
);
this.rowKeys = arr.filter((v) => {
return info.businessIds.some((val) => v == val);
});
} else {
this.rowKeys = [];
}
},
// 去掉空children
delChildren(arr) {
return arr.map((v) => {
if (v.children && v.children.length > 0) {
this.delChildren(v.children);
} else {
delete v.children;
}
return v;
});
},
// 获取站点业务列表
async getSiteBusinessList() {
this.loading = true;
let res = await getSiteBusinessList({
page: this.page,
size: this.size,
siteId: this.siteId,
businessName: `%${this.businessName}%`,
});
this.loading = false;
if (res.data.code === 1) {
let { data, total } = res.data.data;
this.total = total;
this.siteBusinessList = this.delChildren(data);
}
},
// 搜索
onSearch() {
this.page = 1;
this.getSiteBusinessList();
},
handleClose() {
this.matterKeys = [];
this.Visible = false;
},
// 选中
handleChange(keys) {
this.rowKeys = keys;
},
changePage() {},
onSelectRow(record, selected) {
if (selected && record.children.length) {
record.children.forEach((v) => {
this.rowKeys.push(v.id);
});
} else {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
}
},
// 保存窗口关联业务
async handleWork() {
this.btnLoading = true;
let res = await addBusinessToWindow({
...this.formData,
businessIds: this.rowKeys.join(","),
});
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.Visible = false;
}
this.btnLoading = false;
},
// 重置
handleReset() {
this.rowKeys = [];
},
},
};
</script>
<style lang="less" scoped>
.business-search {
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
\ No newline at end of file
...@@ -295,8 +295,8 @@ export default { ...@@ -295,8 +295,8 @@ export default {
}); });
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$parent.getWindowListData();
this.$message.success(msg); this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose(); this.handleClose();
} }
} }
......
...@@ -58,8 +58,12 @@ ...@@ -58,8 +58,12 @@
</div> </div>
</div> </div>
<div> <div>
<div class="department_span">简称:{{ v.deptAbb }}</div> <div class="department_span">
<div>联系电话:{{ v.deptTelphone }}</div> 简称:{{ v.deptAbb ? v.deptAbb : "--" }}
</div>
<div>
联系电话:{{ v.deptTelphone ? v.deptTelphone : "--" }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -147,66 +151,6 @@ ...@@ -147,66 +151,6 @@
</a-table> </a-table>
</div> </div>
</div> </div>
<!-- 关联业务 -->
<div>
<a-modal
title="关联业务"
:visible="visibleWork"
@cancel="visibleWork = false"
width="600px"
:maskClosable="false"
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleWork">确定</a-button>
</template>
<a-form-model
:model="formData"
ref="formData"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item
label="窗口名称"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 16 }"
>
<span style="color: #0595fd">{{ formData.windowName }}</span>
</a-form-model-item>
<!-- <a-form-model-item label="是否关联">
<a-switch v-model="isRelevancy" />
</a-form-model-item> -->
<a-form-model-item
class="business-list"
label="业务列表"
prop="businessIds"
>
<a-checkbox-group
v-if="business.length > 0"
v-model="formData.businessIds"
>
<a-checkbox
v-for="v in business"
:key="v.id"
:value="v.businessId"
>{{ v.businessName }}</a-checkbox
>
</a-checkbox-group>
<a-empty v-else :image="simpleImage" />
</a-form-model-item>
</a-form-model>
<!-- <div style="text-align: right">
<a-pagination
simple
:current="businessPage"
:total="businessTotal"
@change="changeBusinessPage"
/>
</div> -->
</a-modal>
</div>
</div> </div>
<!-- 部门管理弹窗 --> <!-- 部门管理弹窗 -->
<adddepartment <adddepartment
...@@ -221,7 +165,14 @@ ...@@ -221,7 +165,14 @@
ref="addwindow" ref="addwindow"
:deptList="department" :deptList="department"
:WindowTitle="WindowTitle" :WindowTitle="WindowTitle"
@addSuccess="getWindowListData"
></addwindow> ></addwindow>
<!-- 关联窗口 -->
<addWindowBusiness
ref="addWindowBusiness"
:visibleWork.sync="visibleWork"
@addSuccess="getWindowListData"
></addWindowBusiness>
</div> </div>
</template> </template>
...@@ -229,14 +180,13 @@ ...@@ -229,14 +180,13 @@
import { Empty } from "ant-design-vue"; import { Empty } from "ant-design-vue";
import adddepartment from "./components/adddepartment.vue"; import adddepartment from "./components/adddepartment.vue";
import addwindow from "./components/addwindow.vue"; import addwindow from "./components/addwindow.vue";
import { getSiteBusinessList } from "@/services/business"; import addWindowBusiness from "./components/addWindowBusiness.vue";
import local from "@/utils/local"; import local from "@/utils/local";
import { import {
getDeptList, getDeptList,
delDept, delDept,
getWindowList, getWindowList,
delWindow, delWindow,
addBusinessToWindow,
} from "@/services/dept"; } from "@/services/dept";
const columns = [ const columns = [
...@@ -309,6 +259,7 @@ export default { ...@@ -309,6 +259,7 @@ export default {
components: { components: {
adddepartment, adddepartment,
addwindow, addwindow,
addWindowBusiness,
}, },
data() { data() {
return { return {
...@@ -324,12 +275,6 @@ export default { ...@@ -324,12 +275,6 @@ export default {
deptId: "", // 部门搜索窗口 deptId: "", // 部门搜索窗口
active: undefined, // 部门激活 active: undefined, // 部门激活
// isRelevancy: false, // isRelevancy: false,
formData: {
// 关联表单
windowId: "",
businessIds: [],
windowName: "",
},
columns, columns,
formVisible: false, formVisible: false,
visibleWork: false, visibleWork: false,
...@@ -384,7 +329,6 @@ export default { ...@@ -384,7 +329,6 @@ export default {
if (!this.$route.meta.isBack) { if (!this.$route.meta.isBack) {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.getDeptListData(); this.getDeptListData();
this.getBusinessData();
this.getWindowListData(); this.getWindowListData();
} else { } else {
this.$route.meta.isBack = false; this.$route.meta.isBack = false;
...@@ -420,29 +364,24 @@ export default { ...@@ -420,29 +364,24 @@ export default {
} }
}, },
// 获取站点业务数据 // 获取站点业务数据
async getBusinessData(obj = {}) { // async getBusinessData(obj = {}) {
let res = await getSiteBusinessList({ // let res = await getSiteBusinessList({
page: 1, // page: 1,
size: -1, // size: -1,
siteId: this.siteId, // siteId: this.siteId,
...obj, // ...obj,
}); // });
let { data } = res.data.data; // let { data } = res.data.data;
this.business = data // this.business = data
.map((v) => { // .map((v) => {
if (v.children && v.children.length) { // if (v.children && v.children.length) {
return v.children; // return v.children;
} else { // } else {
return v; // return v;
} // }
}) // })
.flat(); // .flat();
this.business = this.delChildren(this.business); // this.business = this.delChildren(this.business);
},
// 关联业务翻页
// changeBusinessPage(cur) {
// this.businessPage = cur;
// this.getBusinessData();
// }, // },
// 新增部门 // 新增部门
showModalAdd() { showModalAdd() {
...@@ -578,35 +517,20 @@ export default { ...@@ -578,35 +517,20 @@ export default {
}, },
// 窗口业务 // 窗口业务
workModal(data) { workModal(data) {
this.formData.windowName = data.name; let obj = {
this.formData.windowId = data.id; windowName: data.name,
windowId: data.id,
fromnum: data.fromnum,
};
if (data.windowBusinessList) { if (data.windowBusinessList) {
this.formData.businessIds = data.windowBusinessList.map( obj.businessIds = data.windowBusinessList.map((v) => v.siteBusinessId);
(v) => v.siteBusinessId
);
} else { } else {
this.formData.businessIds = []; obj.businessIds = [];
} }
this.visibleWork = true; this.visibleWork = true;
this.$refs.addWindowBusiness.getWindowInfo(obj);
}, },
// 保存窗口关联业务
handleWork() {
this.$refs.formData.validate(async (valid) => {
if (valid) {
let res = await addBusinessToWindow({
...this.formData,
businessIds: this.formData.businessIds.join(","),
});
let { code, msg } = res.data;
if (code === 1) {
this.getWindowListData();
this.$message.success(msg);
this.$refs.formData.resetFields();
this.visibleWork = false;
}
}
});
},
// 重置业务窗口 // 重置业务窗口
handleReset() { handleReset() {
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
......
...@@ -331,6 +331,7 @@ export default { ...@@ -331,6 +331,7 @@ export default {
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
loading: false, loading: false,
previewData: {}, // 预览logo信息 previewData: {}, // 预览logo信息
...@@ -615,7 +616,7 @@ export default { ...@@ -615,7 +616,7 @@ export default {
uid: -1, uid: -1,
status: "done", status: "done",
name: this.formInfo.logoPath, name: this.formInfo.logoPath,
url: this.api + this.formInfo.logoPath, url: this.api2 + this.formInfo.logoPath,
url2: this.formInfo.logoPath, url2: this.formInfo.logoPath,
}, },
]; ];
...@@ -665,7 +666,7 @@ export default { ...@@ -665,7 +666,7 @@ export default {
this.fileList = this.fileList.map((v) => { this.fileList = this.fileList.map((v) => {
if (v.response) { if (v.response) {
v.url2 = v.response.url; v.url2 = v.response.url;
v.url = this.api + v.response.url; v.url = this.api2 + v.response.url;
} }
return v; return v;
}); });
...@@ -714,10 +715,8 @@ export default { ...@@ -714,10 +715,8 @@ export default {
}) })
.then((res) => { .then((res) => {
let { location } = res.geocodes[0]; let { location } = res.geocodes[0];
[ [this.formInfo.longitude, this.formInfo.latitude] =
this.formInfo.longitude, location.split(",");
this.formInfo.latitude,
] = location.split(",");
}) })
.catch(() => { .catch(() => {
this.$message.error("经纬度获取失败,请输入正确的地址"); this.$message.error("经纬度获取失败,请输入正确的地址");
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -174,7 +174,7 @@ export default { ...@@ -174,7 +174,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
......
...@@ -206,9 +206,7 @@ ...@@ -206,9 +206,7 @@
> >
<div v-if="fileList.length < 1"> <div v-if="fileList.length < 1">
<a-icon type="plus" /> <a-icon type="plus" />
<div class="ant-upload-text"> <div class="ant-upload-text">添加照片</div>
添加照片
</div>
</div> </div>
</a-upload> </a-upload>
<!-- <a-upload <!-- <a-upload
...@@ -389,6 +387,7 @@ export default { ...@@ -389,6 +387,7 @@ export default {
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览 previewData: {}, // 预览
previewVisible: false, previewVisible: false,
...@@ -521,7 +520,7 @@ export default { ...@@ -521,7 +520,7 @@ export default {
uid: -1, uid: -1,
status: "done", status: "done",
name: this.form.photoPath, name: this.form.photoPath,
url: this.api + this.form.photoPath, url: this.api2 + this.form.photoPath,
url2: this.form.photoPath, url2: this.form.photoPath,
}, },
]; ];
...@@ -544,7 +543,7 @@ export default { ...@@ -544,7 +543,7 @@ export default {
this.fileList = this.fileList.map((v) => { this.fileList = this.fileList.map((v) => {
if (v.response) { if (v.response) {
v.url2 = v.response.url; v.url2 = v.response.url;
v.url = this.api + v.response.url; v.url = this.api2 + v.response.url;
} }
return v; return v;
}); });
......
...@@ -212,9 +212,7 @@ ...@@ -212,9 +212,7 @@
> >
<div v-if="fileList.length < 1"> <div v-if="fileList.length < 1">
<a-icon type="plus" /> <a-icon type="plus" />
<div class="ant-upload-text"> <div class="ant-upload-text">添加照片</div>
添加照片
</div>
</div> </div>
<!-- <img <!-- <img
v-if="form.photoPath" v-if="form.photoPath"
...@@ -429,6 +427,7 @@ export default { ...@@ -429,6 +427,7 @@ export default {
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览 previewData: {}, // 预览
previewVisible: false, previewVisible: false,
...@@ -575,7 +574,7 @@ export default { ...@@ -575,7 +574,7 @@ export default {
uid: -1, uid: -1,
status: "done", status: "done",
name: this.form.photoPath, name: this.form.photoPath,
url: this.api + this.form.photoPath, url: this.api2 + this.form.photoPath,
url2: this.form.photoPath, url2: this.form.photoPath,
}, },
]; ];
...@@ -594,7 +593,7 @@ export default { ...@@ -594,7 +593,7 @@ export default {
this.fileList = this.fileList.map((v) => { this.fileList = this.fileList.map((v) => {
if (v.response) { if (v.response) {
v.url2 = v.response.url; v.url2 = v.response.url;
v.url = this.api + v.response.url; v.url = this.api2 + v.response.url;
} }
return v; return v;
}); });
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<template slot="pic" slot-scope="text"> <template slot="pic" slot-scope="text">
<img <img
v-if="text.photoPath" v-if="text.photoPath"
:src="api + text.photoPath" :src="api2 + text.photoPath"
class="pht" class="pht"
/> />
<span v-else>--</span> <span v-else>--</span>
...@@ -386,6 +386,7 @@ export default { ...@@ -386,6 +386,7 @@ export default {
visibleEditPwd: false, visibleEditPwd: false,
editVisible: false, editVisible: false,
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
deptData: [], // 部门数据 deptData: [], // 部门数据
windowData: [], // 窗口数据 windowData: [], // 窗口数据
......
...@@ -206,6 +206,7 @@ module.exports = { ...@@ -206,6 +206,7 @@ module.exports = {
info: `${BASE_URL}/base/window/matter/info`, info: `${BASE_URL}/base/window/matter/info`,
save: `${BASE_URL}/base/window/matter/save`, save: `${BASE_URL}/base/window/matter/save`,
delete: `${BASE_URL}/base/window/matter/delete`, delete: `${BASE_URL}/base/window/matter/delete`,
batchSave: `${BASE_URL}/base/window/matter/batchSave`,
}, },
// 短信设置 // 短信设置
smsset: { smsset: {
......
...@@ -109,6 +109,10 @@ export function uploadAllImg(data) { ...@@ -109,6 +109,10 @@ export function uploadAllImg(data) {
export async function saveWindowmatter(data) { export async function saveWindowmatter(data) {
return request(windowmatter.save, METHOD.POST, data); return request(windowmatter.save, METHOD.POST, data);
} }
// 批量保存窗口事项
export async function saveWindowbatch(data) {
return request(windowmatter.batchSave, METHOD.POST, data);
}
// 获取窗口事项列表 // 获取窗口事项列表
export async function getWindowmatterList(data) { export async function getWindowmatterList(data) {
return request(windowmatter.list, METHOD.POST, data); return request(windowmatter.list, METHOD.POST, data);
......
import enquireJs from 'enquire.js' import enquireJs from "enquire.js";
export function isDef (v){ export function isDef(v) {
return v !== undefined && v !== null return v !== undefined && v !== null;
} }
/** /**
* Remove an item from an array. * Remove an item from an array.
*/ */
export function remove (arr, item) { export function remove(arr, item) {
if (arr.length) { if (arr.length) {
const index = arr.indexOf(item) const index = arr.indexOf(item);
if (index > -1) { if (index > -1) {
return arr.splice(index, 1) return arr.splice(index, 1);
} }
} }
} }
export function isRegExp (v) { export function isRegExp(v) {
return _toString.call(v) === '[object RegExp]' return _toString.call(v) === "[object RegExp]";
} }
export function enquireScreen(call) { export function enquireScreen(call) {
const handler = { const handler = {
match: function () { match: function() {
call && call(true) call && call(true);
}, },
unmatch: function () { unmatch: function() {
call && call(false) call && call(false);
} },
} };
enquireJs.register('only screen and (max-width: 767.99px)', handler) enquireJs.register("only screen and (max-width: 767.99px)", handler);
} }
const _toString = Object.prototype.toString const _toString = Object.prototype.toString;
// 扁平化树形结构
export const extractTree = (arrs, childs, attrArr) => {
let attrList = [];
if (!Array.isArray(arrs) && !arrs.length) return [];
if (typeof childs !== "string") return [];
if (!Array.isArray(attrArr) || (Array.isArray(attrArr) && !attrArr.length)) {
attrList = Object.keys(arrs[0]);
attrList.splice(attrList.indexOf(childs), 1);
attrList.splice(attrList.indexOf("isLeaf"), 1);
} else {
attrList = attrArr;
}
let list = [];
const getObj = (arr) => {
arr.forEach(function(row) {
let obj = {};
attrList.forEach((item) => {
obj[item] = row[item];
});
list.push(obj);
if (row[childs]) {
getObj(row[childs]);
}
});
return list;
};
return getObj(arrs);
};
...@@ -14,9 +14,10 @@ if (!isDev) { ...@@ -14,9 +14,10 @@ if (!isDev) {
new FileManagerPlugin({ new FileManagerPlugin({
events: { events: {
onEnd: { onEnd: {
mkdir: ["./dist"], // mkdir: ["./dist"],
delete: ["./dist.zip"], delete: ["./zip/"],
archive: [{ source: "./dist", destination: "./dist.zip" }], copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/基础设置系统.zip" }],
}, },
}, },
}) })
...@@ -51,7 +52,6 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") ...@@ -51,7 +52,6 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin; .BundleAnalyzerPlugin;
module.exports = { module.exports = {
publicPath: "./", publicPath: "./",
// 打包目录--多加一层dist打zip时候把dist外壳打进去
outputDir: "dist", outputDir: "dist",
devServer: { devServer: {
disableHostCheck: true, disableHostCheck: true,
......
...@@ -3,6 +3,7 @@ node_modules ...@@ -3,6 +3,7 @@ node_modules
/dist /dist
dist.zip dist.zip
门户系统.zip 门户系统.zip
/zip
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
......
...@@ -8,9 +8,10 @@ if (!isDev) { ...@@ -8,9 +8,10 @@ if (!isDev) {
new FileManagerPlugin({ new FileManagerPlugin({
events: { events: {
onEnd: { onEnd: {
mkdir: ["./dist"], // mkdir: ["./dist"],
delete: ["./门户系统.zip"], delete: ["./门户系统.zip", "./zip/"],
archive: [{ source: "./dist", destination: "./门户系统.zip" }], copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/门户系统.zip" }],
}, },
}, },
}) })
...@@ -19,7 +20,7 @@ if (!isDev) { ...@@ -19,7 +20,7 @@ if (!isDev) {
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
lintOnSave: false, lintOnSave: false,
// 打包目录--多加一层dist打zip时候把dist外壳打进去 // 打包目录
outputDir: "dist", outputDir: "dist",
configureWebpack: { configureWebpack: {
plugins: [...plugins], plugins: [...plugins],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment