bibi 3 years ago
parent a07e81945d
commit 7a8fbb2b5a

@ -0,0 +1,52 @@
import httpService from "@/request"
export function planList(params) {
return httpService({
url: `/user/inspectionPlan/list`,
method: 'get',
params: params,
})
}
export function planisEnable(params) {
return httpService({
url: `/user/inspectionPlan/isEnable`,
method: 'get',
params: params,
})
}
export function planInfo(params) {
return httpService({
url: `/user/inspectionPlan/findById`,
method: 'get',
params: params,
})
}
export function planInsert(params) {
return httpService({
url: `/user/inspectionPlan/insert`,
method: 'post',
data: params,
})
}
export function planDel(params) {
return httpService({
url: `/user/inspectionPlan/delete`,
method: 'post',
data: params,
})
}
export function planUpdate(params) {
return httpService({
url: `/user/inspectionPlan/update`,
method: 'post',
data: params,
})
}
// 巡检记录
export function inspectionExecute(params) {
return httpService({
url: `/user/inspectionExecute/list`,
method: 'get',
params: params,
})
}

@ -0,0 +1,39 @@
import httpService from "@/request"
// 巡检点
// list
export function pointList(params) {
return httpService({
url: `/user/inspectionPoint/list`,
method: 'get',
params: params,
})
}
export function pointInfo(params) {
return httpService({
url: `/user/inspectionPoint/findById`,
method: 'get',
params: params,
})
}
export function pointInsert(params) {
return httpService({
url: `/user/inspectionPoint/insert`,
method: 'post',
data: params,
})
}
export function pointDel(params) {
return httpService({
url: `/user/inspectionPoint/delete`,
method: 'post',
data: params,
})
}
export function pointUpdate(params) {
return httpService({
url: `/user/inspectionPoint/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,47 @@
import httpService from "@/request"
// 路线
export function routerList(params) {
return httpService({
url: `/user/inspectionRouter/list`,
method: 'get',
params: params,
})
}
export function routerisEnable(params) {
return httpService({
url: `/user/inspectionRouter/isEnable`,
method: 'get',
params: params,
})
}
export function routerInfo(params) {
return httpService({
url: `/user/inspectionRouter/findById`,
method: 'get',
params: params,
})
}
export function routerInsert(params) {
return httpService({
url: `/user/inspectionRouter/insert`,
method: 'post',
data: params,
})
}
export function routerDel(params) {
return httpService({
url: `/user/inspectionRouter/delete`,
method: 'post',
data: params,
})
}
export function routerUpdate(params) {
return httpService({
url: `/user/inspectionRouter/update`,
method: 'post',
data: params,
})
}

@ -82,15 +82,15 @@ export default [
},
]
},
{
path: '/Workorder',
name: "Workorder",
title: "工单管理",
icon: 'solution',
hide: false,
component: resolve => require(['@/views/Basic/WorkOrder'], resolve),
meta: {title: '工单管理'}
},
// {
// path: '/Workorder',
// name: "Workorder",
// title: "工单管理",
// icon: 'solution',
// hide: false,
// component: resolve => require(['@/views/Basic/WorkOrder'], resolve),
// meta: {title: '工单管理'}
// },
// {
// path: '/attendance',
// name: "Attendance",

@ -16,6 +16,42 @@ export default [
component: resolve => require(['@/views/Operation/ClientSet'], resolve),
meta: {title: '用户端设置'},
},
{
path: '/InspectionManage',
name: "InspectionManage",
title: "巡检管理",
icon: 'retweet',
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage'], resolve),
redirect: '/InspectionManage/InspectionPoint',
meta: {title: '巡检管理'},
children: [
{
path: '/InspectionManage/InspectionPoint',
name: "InspectionPoint",
title: "巡检点",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionPoint'], resolve),
meta: {title: '巡检点'},
},
{
path: '/InspectionManage/InspectionRoute',
name: "InspectionRoute",
title: "巡检路线",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionRoute'], resolve),
meta: {title: '巡检路线'},
},
{
path: '/InspectionManage/InspectionPlan',
name: "InspectionPlan",
title: "巡检计划",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionPlan'], resolve),
meta: {title: '巡检计划'},
},
]
},
{
path: '/Activity',
name: "Activity",

@ -0,0 +1,80 @@
export const formItem = [
{
type: 'select',
label:'资讯分类',
prop:'categoryId',
option:[],
placeholder:'请选择'
},
{
type: 'select',
label:'发布状态',
prop:'status',
option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'},],
placeholder:'请选择状态'
},
{
type: 'time',
label:'创建时间',
start: 'createStartDate',
end:'createEndDate',
},
{
type: 'input',
label:'标题',
prop:'title',
placeholder:'请输入'
},
]
export const columns = [
{
title: "标题",
dataIndex: "title",
width: "10%",
},
{
title: "分类",
dataIndex: "categoryName",
width: "10%",
},
{
title: "发布状态",
dataIndex: "status",
width: "6%",
customRender: function (status) {
switch (status) {
case 1:
return '未发布'
case 2:
return '已发布'
}
}
},
{
title: "阅读量",
dataIndex: "viewsNum",
width: "10%",
},
{
title: "创建时间",
dataIndex: "createDate",
width: "12%",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,111 @@
<template>
<div>
<a-drawer
title="资讯-详情"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="detailClose"
>
<div class="drawer-content">
<div class="content-title">
{{ detailData.title }}
<a-tag color="blue">{{
detailData.status === 1 ? "未发布" : "已发布"
}}</a-tag>
</div>
<a-divider></a-divider>
<a-descriptions>
<a-descriptions-item label="资讯类型">
{{ detailData.categoryName }}
</a-descriptions-item>
<a-descriptions-item label="阅读量">
{{ detailData.viewsNum }}
</a-descriptions-item>
<a-descriptions-item label="创建人">
{{ detailData.createName }}
</a-descriptions-item>
<a-descriptions-item label="创建时间">
{{ detailData.createDate }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions :column="1">
<a-descriptions-item label="资讯内容">
{{ detailData.content }}
</a-descriptions-item>
<a-descriptions-item label="公告封面图">
<img
v-for="(item, index) in detailData.imgList"
:key="index"
:src="$ImgUrl(item.url)"
class="content-img"
/>
</a-descriptions-item>
</a-descriptions>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="detailClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { newsInfo } from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
detailId: Number,
},
data() {
return {
detailData: {},
};
},
mounted() {},
methods: {
detailClose() {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
},
watch: {
detailId: {
handler(id) {
if (id !== null && id !== undefined) {
newsInfo({ informationId: id }).then((res) => {
this.detailData = res.data;
});
}
},
immediate: true,
},
},
};
</script>
<style lang="less" scoped>
.content-title {
color: #000000d9;
font-weight: 500;
font-size: 18px;
line-height: 25px;
}
.content-img {
width: 108px;
height: 86px;
}
</style>

@ -0,0 +1,21 @@
export const form = {
id:undefined,
title:undefined,
categoryId:undefined,
status:undefined,
content:undefined,
imgUrls:[]
}
export const rules = {
title:[{required:true,message:'请输入标题',trigger:'blur'}],
categoryId:[{required:true,message:'请选择分类',trigger:'change'}],
status:[{required:true,message:'请选择',trigger:'change'}],
content:[{required:true,message:'请输入',trigger:'blur'}],
}
export const options = {
status:[
{ id:1, name:'未发布' },
{ id:2, name:'已发布' },
],
categoryId:[]
}

@ -0,0 +1,201 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-row>
<a-col :span="12">
<a-form-model-item prop="title" label="标题">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 80%"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="categoryId" label="资讯分类">
<a-select
v-model="form.categoryId"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.categoryId"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="status" label="发布状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item prop="content" label="内容">
<a-textarea
v-model="form.content"
placeholder="请输入内容"
style="width: 80%"
></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
资讯封面图片
<commonUpload
:fileList="fileList"
@handleChange="handleChange"
></commonUpload>
</a-col>
</a-row>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import {
newsInsert,
newsUpdate,
newsInfo,
itemSelect
} from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId: Number,
},
data() {
return {
title: "新增资讯",
form,
rules,
options,
fileList: [],
};
},
mounted() {
this.getItem();
},
methods: {
async getItem() {
let res = await itemSelect();
this.options.categoryId = res.data;
},
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = [];
this.form.imgUrls = [];
this.$emit("addClose");
},
success() {
this.$emit("success");
this.addClose();
},
submit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.editId === null) {
let res = await newsInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await newsUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
}
}
});
},
handleChange(data) {
this.fileList = data;
if (data[0].status === "done") {
console.log("-------done-------");
this.form.imgUrls.push(data[0].response.data);
}
},
},
watch: {
editId: {
handler(val) {
if (val !== null) {
this.title = "修改资讯";
this.form.id = val;
newsInfo({ informationId: val }).then((res) => {
this.form = res.data;
if (res.data.imgList.length > 0) {
console.log(res.data.imgList);
const pic = [];
for (let item of res.data.imgList) {
let obj = {
name: item.url.split("_")[0] + "." + item.url.split(".")[1],
url: this.$ImgUrl(item.url),
uid: item.url.split("_")[1],
status: "done",
thumbUrl: this.$ImgUrl(item.url),
};
pic.push(obj);
}
this.fileList = pic;
} else {
this.form.imgUrls = [];
}
});
} else {
this.title = "新增资讯";
}
},
immediate: true,
},
},
};
</script>
<style></style>

@ -0,0 +1,190 @@
<template>
<div>
<div class="cardTitle">资讯管理</div>
<searchForm :formItem="formItem" @getSearch="getData($event)" @changeTime='changeTime'></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>新增资讯</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2600 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="detail(row.id)"></a>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
<detailForm :detailId="detailId" :show="drawer.detail" @detailClose="detailClose"></detailForm>
</div>
</template>
<script>
import { newsList, newsDel,itemSelect } from "@/api/operation/news/index.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
import detailForm from "./depend/detail.vue";
export default {
components: {
addForm,
detailForm
},
data() {
return {
drawer: {
show: false,
detail:false
},
editId: null,
detailId:null,
tableData: [],
searchForm: {
activityAddress: undefined,
organizerName: undefined,
activityContact: undefined,
activityTel: undefined,
title: undefined,
status: undefined,
registrationStartTime: undefined,
registrationEndTime: undefined,
activityStartTime: undefined,
activityEndTime: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
this.getItem();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await newsList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
},
async getItem(){
let res = await itemSelect()
this.formItem[0].option = res.data
},
changeTime(data,start,end){
console.log(start);
this.searchForm[start] = data[0]
this.searchForm[end] = data[1]
console.log(this.searchForm);
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await newsDel({ informationIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
detail(id){
this.drawer.detail = true;
this.detailId = id;
},
detailClose(){
this.detailId = null;
this.drawer.detail = false;
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -0,0 +1,80 @@
export const formItem = [
{
type: 'select',
label:'资讯分类',
prop:'categoryId',
option:[],
placeholder:'请选择'
},
{
type: 'select',
label:'发布状态',
prop:'status',
option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'},],
placeholder:'请选择状态'
},
{
type: 'time',
label:'创建时间',
start: 'createStartDate',
end:'createEndDate',
},
{
type: 'input',
label:'标题',
prop:'title',
placeholder:'请输入'
},
]
export const columns = [
{
title: "标题",
dataIndex: "title",
width: "10%",
},
{
title: "分类",
dataIndex: "categoryName",
width: "10%",
},
{
title: "发布状态",
dataIndex: "status",
width: "6%",
customRender: function (status) {
switch (status) {
case 1:
return '未发布'
case 2:
return '已发布'
}
}
},
{
title: "阅读量",
dataIndex: "viewsNum",
width: "10%",
},
{
title: "创建时间",
dataIndex: "createDate",
width: "12%",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,111 @@
<template>
<div>
<a-drawer
title="资讯-详情"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="detailClose"
>
<div class="drawer-content">
<div class="content-title">
{{ detailData.title }}
<a-tag color="blue">{{
detailData.status === 1 ? "未发布" : "已发布"
}}</a-tag>
</div>
<a-divider></a-divider>
<a-descriptions>
<a-descriptions-item label="资讯类型">
{{ detailData.categoryName }}
</a-descriptions-item>
<a-descriptions-item label="阅读量">
{{ detailData.viewsNum }}
</a-descriptions-item>
<a-descriptions-item label="创建人">
{{ detailData.createName }}
</a-descriptions-item>
<a-descriptions-item label="创建时间">
{{ detailData.createDate }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions :column="1">
<a-descriptions-item label="资讯内容">
{{ detailData.content }}
</a-descriptions-item>
<a-descriptions-item label="公告封面图">
<img
v-for="(item, index) in detailData.imgList"
:key="index"
:src="$ImgUrl(item.url)"
class="content-img"
/>
</a-descriptions-item>
</a-descriptions>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="detailClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { newsInfo } from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
detailId: Number,
},
data() {
return {
detailData: {},
};
},
mounted() {},
methods: {
detailClose() {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
},
watch: {
detailId: {
handler(id) {
if (id !== null && id !== undefined) {
newsInfo({ informationId: id }).then((res) => {
this.detailData = res.data;
});
}
},
immediate: true,
},
},
};
</script>
<style lang="less" scoped>
.content-title {
color: #000000d9;
font-weight: 500;
font-size: 18px;
line-height: 25px;
}
.content-img {
width: 108px;
height: 86px;
}
</style>

@ -0,0 +1,21 @@
export const form = {
id:undefined,
title:undefined,
categoryId:undefined,
status:undefined,
content:undefined,
imgUrls:[]
}
export const rules = {
title:[{required:true,message:'请输入标题',trigger:'blur'}],
categoryId:[{required:true,message:'请选择分类',trigger:'change'}],
status:[{required:true,message:'请选择',trigger:'change'}],
content:[{required:true,message:'请输入',trigger:'blur'}],
}
export const options = {
status:[
{ id:1, name:'未发布' },
{ id:2, name:'已发布' },
],
categoryId:[]
}

@ -0,0 +1,201 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-row>
<a-col :span="12">
<a-form-model-item prop="title" label="标题">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 80%"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="categoryId" label="资讯分类">
<a-select
v-model="form.categoryId"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.categoryId"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="status" label="发布状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item prop="content" label="内容">
<a-textarea
v-model="form.content"
placeholder="请输入内容"
style="width: 80%"
></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
资讯封面图片
<commonUpload
:fileList="fileList"
@handleChange="handleChange"
></commonUpload>
</a-col>
</a-row>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import {
newsInsert,
newsUpdate,
newsInfo,
itemSelect
} from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId: Number,
},
data() {
return {
title: "新增资讯",
form,
rules,
options,
fileList: [],
};
},
mounted() {
this.getItem();
},
methods: {
async getItem() {
let res = await itemSelect();
this.options.categoryId = res.data;
},
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = [];
this.form.imgUrls = [];
this.$emit("addClose");
},
success() {
this.$emit("success");
this.addClose();
},
submit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.editId === null) {
let res = await newsInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await newsUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
}
}
});
},
handleChange(data) {
this.fileList = data;
if (data[0].status === "done") {
console.log("-------done-------");
this.form.imgUrls.push(data[0].response.data);
}
},
},
watch: {
editId: {
handler(val) {
if (val !== null) {
this.title = "修改资讯";
this.form.id = val;
newsInfo({ informationId: val }).then((res) => {
this.form = res.data;
if (res.data.imgList.length > 0) {
console.log(res.data.imgList);
const pic = [];
for (let item of res.data.imgList) {
let obj = {
name: item.url.split("_")[0] + "." + item.url.split(".")[1],
url: this.$ImgUrl(item.url),
uid: item.url.split("_")[1],
status: "done",
thumbUrl: this.$ImgUrl(item.url),
};
pic.push(obj);
}
this.fileList = pic;
} else {
this.form.imgUrls = [];
}
});
} else {
this.title = "新增资讯";
}
},
immediate: true,
},
},
};
</script>
<style></style>

@ -0,0 +1,190 @@
<template>
<div>
<div class="cardTitle">巡检点</div>
<searchForm :formItem="formItem" @getSearch="getData($event)" @changeTime='changeTime'></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>新增巡更点</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2600 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="detail(row.id)"></a>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
<detailForm :detailId="detailId" :show="drawer.detail" @detailClose="detailClose"></detailForm>
</div>
</template>
<script>
import { newsList, newsDel,itemSelect } from "@/api/operation/news/index.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
import detailForm from "./depend/detail.vue";
export default {
components: {
addForm,
detailForm
},
data() {
return {
drawer: {
show: false,
detail:false
},
editId: null,
detailId:null,
tableData: [],
searchForm: {
activityAddress: undefined,
organizerName: undefined,
activityContact: undefined,
activityTel: undefined,
title: undefined,
status: undefined,
registrationStartTime: undefined,
registrationEndTime: undefined,
activityStartTime: undefined,
activityEndTime: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
this.getItem();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await newsList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
},
async getItem(){
let res = await itemSelect()
this.formItem[0].option = res.data
},
changeTime(data,start,end){
console.log(start);
this.searchForm[start] = data[0]
this.searchForm[end] = data[1]
console.log(this.searchForm);
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await newsDel({ informationIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
detail(id){
this.drawer.detail = true;
this.detailId = id;
},
detailClose(){
this.detailId = null;
this.drawer.detail = false;
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -0,0 +1,80 @@
export const formItem = [
{
type: 'select',
label:'资讯分类',
prop:'categoryId',
option:[],
placeholder:'请选择'
},
{
type: 'select',
label:'发布状态',
prop:'status',
option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'},],
placeholder:'请选择状态'
},
{
type: 'time',
label:'创建时间',
start: 'createStartDate',
end:'createEndDate',
},
{
type: 'input',
label:'标题',
prop:'title',
placeholder:'请输入'
},
]
export const columns = [
{
title: "标题",
dataIndex: "title",
width: "10%",
},
{
title: "分类",
dataIndex: "categoryName",
width: "10%",
},
{
title: "发布状态",
dataIndex: "status",
width: "6%",
customRender: function (status) {
switch (status) {
case 1:
return '未发布'
case 2:
return '已发布'
}
}
},
{
title: "阅读量",
dataIndex: "viewsNum",
width: "10%",
},
{
title: "创建时间",
dataIndex: "createDate",
width: "12%",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,111 @@
<template>
<div>
<a-drawer
title="资讯-详情"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="detailClose"
>
<div class="drawer-content">
<div class="content-title">
{{ detailData.title }}
<a-tag color="blue">{{
detailData.status === 1 ? "未发布" : "已发布"
}}</a-tag>
</div>
<a-divider></a-divider>
<a-descriptions>
<a-descriptions-item label="资讯类型">
{{ detailData.categoryName }}
</a-descriptions-item>
<a-descriptions-item label="阅读量">
{{ detailData.viewsNum }}
</a-descriptions-item>
<a-descriptions-item label="创建人">
{{ detailData.createName }}
</a-descriptions-item>
<a-descriptions-item label="创建时间">
{{ detailData.createDate }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions :column="1">
<a-descriptions-item label="资讯内容">
{{ detailData.content }}
</a-descriptions-item>
<a-descriptions-item label="公告封面图">
<img
v-for="(item, index) in detailData.imgList"
:key="index"
:src="$ImgUrl(item.url)"
class="content-img"
/>
</a-descriptions-item>
</a-descriptions>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="detailClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { newsInfo } from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
detailId: Number,
},
data() {
return {
detailData: {},
};
},
mounted() {},
methods: {
detailClose() {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
},
watch: {
detailId: {
handler(id) {
if (id !== null && id !== undefined) {
newsInfo({ informationId: id }).then((res) => {
this.detailData = res.data;
});
}
},
immediate: true,
},
},
};
</script>
<style lang="less" scoped>
.content-title {
color: #000000d9;
font-weight: 500;
font-size: 18px;
line-height: 25px;
}
.content-img {
width: 108px;
height: 86px;
}
</style>

@ -0,0 +1,21 @@
export const form = {
id:undefined,
title:undefined,
categoryId:undefined,
status:undefined,
content:undefined,
imgUrls:[]
}
export const rules = {
title:[{required:true,message:'请输入标题',trigger:'blur'}],
categoryId:[{required:true,message:'请选择分类',trigger:'change'}],
status:[{required:true,message:'请选择',trigger:'change'}],
content:[{required:true,message:'请输入',trigger:'blur'}],
}
export const options = {
status:[
{ id:1, name:'未发布' },
{ id:2, name:'已发布' },
],
categoryId:[]
}

@ -0,0 +1,201 @@
<template>
<div>
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-row>
<a-col :span="12">
<a-form-model-item prop="title" label="标题">
<a-input
v-model="form.title"
placeholder="请输入标题"
style="width: 80%"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="categoryId" label="资讯分类">
<a-select
v-model="form.categoryId"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.categoryId"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="status" label="发布状态">
<a-select
v-model="form.status"
placeholder="请选择"
style="width: 80%"
>
<a-select-option
v-for="item in options.status"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item prop="content" label="内容">
<a-textarea
v-model="form.content"
placeholder="请输入内容"
style="width: 80%"
></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
资讯封面图片
<commonUpload
:fileList="fileList"
@handleChange="handleChange"
></commonUpload>
</a-col>
</a-row>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { form, rules, options } from "./form.js";
import {
newsInsert,
newsUpdate,
newsInfo,
itemSelect
} from "@/api/operation/news/index.js";
export default {
props: {
show: {
type: Boolean,
default: false,
},
editId: Number,
},
data() {
return {
title: "新增资讯",
form,
rules,
options,
fileList: [],
};
},
mounted() {
this.getItem();
},
methods: {
async getItem() {
let res = await itemSelect();
this.options.categoryId = res.data;
},
addClose() {
this.$refs.ruleForm.resetFields();
this.fileList = [];
this.form.imgUrls = [];
this.$emit("addClose");
},
success() {
this.$emit("success");
this.addClose();
},
submit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.editId === null) {
let res = await newsInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await newsUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.success();
} else {
this.$message.error(res.msg);
}
}
}
});
},
handleChange(data) {
this.fileList = data;
if (data[0].status === "done") {
console.log("-------done-------");
this.form.imgUrls.push(data[0].response.data);
}
},
},
watch: {
editId: {
handler(val) {
if (val !== null) {
this.title = "修改资讯";
this.form.id = val;
newsInfo({ informationId: val }).then((res) => {
this.form = res.data;
if (res.data.imgList.length > 0) {
console.log(res.data.imgList);
const pic = [];
for (let item of res.data.imgList) {
let obj = {
name: item.url.split("_")[0] + "." + item.url.split(".")[1],
url: this.$ImgUrl(item.url),
uid: item.url.split("_")[1],
status: "done",
thumbUrl: this.$ImgUrl(item.url),
};
pic.push(obj);
}
this.fileList = pic;
} else {
this.form.imgUrls = [];
}
});
} else {
this.title = "新增资讯";
}
},
immediate: true,
},
},
};
</script>
<style></style>

@ -0,0 +1,190 @@
<template>
<div>
<div class="cardTitle">资讯管理</div>
<searchForm :formItem="formItem" @getSearch="getData($event)" @changeTime='changeTime'></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>新增资讯</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2600 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="detail(row.id)"></a>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<addForm
:show="drawer.show"
@success="success"
@addClose="addClose"
:editId="editId"
></addForm>
<detailForm :detailId="detailId" :show="drawer.detail" @detailClose="detailClose"></detailForm>
</div>
</template>
<script>
import { newsList, newsDel,itemSelect } from "@/api/operation/news/index.js";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
import detailForm from "./depend/detail.vue";
export default {
components: {
addForm,
detailForm
},
data() {
return {
drawer: {
show: false,
detail:false
},
editId: null,
detailId:null,
tableData: [],
searchForm: {
activityAddress: undefined,
organizerName: undefined,
activityContact: undefined,
activityTel: undefined,
title: undefined,
status: undefined,
registrationStartTime: undefined,
registrationEndTime: undefined,
activityStartTime: undefined,
activityEndTime: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
this.getData();
this.getItem();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await newsList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
},
async getItem(){
let res = await itemSelect()
this.formItem[0].option = res.data
},
changeTime(data,start,end){
console.log(start);
this.searchForm[start] = data[0]
this.searchForm[end] = data[1]
console.log(this.searchForm);
},
edit(id) {
this.editId = id;
this.drawer.show = true;
},
del(ids) {
console.log(ids);
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await newsDel({ informationIds: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
this.drawer.show = false;
this.editId = null;
},
success() {
this.getData();
},
detail(id){
this.drawer.detail = true;
this.detailId = id;
},
detailClose(){
this.detailId = null;
this.drawer.detail = false;
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -0,0 +1,13 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -1,26 +1,12 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
欠款明细
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
<!-- <a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>
> -->
<a-table
:columns="columns"
:data-source="tableData"
@ -36,14 +22,13 @@
}
"
>
<span slot="action" slot-scope="text, row">
<!-- <span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</span> -->
</a-table>
<div class="action">
<!-- <div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
@ -55,8 +40,7 @@
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div> -->
</div>
</template>

@ -1,40 +1,70 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
type: 'time',
label:'收款时间',
},
{
type: 'select',
label:'收款方式',
},
]
export const columns = [
{
title: "费用名称",
title: "账单名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
title: "房屋",
dataIndex: "",
},
{
title: "户主",
dataIndex: "",
},
{
title: "承租人",
dataIndex: "",
},
{
title: "建筑面积",
dataIndex: "",
},
{
title: "流水号",
dataIndex: "",
},
{
title: "收费标准",
dataIndex: "",
},
{
title: "费用周期",
dataIndex: "",
},
{
title: "计量方式",
dataIndex: "type",
title: "应收金额",
dataIndex: "",
},
{
title: "单价",
dataIndex: "price",
title: "实收金额",
dataIndex: "",
},
{
title: "单位",
dataIndex: "unit",
title: "违约金额",
dataIndex: "",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
title: "收款时间",
dataIndex: "",
},
// {
// title: "操作",
// dataIndex: "action",
// key: "action",
// width: "180",
// fixed: "right",
// scopedSlots: { customRender: "action" },
// },
]
export const pagination = {
current: 1,

@ -1,26 +1,12 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
缴费明细
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
<!-- <a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>
> -->
<a-table
:columns="columns"
:data-source="tableData"
@ -36,14 +22,13 @@
}
"
>
<span slot="action" slot-scope="text, row">
<!-- <span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</span> -->
</a-table>
<div class="action">
<!-- <div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
@ -55,7 +40,7 @@
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div> -->
</div>
</template>

@ -8,24 +8,28 @@ export const formItem = [
]
export const columns = [
{
title: "费用名称",
title: "账单名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
title: "开始时间",
dataIndex: "",
},
{
title: "计量方式",
dataIndex: "type",
title: "结束时间",
dataIndex: "",
},
{
title: "单价",
dataIndex: "price",
title: "自动扣费时间(每月)",
dataIndex: "",
},
{
title: "单位",
dataIndex: "unit",
title: "创建人",
dataIndex: "",
},
{
title: "创建时间",
dataIndex: "",
},
{
title: "操作",

@ -1,25 +1,22 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
收费标准管理
</div>
<a-tabs v-model="chargeType" @change="changeType">
<a-tab-pane key="1" tab="手动生成账单">
<house/>
</a-tab-pane>
<a-tab-pane key="2" tab="自动生成账单">
<pay-meter/>
</a-tab-pane>
<a-tab-pane key="3" tab="账单自动扣费">
<parking/>
</a-tab-pane>
</a-tabs>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>添加缴费计划</a-button
>
<a-table
:columns="columns"
@ -100,7 +97,6 @@ export default {
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},

@ -16,6 +16,7 @@
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"

Loading…
Cancel
Save