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

Merge remote-tracking branch 'origin/master'

parents 4aea065c 25be7be9
#开发环境
NODE_ENV = "development"
#VUE_APP_API_BASE_URL=http://192.168.0.98:11078
VUE_APP_API_BASE_URL=http://10.12.185.213:11071
\ No newline at end of file
VUE_APP_API_BASE_URL=http://192.168.0.98:11078
VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
#VUE_APP_API_BASE_URL=http://10.12.185.213:11071
\ No newline at end of file
......@@ -3,3 +3,4 @@ NODE_ENV = production
VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_portal_URL=/portal_home
VUE_APP_API_IMG_URL =
#测试环境
NODE_ENV = "test"
VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_portal_URL=/portal_home
\ No newline at end of file
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*
/test/e2e/reports/
selenium-debug.log
dist.zip
基础设置系统.zip
zip/
# Editor directories and files
.idea
.vscode
......
......@@ -15,7 +15,7 @@ export default {
data() {
return {
previewInfo: this.$route.query,
previewUrl: "http://192.168.0.192:8082",
previewUrl: "",
loading: true,
};
},
......
......@@ -66,8 +66,8 @@
<img
v-if="text.img"
width="50"
:src="api + text.img"
@click="handlePreview('img', api + text.img)"
:src="api2 + text.img"
@click="handlePreview('img', api2 + text.img)"
/>
<span v-else>--</span>
</template>
......@@ -76,8 +76,8 @@
<video
v-if="text.video"
width="50"
:src="api + text.video"
@click="handlePreview('vidoe', api + text.video)"
:src="api2 + text.video"
@click="handlePreview('vidoe', api2 + text.video)"
/>
<span v-else>--</span>
</template>
......@@ -128,6 +128,7 @@ export default {
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
appId: this.$route.query.id,
loading: false,
current: 1,
......
......@@ -49,7 +49,7 @@
v-if="text.appIconPath"
height="20"
width="20"
:src="api + text.appIconPath"
:src="api2 + text.appIconPath"
/>
<span v-else>--</span>
</template>
......@@ -172,6 +172,7 @@ export default {
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
columns,
siteId: local.getLocal("siteId"),
tableData: [], // 表格数据
......
......@@ -41,7 +41,7 @@
<img
class="icon"
v-if="form.appIconPath"
:src="api + form.appIconPath"
:src="api2 + form.appIconPath"
/>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
......@@ -173,6 +173,7 @@ export default {
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
labelCol: {
span: 3,
},
......@@ -273,7 +274,7 @@ export default {
}
});
},
// 图标删除之前
// 图标上传之前
iconBeforeUpload(file) {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
......@@ -293,7 +294,6 @@ export default {
return;
}
if (info.file.status === "done") {
console.log(info);
this.form.appIconPath = info.file.response.url;
this.loading = false;
}
......
......@@ -84,6 +84,7 @@
<a-table
bordered
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: rightCurrent,
total: rightTotal,
pageSize: rightSize,
......
......@@ -54,11 +54,11 @@
<!-- 模块图标 -->
<template slot="modelIcon" slot-scope="text">
<div v-if="text.modelIcon">
<div class="svg-box" v-if="isSvg(text.modelIcon)">
<img width="30" height="30" :src="api + text.modelIcon" />
</div>
<div class="svg-box" v-else>
<img width="30" height="30" :src="api + text.modelIcon" />
<!-- <div class="svg-box" v-if="isSvg(text.modelIcon)">
<img width="30" height="30" :src="api2 + text.modelIcon" />
</div> -->
<div class="svg-box">
<img width="30" height="30" :src="api2 + text.modelIcon" />
</div>
</div>
<span v-else>--</span>
......@@ -161,9 +161,7 @@
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">
点击上传
</div>
<div class="ant-upload-text">点击上传</div>
</div>
</a-upload>
......@@ -275,6 +273,7 @@ export default {
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png,image/svg+xml", // 上传类型
previewData: {}, // 预览
previewVisible: false,
......@@ -370,7 +369,7 @@ export default {
uid: -1,
status: "done",
name: this.formData.modelIcon,
url: this.api + this.formData.modelIcon,
url: this.api2 + this.formData.modelIcon,
url2: this.formData.modelIcon,
},
];
......@@ -438,7 +437,7 @@ export default {
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url2 = v.response.url;
v.url = this.api + v.response.url;
v.url = this.api2 + v.response.url;
}
return v;
});
......@@ -477,15 +476,15 @@ export default {
this.handleReset();
},
// 图片类型
isSvg(url) {
let index = url.lastIndexOf(".");
let str = url.slice(index + 1);
if (str === "svg") {
return true;
} else {
return false;
}
},
// isSvg(url) {
// let index = url.lastIndexOf(".");
// let str = url.slice(index + 1);
// if (str === "svg") {
// return true;
// } else {
// return false;
// }
// },
},
};
</script>
......
......@@ -110,12 +110,8 @@
class="select-department"
placeholder="事项来源"
>
<a-select-option :value="0">
一体化添加
</a-select-option>
<a-select-option :value="1">
手动添加
</a-select-option>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
</a-select>
<a-input-search
style="width: 300px"
......@@ -145,7 +141,6 @@
:data-source="siteMatterData"
:rowKey="(record) => record.id"
:row-selection="{
type: 'radio',
selectedRowKeys: matterKeys,
onChange: handleChange,
}"
......@@ -162,39 +157,6 @@
</template>
</a-table>
</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>
</div>
</template>
......@@ -202,7 +164,7 @@
<script>
import { getSiteMatterList } from "@/services/matter";
import {
saveWindowmatter,
saveWindowbatch,
getWindowmatterList,
delWindowmatter,
getWindowInfo,
......@@ -224,6 +186,7 @@ const leftColumns = [
{
title: "事项名称",
dataIndex: "matterName",
ellipsis: true,
},
{
title: "排序",
......@@ -403,19 +366,20 @@ export default {
},
// 保存
async handleOk() {
if (this.matterKeys.length) {
let obj = {
windowId: this.windowInfo.id,
windowName: this.windowInfo.name,
siteMatterId: this.matterKeys.join(","),
matterName: this.matterRows[0].matterName,
deptId: this.matterRows[0].deptId,
deptName: this.matterRows[0].deptName,
};
let res = await saveWindowmatter({
...this.formData,
...obj,
if (this.matterRows.length) {
let arr = this.matterRows.map((v) => {
return {
windowId: this.windowInfo.id,
windowName: this.windowInfo.name,
siteMatterId: v.id,
matterName: v.matterName,
deptId: v.deptId,
deptName: v.deptName,
isShow: 1,
sort: 99,
};
});
let res = await saveWindowbatch(arr);
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
......@@ -440,17 +404,10 @@ export default {
// 事项选择选择
handleChange(keys, rows) {
this.matterKeys = keys;
this.matterRows = rows;
// let { text } = event.componentOptions.children[0];
// this.formData.matterName = text;
},
// 事项搜索
filterOption(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
this.matterRows = [...new Set([...this.matterRows, ...rows])];
this.matterRows = this.matterRows.filter((v) => {
return this.matterKeys.some((val) => val == v.id);
});
},
// 关闭添加窗口
handleClose() {
......@@ -501,10 +458,10 @@ export default {
async handleEdit(data) {
data.isEdit = !data.isEdit;
if (!data.isEdit) {
let res = await saveWindowmatter(data);
let { code, msg } = res.data;
let res = await saveWindowbatch([data]);
let { code } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$message.success("修改成功");
this.getWindowmatterData();
} else {
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 {
});
let { code, msg } = res.data;
if (code === 1) {
this.$parent.getWindowListData();
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
......
......@@ -58,8 +58,12 @@
</div>
</div>
<div>
<div class="department_span">简称:{{ v.deptAbb }}</div>
<div>联系电话:{{ v.deptTelphone }}</div>
<div class="department_span">
简称:{{ v.deptAbb ? v.deptAbb : "--" }}
</div>
<div>
联系电话:{{ v.deptTelphone ? v.deptTelphone : "--" }}
</div>
</div>
</div>
</div>
......@@ -147,66 +151,6 @@
</a-table>
</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>
<!-- 部门管理弹窗 -->
<adddepartment
......@@ -221,7 +165,14 @@
ref="addwindow"
:deptList="department"
:WindowTitle="WindowTitle"
@addSuccess="getWindowListData"
></addwindow>
<!-- 关联窗口 -->
<addWindowBusiness
ref="addWindowBusiness"
:visibleWork.sync="visibleWork"
@addSuccess="getWindowListData"
></addWindowBusiness>
</div>
</template>
......@@ -229,14 +180,13 @@
import { Empty } from "ant-design-vue";
import adddepartment from "./components/adddepartment.vue";
import addwindow from "./components/addwindow.vue";
import { getSiteBusinessList } from "@/services/business";
import addWindowBusiness from "./components/addWindowBusiness.vue";
import local from "@/utils/local";
import {
getDeptList,
delDept,
getWindowList,
delWindow,
addBusinessToWindow,
} from "@/services/dept";
const columns = [
......@@ -309,6 +259,7 @@ export default {
components: {
adddepartment,
addwindow,
addWindowBusiness,
},
data() {
return {
......@@ -324,12 +275,6 @@ export default {
deptId: "", // 部门搜索窗口
active: undefined, // 部门激活
// isRelevancy: false,
formData: {
// 关联表单
windowId: "",
businessIds: [],
windowName: "",
},
columns,
formVisible: false,
visibleWork: false,
......@@ -384,7 +329,6 @@ export default {
if (!this.$route.meta.isBack) {
Object.assign(this.$data, this.$options.data());
this.getDeptListData();
this.getBusinessData();
this.getWindowListData();
} else {
this.$route.meta.isBack = false;
......@@ -420,29 +364,24 @@ export default {
}
},
// 获取站点业务数据
async getBusinessData(obj = {}) {
let res = await getSiteBusinessList({
page: 1,
size: -1,
siteId: this.siteId,
...obj,
});
let { data } = res.data.data;
this.business = data
.map((v) => {
if (v.children && v.children.length) {
return v.children;
} else {
return v;
}
})
.flat();
this.business = this.delChildren(this.business);
},
// 关联业务翻页
// changeBusinessPage(cur) {
// this.businessPage = cur;
// this.getBusinessData();
// async getBusinessData(obj = {}) {
// let res = await getSiteBusinessList({
// page: 1,
// size: -1,
// siteId: this.siteId,
// ...obj,
// });
// let { data } = res.data.data;
// this.business = data
// .map((v) => {
// if (v.children && v.children.length) {
// return v.children;
// } else {
// return v;
// }
// })
// .flat();
// this.business = this.delChildren(this.business);
// },
// 新增部门
showModalAdd() {
......@@ -578,35 +517,20 @@ export default {
},
// 窗口业务
workModal(data) {
this.formData.windowName = data.name;
this.formData.windowId = data.id;
let obj = {
windowName: data.name,
windowId: data.id,
fromnum: data.fromnum,
};
if (data.windowBusinessList) {
this.formData.businessIds = data.windowBusinessList.map(
(v) => v.siteBusinessId
);
obj.businessIds = data.windowBusinessList.map((v) => v.siteBusinessId);
} else {
this.formData.businessIds = [];
obj.businessIds = [];
}
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() {
this.$refs.formData.resetFields();
......
......@@ -331,6 +331,7 @@ export default {
};
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型
loading: false,
previewData: {}, // 预览logo信息
......@@ -615,7 +616,7 @@ export default {
uid: -1,
status: "done",
name: this.formInfo.logoPath,
url: this.api + this.formInfo.logoPath,
url: this.api2 + this.formInfo.logoPath,
url2: this.formInfo.logoPath,
},
];
......@@ -665,7 +666,7 @@ export default {
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url2 = v.response.url;
v.url = this.api + v.response.url;
v.url = this.api2 + v.response.url;
}
return v;
});
......@@ -714,10 +715,8 @@ export default {
})
.then((res) => {
let { location } = res.geocodes[0];
[
this.formInfo.longitude,
this.formInfo.latitude,
] = location.split(",");
[this.formInfo.longitude, this.formInfo.latitude] =
location.split(",");
})
.catch(() => {
this.$message.error("经纬度获取失败,请输入正确的地址");
......
......@@ -132,7 +132,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -158,7 +158,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -192,7 +192,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -121,7 +121,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -174,7 +174,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -147,7 +147,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -91,7 +91,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -186,7 +186,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
......
......@@ -206,9 +206,7 @@
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">
添加照片
</div>
<div class="ant-upload-text">添加照片</div>
</div>
</a-upload>
<!-- <a-upload
......@@ -389,6 +387,7 @@ export default {
};
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览
previewVisible: false,
......@@ -521,7 +520,7 @@ export default {
uid: -1,
status: "done",
name: this.form.photoPath,
url: this.api + this.form.photoPath,
url: this.api2 + this.form.photoPath,
url2: this.form.photoPath,
},
];
......@@ -544,7 +543,7 @@ export default {
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url2 = v.response.url;
v.url = this.api + v.response.url;
v.url = this.api2 + v.response.url;
}
return v;
});
......
......@@ -212,9 +212,7 @@
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">
添加照片
</div>
<div class="ant-upload-text">添加照片</div>
</div>
<!-- <img
v-if="form.photoPath"
......@@ -429,6 +427,7 @@ export default {
};
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览
previewVisible: false,
......@@ -575,7 +574,7 @@ export default {
uid: -1,
status: "done",
name: this.form.photoPath,
url: this.api + this.form.photoPath,
url: this.api2 + this.form.photoPath,
url2: this.form.photoPath,
},
];
......@@ -594,7 +593,7 @@ export default {
this.fileList = this.fileList.map((v) => {
if (v.response) {
v.url2 = v.response.url;
v.url = this.api + v.response.url;
v.url = this.api2 + v.response.url;
}
return v;
});
......
......@@ -213,7 +213,7 @@
<template slot="pic" slot-scope="text">
<img
v-if="text.photoPath"
:src="api + text.photoPath"
:src="api2 + text.photoPath"
class="pht"
/>
<span v-else>--</span>
......@@ -386,6 +386,7 @@ export default {
visibleEditPwd: false,
editVisible: false,
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
siteId: local.getLocal("siteId"),
deptData: [], // 部门数据
windowData: [], // 窗口数据
......
......@@ -206,6 +206,7 @@ module.exports = {
info: `${BASE_URL}/base/window/matter/info`,
save: `${BASE_URL}/base/window/matter/save`,
delete: `${BASE_URL}/base/window/matter/delete`,
batchSave: `${BASE_URL}/base/window/matter/batchSave`,
},
// 短信设置
smsset: {
......
......@@ -109,6 +109,10 @@ export function uploadAllImg(data) {
export async function saveWindowmatter(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) {
return request(windowmatter.list, METHOD.POST, data);
......
import enquireJs from 'enquire.js'
import enquireJs from "enquire.js";
export function isDef (v){
return v !== undefined && v !== null
export function isDef(v) {
return v !== undefined && v !== null;
}
/**
* Remove an item from an array.
*/
export function remove (arr, item) {
export function remove(arr, item) {
if (arr.length) {
const index = arr.indexOf(item)
const index = arr.indexOf(item);
if (index > -1) {
return arr.splice(index, 1)
return arr.splice(index, 1);
}
}
}
export function isRegExp (v) {
return _toString.call(v) === '[object RegExp]'
export function isRegExp(v) {
return _toString.call(v) === "[object RegExp]";
}
export function enquireScreen(call) {
const handler = {
match: function () {
call && call(true)
match: function() {
call && call(true);
},
unmatch: function () {
call && call(false)
}
}
enquireJs.register('only screen and (max-width: 767.99px)', handler)
unmatch: function() {
call && call(false);
},
};
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) {
new FileManagerPlugin({
events: {
onEnd: {
mkdir: ["./dist"],
delete: ["./dist.zip"],
archive: [{ source: "./dist", destination: "./dist.zip" }],
// mkdir: ["./dist"],
delete: ["./zip/"],
copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/基础设置系统.zip" }],
},
},
})
......@@ -51,7 +52,6 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;
module.exports = {
publicPath: "./",
// 打包目录--多加一层dist打zip时候把dist外壳打进去
outputDir: "dist",
devServer: {
disableHostCheck: true,
......
......@@ -3,6 +3,7 @@ node_modules
/dist
dist.zip
门户系统.zip
/zip
# local env files
.env.local
.env.*.local
......
......@@ -8,9 +8,10 @@ if (!isDev) {
new FileManagerPlugin({
events: {
onEnd: {
mkdir: ["./dist"],
delete: ["./门户系统.zip"],
archive: [{ source: "./dist", destination: "./门户系统.zip" }],
// mkdir: ["./dist"],
delete: ["./门户系统.zip", "./zip/"],
copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/门户系统.zip" }],
},
},
})
......@@ -19,7 +20,7 @@ if (!isDev) {
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
// 打包目录--多加一层dist打zip时候把dist外壳打进去
// 打包目录
outputDir: "dist",
configureWebpack: {
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