Commit 83cd7550 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents de9efb36 3df87e6a
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
.green{ .green{
color:#1BBC9B; color:#1BBC9B;
} }
.edit{
color:#03d76f;
}
.clofff{ .clofff{
color:#fff; color:#fff;
} }
......
...@@ -30,7 +30,12 @@ ...@@ -30,7 +30,12 @@
</a-layout-sider> </a-layout-sider>
<a-layout class="main" style="padding: 0 24px 24px"> <a-layout class="main" style="padding: 0 24px 24px">
<a-layout-content> <a-layout-content>
<router-view></router-view> <keep-alive>
<!-- 需要缓存的视图组件 -->
<router-view v-if="$route.meta.keepAlive"> </router-view>
</keep-alive>
<!-- 不需要缓存的视图组件 -->
<router-view v-if="!$route.meta.keepAlive"> </router-view>
</a-layout-content> </a-layout-content>
</a-layout> </a-layout>
</a-layout> </a-layout>
......
...@@ -20,6 +20,18 @@ export default { ...@@ -20,6 +20,18 @@ export default {
TerminalApp, TerminalApp,
MoveApp, MoveApp,
}, },
data() {
return {};
},
// 进入路有前
beforeRouteEnter(to, from, text) {
if (from.path === "/appmarket/appdetails") {
to.meta.isBack = true;
} else {
to.meta.isBack = false;
}
text();
},
}; };
</script> </script>
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
size: 'small', size: 'small',
...@@ -332,4 +333,7 @@ export default { ...@@ -332,4 +333,7 @@ export default {
font-weight: 600; font-weight: 600;
} }
} }
/deep/.ant-form-item {
align-items: flex-start;
}
</style> </style>
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a> <a class="delete" @click="handleDel(text.id)">删除</a>
</a-space> </a-space>
</template> </template>
...@@ -143,7 +144,6 @@ export default { ...@@ -143,7 +144,6 @@ export default {
}, },
created() { created() {
this.getDatasetList(); this.getDatasetList();
console.log(this.appTemplate);
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
defaultPageSize: 1000,
onChange: handleChange, onChange: handleChange,
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
...@@ -39,7 +40,7 @@ ...@@ -39,7 +40,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a> <a class="delete" @click="handleDel(text.id)">删除</a>
</a-space> </a-space>
</template> </template>
...@@ -112,7 +113,7 @@ export default { ...@@ -112,7 +113,7 @@ export default {
}, },
{ {
title: "操作", title: "操作",
width: "10%", width: "110px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -54,7 +55,13 @@ ...@@ -54,7 +55,13 @@
</template> </template>
<!-- 简介 --> <!-- 简介 -->
<template slot="summary" slot-scope="text"> <template slot="summary" slot-scope="text">
{{ text.summary ? text.summary : "--" }} <span :title="text.summary">{{
text.summary ? text.summary : "--"
}}</span>
</template>
<!-- 版本 -->
<template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }}
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
...@@ -72,7 +79,7 @@ ...@@ -72,7 +79,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space size="middle"> <a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a> <a class="edit" @click="handleEdit(text)">编辑</a>
<a class="primary" @click="handleCheck(text.id)">查看</a> <a class="primary" @click="handleCheck(text.id)">查看</a>
<a <a
class="delete" class="delete"
...@@ -107,6 +114,55 @@ import AddApp from "../modal/AddApp.vue"; ...@@ -107,6 +114,55 @@ import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import { getAppList, deleteApp, saveApp } from "@/services/market"; import { getAppList, deleteApp, saveApp } from "@/services/market";
import local from "@/utils/local"; import local from "@/utils/local";
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "应用名称",
dataIndex: "appName",
},
{
title: "应用图标",
scopedSlots: { customRender: "appIconPath" },
},
{
title: "当前版本",
scopedSlots: { customRender: "version" },
},
{
title: "应用主题",
ellipsis: true,
dataIndex: "appThemeName",
},
{
title: "应用简介",
ellipsis: true,
scopedSlots: { customRender: "summary" },
},
{
title: "应用类型",
scopedSlots: { customRender: "appType" },
},
{
title: "下发设备",
dataIndex: "downDevCount",
},
{
title: "上架/下架",
scopedSlots: { customRender: "shelves" },
},
{
title: "操作",
width: "150px",
scopedSlots: { customRender: "action" },
},
];
export default { export default {
components: { components: {
YSwitch, YSwitch,
...@@ -114,56 +170,6 @@ export default { ...@@ -114,56 +170,6 @@ export default {
CheckSite, CheckSite,
}, },
data() { data() {
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "应用名称",
dataIndex: "appName",
},
{
title: "应用图标",
scopedSlots: { customRender: "appIconPath" },
},
{
title: "当前版本",
customRender: (text) => {
return <span>{"v" + text.version}</span>;
},
},
{
title: "应用主题",
dataIndex: "appThemeName",
},
{
title: "应用简介",
width: "20%",
scopedSlots: { customRender: "summary" },
},
{
title: "应用类型",
scopedSlots: { customRender: "appType" },
},
{
title: "下发设备",
dataIndex: "downDevCount",
},
{
title: "上架/下架",
scopedSlots: { customRender: "shelves" },
},
{
title: "操作",
width: "10%",
scopedSlots: { customRender: "action" },
},
];
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "") ? process.env.VUE_APP_API_BASE_URL.replace("base", "")
...@@ -183,9 +189,16 @@ export default { ...@@ -183,9 +189,16 @@ export default {
siteVisible: false, siteVisible: false,
}; };
}, },
created() { // 详情页返回不刷新数据
this.getAppList(); activated() {
if (!this.$route.meta.isBack) {
Object.assign(this.$data, this.$options.data());
this.getAppList();
} else {
this.$route.meta.isBack = false;
}
}, },
created() {},
methods: { methods: {
// 获取应用列表 // 获取应用列表
async getAppList() { async getAppList() {
......
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
v-for="(v, i) in form.appInfoFieldList" v-for="(v, i) in form.appInfoFieldList"
:key="v.fieldCode" :key="v.fieldCode"
:label="v.fieldName" :label="v.fieldName"
:class="{ content: v.fieldType == 'text' }" :class="{
content: v.fieldType == 'text',
'upload-item': v.fieldType == 'upload',
}"
:prop="`appInfoFieldList.${i}.fieldValue`" :prop="`appInfoFieldList.${i}.fieldValue`"
:rules="{ :rules="{
required: v.fieldNull ? false : true, required: v.fieldNull ? false : true,
message: `${v.fieldName}不能为空`, message: `${v.fieldName}不能为空`,
trigger: trigger: v.fieldType == 'text' ? 'blur' : 'change',
v.fieldType == 'date' || v.fieldType == 'text'
? 'change'
: 'blur',
}" }"
> >
<a-input <a-input
...@@ -53,6 +53,21 @@ ...@@ -53,6 +53,21 @@
<div v-else-if="v.fieldType == 'text'" class="content-box"> <div v-else-if="v.fieldType == 'text'" class="content-box">
<YQuillEditor v-model="v.fieldValue" height="auto"></YQuillEditor> <YQuillEditor v-model="v.fieldValue" height="auto"></YQuillEditor>
</div> </div>
<a-upload
v-else-if="v.fieldType == 'upload'"
:action="api2 + 'file/commonupload'"
:multiple="false"
:file-list="v.fileList"
@change="
(info) => {
handleChange(info, v);
}
"
>
<a-button type="primary">
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
...@@ -98,6 +113,10 @@ export default { ...@@ -98,6 +113,10 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
api2: process.env.VUE_APP_API_BASE_URL + "/",
labelCol: { labelCol: {
span: 2, span: 2,
}, },
...@@ -151,14 +170,44 @@ export default { ...@@ -151,14 +170,44 @@ export default {
delete v.id; delete v.id;
} }
v.fieldValue = ""; v.fieldValue = "";
if (v.fieldType == "upload") {
v.fileList = [];
}
return v; return v;
}); });
this.form.appId = this.$route.query.id; this.form.appId = this.$route.query.id;
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
v.fileList = [
{
uid: v.id,
name: v.fieldValue,
status: "done",
url: v.fieldValue,
},
];
}
});
this.form = { ...data }; this.form = { ...data };
}, },
// 文件上传
handleChange(info, row) {
let fileList = [...info.fileList];
fileList = fileList.slice(-1);
fileList = fileList.map((file) => {
if (file.response) {
file.url = file.response.url;
} else {
file.url = "";
}
return file;
});
row.fileList = fileList;
row.fieldValue = fileList.map((v) => v.url).join(",");
},
}, },
}; };
</script> </script>
...@@ -201,4 +250,7 @@ export default { ...@@ -201,4 +250,7 @@ export default {
display: flex; display: flex;
} }
} }
.upload-item {
display: block !important;
}
</style> </style>
\ No newline at end of file
...@@ -82,6 +82,10 @@ const fieldTypeItem = [ ...@@ -82,6 +82,10 @@ const fieldTypeItem = [
value: "date", value: "date",
label: "日期选择框", label: "日期选择框",
}, },
{
value: "upload",
label: "文件上传",
},
{ {
value: "text", value: "text",
label: "富文本", label: "富文本",
...@@ -117,7 +121,7 @@ export default { ...@@ -117,7 +121,7 @@ export default {
fieldName: [ fieldName: [
{ required: true, message: "请输入字段名称", trigger: "blur" }, { required: true, message: "请输入字段名称", trigger: "blur" },
], ],
fieldTyp: [ fieldType: [
{ required: true, message: "请选择字段类型", trigger: "change" }, { required: true, message: "请选择字段类型", trigger: "change" },
], ],
fieldNull: [ fieldNull: [
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: leftCurrent, current: leftCurrent,
total: leftTotal, total: leftTotal,
pageSize: leftSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -97,6 +98,7 @@ ...@@ -97,6 +98,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: rightCurrent, current: rightCurrent,
total: rightTotal, total: rightTotal,
pageSize: rightSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -175,7 +177,7 @@ const leftColumns = [ ...@@ -175,7 +177,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -197,7 +199,7 @@ const rightColumns = [ ...@@ -197,7 +199,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: leftCurrent, current: leftCurrent,
total: leftTotal, total: leftTotal,
pageSize: leftSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
defaultPageSize: leftSize, defaultPageSize: leftSize,
...@@ -117,6 +118,7 @@ ...@@ -117,6 +118,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: rightCurrent, current: rightCurrent,
total: rightTotal, total: rightTotal,
pageSize: rightSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -196,7 +198,7 @@ const leftColumns = [ ...@@ -196,7 +198,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -222,7 +224,7 @@ const rightColumns = [ ...@@ -222,7 +224,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: leftCurrent, current: leftCurrent,
total: leftTotal, total: leftTotal,
pageSize: leftSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
:pagination="{ :pagination="{
current: rightCurrent, current: rightCurrent,
total: rightTotal, total: rightTotal,
pageSize: rightSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -263,7 +265,7 @@ const leftColumns = [ ...@@ -263,7 +265,7 @@ const leftColumns = [
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -290,7 +292,7 @@ const rightColumns = [ ...@@ -290,7 +292,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -252,7 +253,7 @@ const columns = [ ...@@ -252,7 +253,7 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "9%", width: "120px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
......
<template> <template>
<div class="index"> <div class="index">
<keep-alive> <router-view> </router-view>
<!-- 需要缓存的视图组件 -->
<router-view v-if="$route.meta.keepAlive"> </router-view>
</keep-alive>
<!-- 不需要缓存的视图组件 -->
<router-view v-if="!$route.meta.keepAlive"> </router-view>
</div> </div>
</template> </template>
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: Current, current: Current,
total: total, total: total,
pageSize: size,
size: 'middle', size: 'middle',
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
...@@ -217,7 +218,7 @@ const leftColumns = [ ...@@ -217,7 +218,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "12%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -21,49 +21,51 @@ ...@@ -21,49 +21,51 @@
</div> </div>
<!-- 部门管理 --> <!-- 部门管理 -->
<div class="department-list"> <div class="department-list">
<div v-if="department.length"> <a-spin :spinning="deptLoading">
<div <div v-if="department.length">
:class="{ department_off: true, active: active === i }" <div
v-for="(v, i) in department" :class="{ department_off: true, active: active === i }"
:key="v.id" v-for="(v, i) in department"
@click="changeDept(v.id, i)" :key="v.id"
> @click="changeDept(v.id, i)"
<div class="department-title"> >
<div class="department_a"> <div class="department-title">
<a-tooltip> <div class="department_a">
<template slot="title"> {{ v.name }} </template> <a-tooltip>
{{ v.name }} <template slot="title"> {{ v.name }} </template>
</a-tooltip> {{ v.name }}
</div> </a-tooltip>
<div class="department_icon_edit"> </div>
<a-tooltip> <div class="department_icon_edit">
<template slot="title"> 查看编辑 </template> <a-tooltip>
<a-icon <template slot="title"> 查看编辑 </template>
type="edit" <a-icon
class="department_edit" type="edit"
title="编辑" class="department_edit"
@click="showModal(v)" title="编辑"
/> @click="showModal(v)"
</a-tooltip> />
<a-tooltip> </a-tooltip>
<template slot="title"> 删除 </template> <a-tooltip>
<template slot="title"> 删除 </template>
<a-icon <a-icon
type="delete" type="delete"
@click="delDepartment(v.id)" @click="delDepartment(v.id)"
class="delete" class="delete"
department_del department_del
/> />
</a-tooltip> </a-tooltip>
</div>
</div>
<div>
<div class="department_span">简称:{{ v.deptAbb }}</div>
<div>联系电话:{{ v.deptTelphone }}</div>
</div> </div>
</div>
<div>
<div class="department_span">简称:{{ v.deptAbb }}</div>
<div>联系电话:{{ v.deptTelphone }}</div>
</div> </div>
</div> </div>
</div> <a-empty style="margin-top: 20px" :image="simpleImage" v-else />
<a-empty style="margin-top: 20px" :image="simpleImage" v-else /> </a-spin>
</div> </div>
</div> </div>
...@@ -97,6 +99,7 @@ ...@@ -97,6 +99,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: page, current: page,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -134,12 +137,14 @@ ...@@ -134,12 +137,14 @@
{{ text.createTime | dateFormat }} {{ text.createTime | dateFormat }}
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<span slot="action" slot-scope="text"> <div slot="action" slot-scope="text">
<a class="yewu" type="primary" @click="workModal(text)">业务</a> <div class="flex flexwrap">
<a class="shixiang" @click="addWindowMatter(text)">事项</a> <a class="yewu" type="primary" @click="workModal(text)">业务</a>
<a class="edit" type="primary" @click="editModal(text)">编辑</a> <a class="shixiang" @click="addWindowMatter(text)">事项</a>
<a class="delete" @click="delWindow(text.id)">删除</a> <a class="edit" type="primary" @click="editModal(text)">编辑</a>
</span> <a class="delete" @click="delWindow(text.id)">删除</a>
</div>
</div>
</a-table> </a-table>
</div> </div>
</div> </div>
...@@ -309,6 +314,7 @@ export default { ...@@ -309,6 +314,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
deptLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
title: "新增部门", title: "新增部门",
WindowTitle: "新增窗口", WindowTitle: "新增窗口",
...@@ -377,6 +383,7 @@ export default { ...@@ -377,6 +383,7 @@ export default {
// 新增事项页面返回不刷新页面 // 新增事项页面返回不刷新页面
activated() { activated() {
if (!this.$route.meta.isBack) { if (!this.$route.meta.isBack) {
Object.assign(this.$data, this.$options.data());
this.getDeptListData(); this.getDeptListData();
this.getBusinessData(); this.getBusinessData();
this.getWindowListData(); this.getWindowListData();
...@@ -399,12 +406,14 @@ export default { ...@@ -399,12 +406,14 @@ export default {
}, },
// 获取部门列表 // 获取部门列表
async getDeptListData(obj = {}) { async getDeptListData(obj = {}) {
this.deptLoading = true;
let res = await getDeptList({ let res = await getDeptList({
siteId: this.siteId, siteId: this.siteId,
page: 1, page: 1,
size: -1, size: -1,
...obj, ...obj,
}); });
this.deptLoading = false;
let { code, data } = res.data; let { code, data } = res.data;
if (code === 1) { if (code === 1) {
this.department = data.data; this.department = data.data;
...@@ -714,7 +723,7 @@ export default { ...@@ -714,7 +723,7 @@ export default {
background-color: #fff; background-color: #fff;
} }
.edit { .edit {
color: rgb(41, 184, 41); color: #03d76f;
margin-right: 5px; margin-right: 5px;
} }
.delete { .delete {
...@@ -754,6 +763,7 @@ export default { ...@@ -754,6 +763,7 @@ export default {
// } // }
.business-list { .business-list {
display: flex; display: flex;
align-items: flex-start;
/deep/ .ant-form-item-label { /deep/ .ant-form-item-label {
line-height: 20px; line-height: 20px;
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: page, current: page,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -62,8 +63,10 @@ ...@@ -62,8 +63,10 @@
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a type="primary" @click="handleEdit(text)" class="edit">编辑</a> <a-space>
<a class="delet" @click="handleDel(text.id)">删除</a> <a @click="handleEdit(text)" class="edit">编辑</a>
<a class="delet" @click="handleDel(text.id)">删除</a>
</a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -122,7 +125,7 @@ const columns = [ ...@@ -122,7 +125,7 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "10%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -288,8 +291,7 @@ export default { ...@@ -288,8 +291,7 @@ export default {
letter-spacing: normal; letter-spacing: normal;
} }
.edit { .edit {
color: rgb(41, 184, 41); color: #03d76f;
margin-right: 40px;
} }
.delet { .delet {
color: red; color: red;
......
...@@ -7,206 +7,209 @@ ...@@ -7,206 +7,209 @@
<div class="line"></div> <div class="line"></div>
<div class="main-right right ff"> <div class="main-right right ff">
<div class="right_box"> <a-spin size="large" :spinning="loading">
<div v-if="siteData.length" class="rigth-content"> <div class="right_box">
<div <div v-if="siteData.length" class="rigth-content">
v-show="active === index" <div
v-for="(item, index) in siteData" v-show="active === index"
:key="item.id" v-for="(item, index) in siteData"
> :key="item.id"
<div class="site_box"> >
<div class="site_message">站点信息</div> <div class="site_box">
<div class="btn-box"> <div class="site_message">站点信息</div>
<a-button <div class="btn-box">
v-permission="[1]" <a-button
type="primary" v-permission="[1]"
@click="handleSync(item.id)" type="primary"
>同步数据</a-button @click="handleSync(item.id)"
> >同步数据</a-button
<a-button type="primary" @click="editSiteInfo(item)" >
>编辑</a-button <a-button type="primary" @click="editSiteInfo(item)"
> >编辑</a-button
<a-button type="danger" @click="deleteSite(item.id)" >
>删除</a-button <a-button type="danger" @click="deleteSite(item.id)"
> >删除</a-button
>
</div>
</div> </div>
</div>
<div class="website-content"> <div class="website-content">
<div class="base_message"> <div class="base_message">
<div class="color_title">基本信息</div> <div class="color_title">基本信息</div>
<div class="base_main"> <div class="base_main">
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>中心名称:</span> <span>中心名称:</span>
<span>{{ item.siteName }}</span> <span>{{ item.siteName }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>中心编号:</span> <span>中心编号:</span>
<span>{{ item.siteCode }}</span> <span>{{ item.siteCode }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>区域编号:</span> <span>区域编号:</span>
<span>{{ item.areaCode }}</span> <span>{{ item.areaCode }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>ip:</span> <span>ip:</span>
<span>{{ item.siteIp }}</span> <span>{{ item.siteIp }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>中心端口:</span> <span>中心端口:</span>
<span>{{ item.sitePort }}</span> <span>{{ item.sitePort }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>中心电话:</span> <span>中心电话:</span>
<span>{{ item.siteTel }}</span> <span>{{ item.siteTel }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>站点负责人:</span> <span>站点负责人:</span>
<span>{{ item.leadingOfficial }}</span> <span>{{ item.leadingOfficial }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>负责人电话:</span> <span>负责人电话:</span>
<span>{{ item.leadingOfficialTelephone }}</span> <span>{{ item.leadingOfficialTelephone }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>总栋数:</span> <span>总栋数:</span>
<span>{{ item.building }}</span> <span>{{ item.building }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>总楼层:</span> <span>总楼层:</span>
<span>{{ item.level }}</span> <span>{{ item.level }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>中心位置:</span> <span>中心位置:</span>
<span <span
>{{ item.proCode }} {{ item.cityCode }} >{{ item.proCode }} {{ item.cityCode }}
{{ item.districtCode }}</span {{ item.districtCode }}</span
> >
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>详细位置:</span> <span>详细位置:</span>
<span>{{ item.detailAddress }}</span> <span>{{ item.detailAddress }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>经纬度:</span> <span>经纬度:</span>
<span>{{ `${item.longitude}, ${item.latitude}` }}</span> <span>{{ `${item.longitude}, ${item.latitude}` }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="19"> <a-col :span="19">
<span>中心简介:</span> <span>中心简介:</span>
<div class="col_item"> <div class="col_item">
<div class="detail_place">{{ item.siteRemark }}</div> <div class="detail_place">{{ item.siteRemark }}</div>
<span @click="cookAll(item.siteRemark)">查看全部</span> <span @click="cookAll(item.siteRemark)"
</div> >查看全部</span
</a-col> >
</a-row> </div>
</a-col>
</a-row>
</div>
</div> </div>
</div>
<div class="office_message"> <div class="office_message">
<div class="color_title">办公信息</div> <div class="color_title">办公信息</div>
<div class="office_main"> <div class="office_main">
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<span>上午上班:</span> <span>上午上班:</span>
<span v-if="item.amWorkStartTime">{{ <span v-if="item.amWorkStartTime">{{
item.amWorkStartTime | times item.amWorkStartTime | times
}}</span> }}</span>
<i v-if="item.amWorkStartTime && item.amWorkEndTime" <i v-if="item.amWorkStartTime && item.amWorkEndTime"
></i ></i
> >
<span v-if="item.amWorkEndTime">{{ <span v-if="item.amWorkEndTime">{{
item.amWorkEndTime | times item.amWorkEndTime | times
}}</span> }}</span>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span>下午上班:</span> <span>下午上班:</span>
<span v-if="item.pmWorkStartTime">{{ <span v-if="item.pmWorkStartTime">{{
item.pmWorkStartTime | times item.pmWorkStartTime | times
}}</span> }}</span>
<i v-if="item.pmWorkStartTime && item.pmWorkEndTime" <i v-if="item.pmWorkStartTime && item.pmWorkEndTime"
></i ></i
> >
<span v-if="item.pmWorkEndTime">{{ <span v-if="item.pmWorkEndTime">{{
item.pmWorkEndTime | times item.pmWorkEndTime | times
}}</span> }}</span>
</a-col> </a-col>
</a-row> </a-row>
<a-row>
<a-col :span="8">
<span>工作日:</span>
<span class="work-day" v-if="item.workday1 === 1"
>星期一</span
>
<span class="work-day" v-if="item.workday2 === 1"
>星期二</span
>
<span class="work-day" v-if="item.workday3 === 1"
>星期三</span
>
<span class="work-day" v-if="item.workday4 === 1"
>星期四</span
>
<span class="work-day" v-if="item.workday5 === 1"
>星期五</span
>
<span class="work-day" v-if="item.workday6 === 1"
>星期六</span
>
<span class="work-day" v-if="item.workday7 === 1"
>星期天</span
>
</a-col>
</a-row>
</div>
</div>
<div class="deploy_module">
<div class="color_title">部署模块</div>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="20">
<span>工作日:</span> <div class="item_box">
<span class="work-day" v-if="item.workday1 === 1" <div
>星期一</span class="item"
> v-for="(v, i) in item.modelData"
<span class="work-day" v-if="item.workday2 === 1" :key="i"
>星期二</span >
> {{ v }}
<span class="work-day" v-if="item.workday3 === 1" </div>
>星期三</span </div>
>
<span class="work-day" v-if="item.workday4 === 1"
>星期四</span
>
<span class="work-day" v-if="item.workday5 === 1"
>星期五</span
>
<span class="work-day" v-if="item.workday6 === 1"
>星期六</span
>
<span class="work-day" v-if="item.workday7 === 1"
>星期天</span
>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</div> </div>
<div class="deploy_module">
<div class="color_title">部署模块</div>
<a-row>
<a-col :span="20">
<div class="item_box">
<div
class="item"
v-for="(v, i) in item.modelData"
:key="i"
>
{{ v }}
</div>
</div>
</a-col>
</a-row>
</div>
</div> </div>
</div> </div>
</div> <div v-else class="empty-show">
<div v-else class="empty-show"> <a-empty description="暂无站点" />
<a-empty description="暂无站点" /> <div class="btn_box" v-if="!siteData.length">
<div class="btn_box" v-if="!siteData.length"> <div style="width: 200px">
<div style="width: 200px"> <a-button block size="large" @click="addSiteAll"
<a-button block size="large" @click="addSiteAll" >新增站点</a-button
>新增站点</a-button >
> </div>
</div> </div>
</div> </div>
</div> <!-- 切换站点 -->
<!-- 切换站点 --> <!-- <div class="cut-btn">
<!-- <div class="cut-btn">
<div> <div>
<a-icon <a-icon
type="vertical-right" type="vertical-right"
...@@ -222,7 +225,8 @@ ...@@ -222,7 +225,8 @@
/> />
</div> </div>
</div> --> </div> -->
</div> </div>
</a-spin>
</div> </div>
<!-- 新增站点 --> <!-- 新增站点 -->
...@@ -256,6 +260,7 @@ export default { ...@@ -256,6 +260,7 @@ export default {
data() { data() {
return { return {
loading: false,
title: "新增站点", title: "新增站点",
formVisible: false, formVisible: false,
allShow: false, //查看全部对话框 allShow: false, //查看全部对话框
...@@ -282,6 +287,7 @@ export default { ...@@ -282,6 +287,7 @@ export default {
}, },
// 获取站点列表 // 获取站点列表
async getSiteList(info = {}) { async getSiteList(info = {}) {
this.loading = true;
let res = await getSiteList(info); let res = await getSiteList(info);
let { data, dict } = res.data.data; let { data, dict } = res.data.data;
data.forEach((v) => { data.forEach((v) => {
...@@ -294,9 +300,11 @@ export default { ...@@ -294,9 +300,11 @@ export default {
); );
}); });
this.siteData = data; this.siteData = data;
this.loading = false;
}, },
// 获取站点信息 // 获取站点信息
async getSiteInfo() { async getSiteInfo() {
this.loading = true;
let res = await siteInfo({ id: this.siteId }); let res = await siteInfo({ id: this.siteId });
let { data, dict } = res.data; let { data, dict } = res.data;
data.modelIds = data.modelIds.split(","); data.modelIds = data.modelIds.split(",");
...@@ -307,6 +315,7 @@ export default { ...@@ -307,6 +315,7 @@ export default {
[] []
); );
this.siteData = [data]; this.siteData = [data];
this.loading = false;
}, },
// 删除 // 删除
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: leftCurrent, current: leftCurrent,
total: leftTotal, total: leftTotal,
pageSize: leftSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -133,6 +134,7 @@ ...@@ -133,6 +134,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: rightCurrent, current: rightCurrent,
total: rightTotal, total: rightTotal,
pageSize: rightSize,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -256,7 +258,7 @@ const leftColumns = [ ...@@ -256,7 +258,7 @@ const leftColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -305,7 +307,7 @@ const rightColumns = [ ...@@ -305,7 +307,7 @@ const rightColumns = [
}, },
{ {
title: "操作", title: "操作",
width: "20%", width: "110px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
......
...@@ -6,7 +6,43 @@ ...@@ -6,7 +6,43 @@
<div class="person_chang"> <div class="person_chang">
<div class="person_gruop">选择部门:</div> <div class="person_gruop">选择部门:</div>
<div class="person_gruop1"> <div class="person_gruop1">
<a-radio-group <div class="dept-select flex aic">
<div
class="item dept-select-item1"
:class="{ active: deptSearch === '' }"
@click="handleAllDept"
>
全部
</div>
<div
v-show="deptSearch !== ''"
class="item dept-select-item2 active"
>
{{ curDept }}
</div>
<a-popover arrowPointAtCenter placement="rightTop" title="部门列表">
<template slot="content">
<div class="dept-list" v-if="deptData.length">
<a-radio-group v-model="deptSearch" @change="changeDept">
<a-radio
:data-name="v.name"
v-for="v in deptData"
:key="v.id"
:value="v.id"
>
{{ v.name }}
</a-radio>
</a-radio-group>
</div>
<a-empty style="margin-top: 20px" :image="simpleImage" v-else />
</template>
<div class="item dept-select-item3">
<a-icon type="double-right" />
</div>
</a-popover>
</div>
<!-- <a-radio-group
button-style="solid" button-style="solid"
v-model="deptSearch" v-model="deptSearch"
@change="handleDeptSearch" @change="handleDeptSearch"
...@@ -15,13 +51,52 @@ ...@@ -15,13 +51,52 @@
<a-radio-button v-for="v in deptData" :key="v.id" :value="v.id">{{ <a-radio-button v-for="v in deptData" :key="v.id" :value="v.id">{{
v.name v.name
}}</a-radio-button> }}</a-radio-button>
</a-radio-group> </a-radio-group> -->
</div> </div>
</div> </div>
<div class="person_chang"> <div class="person_chang">
<div class="person_window">选择窗口:</div> <div class="person_window">选择窗口:</div>
<div class="person_window1"> <div class="person_window1">
<a-radio-group <div class="dept-select flex aic">
<div
class="item dept-select-item1"
:class="{ active: windowSearch === '' }"
@click="handleAllWindow"
>
全部
</div>
<div
v-show="windowSearch !== ''"
class="item dept-select-item2 active"
>
{{ curWindow }}
</div>
<a-popover arrowPointAtCenter placement="rightTop" title="窗口列表">
<template slot="content">
<div class="dept-list" v-if="windowData.length">
<a-radio-group
v-model="windowSearch"
@change="handleWindowSearch"
>
<a-radio
:data-name="v.name"
v-for="v in windowData"
:key="v.id"
:value="v.id"
>
{{ v.name }}
</a-radio>
</a-radio-group>
</div>
<a-empty style="margin-top: 20px" :image="simpleImage" v-else />
</template>
<div class="item dept-select-item3">
<a-icon type="double-right" />
</div>
</a-popover>
</div>
<!-- <a-radio-group
button-style="solid" button-style="solid"
v-model="windowSearch" v-model="windowSearch"
@change="handleWindowSearch" @change="handleWindowSearch"
...@@ -30,7 +105,7 @@ ...@@ -30,7 +105,7 @@
<a-radio-button v-for="v in windowData" :key="v.id" :value="v.id">{{ <a-radio-button v-for="v in windowData" :key="v.id" :value="v.id">{{
v.name v.name
}}</a-radio-button> }}</a-radio-button>
</a-radio-group> </a-radio-group> -->
</div> </div>
</div> </div>
<div class="on btn"> <div class="on btn">
...@@ -48,7 +123,7 @@ ...@@ -48,7 +123,7 @@
<a style="color: #1890ff" @click="changePwd"> 修改密码</a> <a style="color: #1890ff" @click="changePwd"> 修改密码</a>
</a-menu-item> --> </a-menu-item> -->
</a-menu> </a-menu>
<a-button type="primary" style="margin-left: 8px"> <a-button style="margin-left: 8px">
更多操作 <a-icon type="down" /> 更多操作 <a-icon type="down" />
</a-button> </a-button>
</a-dropdown> </a-dropdown>
...@@ -69,6 +144,7 @@ ...@@ -69,6 +144,7 @@
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: page, current: page,
total: total, total: total,
pageSize: size,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
pageSizeOptions: pageSizeOptions, pageSizeOptions: pageSizeOptions,
...@@ -158,6 +234,7 @@ import addpersonnel from "./components/addpersonnel.vue"; ...@@ -158,6 +234,7 @@ import addpersonnel from "./components/addpersonnel.vue";
import EditPwd from "./components/EditPwd"; import EditPwd from "./components/EditPwd";
import EditPersonel from "./components/EditPersonel.vue"; import EditPersonel from "./components/EditPersonel.vue";
import local from "@/utils/local"; import local from "@/utils/local";
import { Empty } from "ant-design-vue";
// import axios from "axios"; // import axios from "axios";
import { import {
getDeptList, getDeptList,
...@@ -230,7 +307,7 @@ const columns = [ ...@@ -230,7 +307,7 @@ const columns = [
{ {
title: "操作", title: "操作",
width: "12%", width: "160px",
scopedSlots: { scopedSlots: {
customRender: "action", customRender: "action",
}, },
...@@ -245,6 +322,7 @@ export default { ...@@ -245,6 +322,7 @@ export default {
data() { data() {
return { return {
columns, columns,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
loading: false, loading: false,
visibleEditPwd: false, visibleEditPwd: false,
editVisible: false, editVisible: false,
...@@ -264,6 +342,8 @@ export default { ...@@ -264,6 +342,8 @@ export default {
pageSizeOptions: ["10", "30", "50", "100"], pageSizeOptions: ["10", "30", "50", "100"],
designationDict: {}, // 称号字典 designationDict: {}, // 称号字典
politicalDict: {}, // 政治面貌字典 politicalDict: {}, // 政治面貌字典
curDept: "", // 当前选中部门
curWindow: "", // 当前选中窗口
}; };
}, },
created() { created() {
...@@ -314,14 +394,30 @@ export default { ...@@ -314,14 +394,30 @@ export default {
this.politicalDict = dict.politicalstatus; this.politicalDict = dict.politicalstatus;
this.loading = false; this.loading = false;
}, },
// 部门搜索 // 选择全部部门
handleDeptSearch() { handleAllDept() {
this.deptSearch = "";
this.windowSearch = "";
this.getWindowData(); this.getWindowData();
this.getWorkmanData(); this.getWorkmanData();
},
// 选择部门
changeDept(e) {
let name = e.nativeEvent.target.labels[0].dataset.name;
this.curDept = name;
this.windowSearch = ""; this.windowSearch = "";
this.getWindowData();
this.getWorkmanData();
},
// 选择全部窗口
handleAllWindow() {
this.windowSearch = "";
this.getWorkmanData();
}, },
// 窗口搜索 // 窗口搜索
handleWindowSearch() { handleWindowSearch(e) {
let name = e.nativeEvent.target.labels[0].dataset.name;
this.curWindow = name;
this.getWorkmanData(); this.getWorkmanData();
}, },
// 删除 // 删除
...@@ -532,7 +628,7 @@ export default { ...@@ -532,7 +628,7 @@ export default {
object-fit: cover; object-fit: cover;
} }
.edit { .edit {
color: #1bbc9b; color: #03d76f;
} }
.edit-pwd { .edit-pwd {
color: #1890ff; color: #1890ff;
...@@ -601,4 +697,45 @@ export default { ...@@ -601,4 +697,45 @@ export default {
/deep/.ant-upload-list { /deep/.ant-upload-list {
width: 250px; width: 250px;
} }
.dept-select {
.item {
padding: 4px 10px;
cursor: pointer;
&:hover {
color: #1890ff;
}
}
.dept-select-item1 {
border: 1px solid #ccc;
border-radius: 4px 0px 0px 4px;
border-right: none;
}
.dept-select-item2 {
border: 1px solid #ccc;
border-right: none;
}
.dept-select-item3 {
border: 1px solid #ccc;
border-radius: 0px 4px 4px 0px;
}
.active {
background-color: #1890ff;
border-color: #1890ff;
color: #fff;
&:hover {
color: #fff;
}
}
}
.dept-list {
width: 500px;
min-height: 50px;
max-height: 400px;
overflow-y: auto;
.ant-radio-group {
display: grid;
grid-template-columns: auto auto;
grid-gap: 10px;
}
}
</style> </style>
\ No newline at end of file
...@@ -144,7 +144,7 @@ const options = { ...@@ -144,7 +144,7 @@ const options = {
path: "", path: "",
name: "应用集市", name: "应用集市",
component: () => import("@/pages/basicset/appmarket/AppMarket"), component: () => import("@/pages/basicset/appmarket/AppMarket"),
meta: { invisible: true }, meta: { invisible: true, keepAlive: true },
}, },
{ {
path: "appdetails", path: "appdetails",
......
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