Commit 5b615cc1 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 5cfa4350 696f712d
......@@ -69,7 +69,6 @@
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"fast-deep-equal": "^3.1.3",
"filemanager-webpack-plugin": "^8.0.0",
"gh-pages": "^3.1.0",
"js-export-excel": "^1.1.4",
"less-loader": "^6.1.1",
......
......@@ -129,8 +129,8 @@ export default {
.app-market {
width: 100%;
height: 100%;
padding: 15px;
.app-out-box {
padding: 0px 15px 15px 15px;
overflow-y: auto;
}
}
......
......@@ -23,7 +23,7 @@
}"
:loading="loading"
bordered
:scroll="{ y: 550 }"
:scroll="{ y: 580 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
......
......@@ -23,7 +23,7 @@
}"
:loading="loading"
bordered
:scroll="{ y: 550 }"
:scroll="{ y: 580 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
......
......@@ -8,16 +8,19 @@ rrent" <template>
<div>
<a-space>
<a-select
showSearch
style="min-width: 120px"
allowClear
v-model="dept"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
......
......@@ -15,6 +15,7 @@
v-model="searchValue"
allowClear
@search="onSearch"
@pressEnter="onSearch"
/>
</div>
</div>
......@@ -220,7 +221,7 @@
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-modal>
<!-- 表别管理 -->
<!-- 报表管理 -->
<StatementManage
ref="StatementManage"
:StatementVisible.sync="StatementVisible"
......
......@@ -120,6 +120,23 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 19 }"
label="窗口屏显示"
prop="nameDesc"
>
<a-input
v-model="form.nameDesc"
type="textarea"
allowClear
placeholder="请输入窗口屏显示名称"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item
......@@ -154,19 +171,8 @@
placeholder="请输入所属楼栋"
v-model.number="form.building"
>
<!-- <a-input-number
v-model="form.building"
style="width: 220px"
:min="1"
placeholder="请输入所属楼栋"
/> -->
<span slot="suffix"></span>
</a-input>
<!-- <a-select v-model="form.building" placeholder="请选择所属楼栋">
<a-select-option v-for="v in 10" :key="v" :value="v"
>{{ v }}栋</a-select-option
>
</a-select> -->
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -178,12 +184,6 @@
<a-input placeholder="请输入所属楼栋" v-model.number="form.level">
<span slot="suffix"></span>
</a-input>
<!-- <a-select v-model="form.level" placeholder="请选择所属楼层">
<a-select-option v-for="v in 10" :key="v" :value="v"
>{{ v }}层</a-select-option
>
</a-select> -->
</a-form-model-item>
</a-col>
</a-row>
......@@ -224,6 +224,8 @@ export default {
duty: "", // 无人值守
dutyContent: "", // 无人值守显示内容
dutyEnglish: "", // 无人值守显示英文内容
nameDesc: "", // 窗口屏显示名称
englishNameDesc: "", // 英文名称
},
rules: {
siteName: [
......@@ -233,15 +235,6 @@ export default {
{ required: true, message: "部门不能为空", trigger: "change" },
],
name: [{ required: true, message: "窗口名不能为空", trigger: "blur" }],
// englishName: [
// { required: true, message: "窗口英语名不能为空", trigger: "blur" },
// ],
// region: [
// { required: true, message: "窗口区域不能为空", trigger: "blur" },
// ],
// englishRegion: [
// { required: true, message: "窗口英语区域不能为空", trigger: "blur" },
// ],
fromnum: [
{ required: true, validator: changeWindowNumber, trigger: "blur" },
],
......
<template>
<div class="hall flex flexc">
<a-tabs :activeKey="activeKey" @change="changeRouter">
<a-tab-pane key="/hall/hallmanage" tab="大厅管理"> </a-tab-pane>
<a-tab-pane key="/hall/hallwindow" tab="大厅窗口管理"> </a-tab-pane>
</a-tabs>
<div class="hall-out-box flex1">
<router-view></router-view>
</div>
</div>
</template>
<script>
export default {
computed: {
activeKey() {
return this.$route.path;
},
},
methods: {
changeRouter(path) {
this.$router.push(path);
},
},
};
</script>
<style lang="less" scoped>
.hall {
width: 100%;
height: 100%;
.hall-out-box {
padding: 0px 15px 15px 15px;
overflow-y: auto;
}
/deep/.ant-tabs-nav-container {
border-bottom: 1px solid #f0f0f0 !important;
}
}
</style>
\ No newline at end of file
<template>
<div class="hall-manage">
<div class="control flex aic jcb mb20">
<a-space size="middle">
<a-button type="primary" @click="handleAdd">新增大厅</a-button>
<a-button type="danger" @click="handleDelAll">批量删除</a-button>
</a-space>
<div class="search-box">
<a-input-search
placeholder="请输入大厅名称名搜索"
enter-button="搜索"
v-model="searchValue"
allowClear
@pressEnter="onSearch"
@search="onSearch"
/>
</div>
</div>
<!-- 表格 -->
<div class="table-content">
<a-table
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 580 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="dataList"
:rowKey="(record) => record.id"
>
<!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{
(current - 1) * size + index + 1
}}</span>
<!-- 创建时间 -->
<template slot="createTime" slot-scope="text">
{{ text.createTime | dateFormat }}
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
<!-- 新增、修改大厅 -->
<AddHall
ref="AddHall"
:addHallVisile.sync="visible"
:title="title"
@addSuccess="getHallList"
></AddHall>
</div>
</template>
<script>
import { getHallList, delHall } from "@/services/hall";
import loacl from "@/utils/local";
import AddHall from "./modal/AddHall.vue";
export default {
components: {
AddHall,
},
data() {
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "大厅名称",
dataIndex: "hallName",
},
{
title: "地址",
dataIndex: "address",
},
{
title: "楼栋",
customRender: (text) => {
return text.build + "" || "--";
},
},
{
title: "楼层",
customRender: (text) => {
return text.floor + "" || "--";
},
},
{
title: "备注",
ellipsis: true,
customRender: (text) => {
return text.remark || "--";
},
},
{
title: "创建时间",
width: "12%",
scopedSlots: { customRender: "createTime" },
},
{
title: "操作",
width: "120px",
scopedSlots: { customRender: "action" },
},
];
return {
columns,
loading: false,
title: "新增大厅",
visible: false,
selectedRowKeys: [],
current: 1,
size: 10,
total: 0,
siteId: loacl.getLocal("siteId"),
pageSizeOptions: ["10", "30", "50", "100"],
searchValue: "", // 搜索
dataList: [],
};
},
created() {
this.getHallList();
},
methods: {
// 获取站点大厅列表
async getHallList() {
this.loading = true;
let res = await getHallList({
page: this.current,
size: this.size,
hallName: `%${this.searchValue}%`,
siteId: this.siteId,
});
if (res.data.code == 1) {
let { data, total } = res.data.data;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getHallList();
}
this.total = total;
this.dataList = data;
}
this.loading = false;
},
// 新增
handleAdd() {
this.title = "新增大厅";
this.$refs.AddHall.onAdd();
this.visible = true;
},
// 搜索
onSearch() {
this.current = 1;
this.selectedRowKeys = [];
this.getHallList();
},
// 勾选表格
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 编辑
handleEdit(row) {
this.title = "编辑大厅";
this.$refs.AddHall.onEdit(row);
this.visible = true;
},
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await delHall({ id });
let { code, msg } = res.data;
if (code == 1) {
_this.$message.success(msg);
_this.getHallList();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 翻页
handleChange(cur) {
this.current = cur;
this.getHallList();
},
// 改变每页显示数量
showSizeChange(cur, size) {
this.current = cur;
this.size = size;
this.getHallList();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<div>
<a-modal
v-model="Visible"
:maskClosable="false"
:title="title"
@cancel="handleClose"
destroyOnClose
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
ref="form"
:model="form"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="大厅名称" prop="hallName">
<a-input v-model="form.hallName" placeholder="请输入大厅名称" />
</a-form-model-item>
<a-form-model-item label="楼栋" prop="build">
<a-input-number v-model="form.build" :min="1" />
</a-form-model-item>
<a-form-model-item label="楼层" prop="floor">
<a-input-number v-model="form.floor" :min="1" />
</a-form-model-item>
<a-form-model-item label="地址" prop="address">
<a-textarea
:autoSize="{ minRows: 4, maxRows: 4 }"
placeholder="请输入地址"
allow-clear
v-model="form.address"
/>
</a-form-model-item>
<a-form-model-item label="备注" prop="remark">
<a-textarea
:autoSize="{ minRows: 4, maxRows: 4 }"
placeholder="请输入备注"
allow-clear
v-model="form.remark"
/>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import { saveHall } from "@/services/hall";
import loacl from "@/utils/local";
export default {
props: {
title: {
require: true,
type: String,
default: "",
},
addHallVisile: {
type: Boolean,
require: true,
default: false,
},
},
components: {},
data() {
return {
form: {
siteId: loacl.getLocal("siteId"), // 站点id
hallName: "", // 大厅名称
address: "", // 地址
floor: 1, // 楼层
build: 1, // 楼栋
remark: "", // 备注
},
rules: {
hallName: [
{ required: true, message: "请输入大厅名称", trigger: "blur" },
],
},
};
},
computed: {
Visible: {
get() {
return this.addHallVisile;
},
set(val) {
this.$emit("update:addHallVisile", val);
},
},
},
methods: {
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(data) {
this.form = { ...data };
},
// 关闭弹窗
handleClose() {
this.$refs.form.resetFields();
console.log(this.form);
this.Visible = false;
},
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
let res = await saveHall(this.form);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
});
},
// 重置
handleReset() {
this.$refs.form.resetFields();
},
},
};
</script>
<style lang="less" scoped>
.ant-input-number {
width: 100%;
}
</style>
\ No newline at end of file
<template>
<div class="hall-window">
<div class="left">
<div class="header">
<h3 class="titel">大厅窗口</h3>
<div class="control">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<div class="business-control">
<a-space>
<a-input-search
placeholder="请输入窗口名称搜索"
enter-button="搜索"
v-model="serchSiteBusiness"
@search="onSearchLeft"
allowClear
/>
</a-space>
</div>
</div>
</div>
<div class="table-content">
<!-- 表格 -->
<a-table
bordered
:loading="leftLoading"
size="middle"
:scroll="{ y: 550 }"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: leftCurrent,
total: leftTotal,
pageSize: leftSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changeLeft,
onShowSizeChange: showSizeChange,
}"
:columns="leftColumns"
:expandIconColumnIndex="2"
:data-source="businessData"
:row-selection="{
selectedRowKeys: selectedLeftRowKeys,
onChange: onSelectChange,
onSelect: onSelectLeftRow,
}"
:rowKey="(record) => record.id"
>
<template
slot="num"
v-if="record.parentId === 0"
slot-scope="text, record, index"
>
<span>
{{ (leftCurrent - 1) * leftSize + index + 1 }}
</span>
</template>
<template slot="businessName" slot-scope="text">
{{ text.businessName }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
</div>
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">站点窗口</h3>
<div class="control">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
</div>
<div class="business-control">
<a-input-search
placeholder="请输入窗口名称搜索"
enter-button="搜索"
v-model="serchData"
@search="onSearch"
allowClear
/>
</div>
</div>
</div>
<div class="table-content">
<!-- 表格 -->
<a-table
bordered
:scroll="{ y: 550 }"
:loading="rightLoading"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: rightCurrent,
total: rightTotal,
pageSize: rightSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changeRight,
onShowSizeChange: showSizeChangeRight,
}"
size="middle"
:expandIconColumnIndex="2"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onRightSelectChange,
}"
:columns="rightColumns"
:data-source="businessDataList"
:rowKey="(record) => record.id"
>
<template
v-if="record.parentId === 0"
slot="num"
slot-scope="text, record, index"
>
<span>
{{ (rightCurrent - 1) * rightSize + index + 1 }}
</span>
</template>
<template slot="name" slot-scope="text">
{{ text.name }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="jion" @click="handleIn(text.id)">加入</a>
<a
href="javascript:;"
class="delete"
@click="handleDelRight(+text.id)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
</div>
</div>
</template>
<script>
import { getHallList } from "@/services/hall";
import local from "@/utils/local";
const leftColumns = [
{
title: "序号",
width: "50px",
scopedSlots: { customRender: "num" },
},
{
title: "窗口名称",
dataIndex: "windowName",
},
{
title: "所属大厅",
dataIndex: "hallName",
},
{
title: "创建时间",
dataIndex: "createTime",
},
{
title: "操作",
width: "110px",
scopedSlots: {
customRender: "action",
},
},
];
const rightColumns = [
{
title: "序号",
key: "id",
width: "50px",
scopedSlots: { customRender: "num" },
},
{
title: "窗口名称",
dataIndex: "name",
},
{
title: "编号",
dataIndex: "fromnum",
},
{
title: "所属部门",
dataIndex: "deptName",
},
{
title: "操作",
width: "110px",
scopedSlots: {
customRender: "action",
},
},
];
export default {
components: {},
data() {
return {
leftColumns,
rightColumns,
hallList: [], // 大厅列表
leftLoading: false,
rightLoading: false,
selectedRowKeys: [],
selectedLeftRowKeys: [],
visible: false,
leftCurrent: 1,
rightCurrent: 1,
leftTotal: 0,
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
siteId: local.getLocal("siteId"), // 站点id
};
},
created() {
this.getHallList();
},
methods: {
// 获取大厅列表
async getHallList() {
let res = await getHallList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.data.code == 1) {
let { data } = res.data.data;
this.hallList = data;
console.log(data);
}
},
// 左边搜索
onSearchLeft() {
this.leftCurrent = 1;
},
// 删除
handleDel() {
// let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {},
onCancel() {
console.log("Cancel");
},
});
},
// 左边选中
onSelectChange(key) {
this.selectedLeftRowKeys = key;
},
// 批量删除
handleDelAll() {
if (this.deleteData.length <= 0) {
this.$message.warning("请先勾选数据");
return;
}
},
// 获取批量加入id
onRightSelectChange(key) {
this.selectedRowKeys = key;
},
// 批量加入
handleAddAll() {},
// 左翻页
changeLeft(num) {
this.leftCurrent = num;
},
// 左边改变每页显示数量
showSizeChange(current, size) {
this.leftCurrent = current;
this.leftSize = size;
},
// 右翻页
changeRight(num) {
this.rightCurrent = num;
},
// 右边改变显示数量
showSizeChangeRight(current, size) {
this.rightCurrent = current;
this.rightSize = size;
},
// 编辑
async handleEdit() {},
// 搜索
async onSearch() {
this.rightCurrent = 1;
},
// 加入
async handleIn() {
if (!this.siteId) {
this.$message.warning("请先选择站点");
return;
}
},
// 删除-右
handleDelRight() {
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
maskClosable: true,
icon: "exclamation-circle",
async onOk() {},
onCancel() {
console.log("Cancel");
},
});
},
},
};
</script>
<style lang="less" scoped>
.hall-window {
width: 100%;
height: 100%;
display: flex;
position: relative;
&::after {
content: "";
width: 1px;
height: 100%;
position: absolute;
background-color: #eeeeee;
top: 0px;
left: 50%;
}
.left,
.right {
width: 50%;
.header {
height: 100px;
.titel {
margin-bottom: 15px;
}
}
}
.left {
padding-right: 15px;
}
.right {
padding-left: 15px;
}
.control {
width: 100%;
display: flex;
justify-content: space-between;
}
}
.add-btn {
background-color: #04cb8f;
color: #fff;
}
</style>
\ No newline at end of file
......@@ -58,9 +58,15 @@
</p>
</div>
<div class="skin-footer-records">
<p :style="{ color: filterItem('9', 0) }">主办单位:信宏翔科技</p>
<p :style="{ color: filterItem('9', 0) }">承办单位:信宏翔科技</p>
<p :style="{ color: filterItem('9', 0) }">技术:信宏翔科技</p>
<p :style="{ color: filterItem('9', 0) }">
主办单位:四川省青霆科技有限公司
</p>
<p :style="{ color: filterItem('9', 0) }">
承办单位:四川省青霆科技有限公司
</p>
<p :style="{ color: filterItem('9', 0) }">
技术:四川省青霆科技有限公司
</p>
<p :style="{ color: filterItem('9', 0) }">版权所有</p>
</div>
</div>
......
......@@ -30,8 +30,8 @@ export default {
.system {
width: 100%;
height: 100%;
padding: 15px;
.system-out-box {
padding: 0px 15px 15px 15px;
overflow-y: auto;
}
/deep/.ant-tabs-nav-container {
......
......@@ -149,6 +149,35 @@ const options = {
},
],
},
// {
// path: "hall",
// name: "大厅管理",
// meta: {
// icon: "gateway",
// },
// component: () => import("@/pages/basicset/hall/Hall"),
// redirect: "/hall/hallmanage",
// children: [
// {
// path: "hallmanage",
// name: "",
// component: () =>
// import("@/pages/basicset/hall/hallmanage/HallManage.vue"),
// meta: {
// invisible: true,
// },
// },
// {
// path: "hallwindow",
// name: "大厅窗口管理",
// meta: {
// invisible: true,
// },
// component: () =>
// import("@/pages/basicset/hall/hallwindow/HallWindow.vue"),
// },
// ],
// },
{
path: "personnel",
name: "工作人员管理",
......
......@@ -159,6 +159,7 @@ module.exports = {
save: `${BASE_URL}/base/window/save`,
delete: `${BASE_URL}/base/window/delete`,
exportExcel: `${BASE_URL}/base/window/exportExcel`,
subList: `${BASE_URL}/base/window/subHalllist`, // 查询当前站点所有没有在大厅配置的过的窗口
},
// 工作人员
workman: {
......@@ -338,4 +339,19 @@ module.exports = {
delete: `${BASE_URL}/base/task/delete`,
},
},
// 站点大厅
hall: {
list: `${BASE_URL}/base/site/hall/list`,
info: `${BASE_URL}/base/site/hall/info`,
save: `${BASE_URL}/base/site/hall/save`,
delete: `${BASE_URL}/base/site/hall/delete`,
window: `${BASE_URL}/window/hall/getBusinessByHall`, // 根据大厅查询所属业务列表
},
// 大厅窗口
windowHall: {
list: `${BASE_URL}/base/window/hall/list`,
info: `${BASE_URL}/base/window/hall/info`,
save: `${BASE_URL}/base/window/hall/save`,
delete: `${BASE_URL}/base/window/hall/delete`,
},
};
import { hall, windowHall } from "@/services/basicsetApi";
import { request, METHOD } from "@/utils/request";
// 获取站点大厅信息
export const getHallList = (data) => {
return request(hall.list, METHOD.POST, data);
};
// 查看站点大厅信息
export const getHallInfo = (data) => {
return request(hall.info, METHOD.get, data);
};
// 保存更新站点大厅
export const saveHall = (data) => {
return request(hall.save, METHOD.POST, data);
};
// 删除站点大厅
export const delHall = (data) => {
return request(hall.delete, METHOD.get, data);
};
// 根据大厅查询所属业务列表
export const getHallWindow = (data) => {
return request(hall.window, METHOD.POST, data);
};
/**
* 大厅窗口
*/
// 获取大厅窗口列表
export const getWindowHallList = (data) => {
return request(windowHall.list, METHOD.POST, data);
};
// 查看大厅窗口
export const getWindowHallInfo = (data) => {
return request(windowHall.info, METHOD.get, data);
};
// 保存大厅窗口
export const saveWindowHall = (data) => {
return request(windowHall.save, METHOD.POST, data);
};
// 删除大厅窗口
export const delWindowHall = (data) => {
return request(windowHall.delete, METHOD.get, data);
};
......@@ -5,24 +5,7 @@ const { getThemeColors, modifyVars } = require("./src/utils/themeUtil");
const { resolveCss } = require("./src/utils/theme-color-replacer-extend");
const CompressionWebpackPlugin = require("compression-webpack-plugin");
const productionGzipExtensions = ["js", "css"];
const isDev = process.env.NODE_ENV === "development";
const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹
let plugins = [];
// 避免打本地启项目时自动打zip包
if (!isDev) {
plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
// mkdir: ["./dist"],
delete: ["./zip/"],
copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/基础设置系统.zip" }],
},
},
})
);
}
const assetsCDN = {
// webpack build externals
// externals: {
......@@ -82,17 +65,6 @@ module.exports = {
"window.Quill": "quill/dist/quill.js",
Quill: "quill/dist/quill.js",
}),
...plugins,
// 生产环境打包zip文件
// new FileManagerPlugin({
// events: {
// onEnd: {
// mkdir: ["./dist"],
// delete: ["./dist.zip"],
// archive: [{ source: "./dist", destination: "./dist.zip" }],
// },
// },
// }),
],
},
css: {
......
This diff is collapsed.
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