guideline

This commit is contained in:
ext.jiangrui1 2021-07-29 17:54:39 +08:00
parent cf12cbdd82
commit 1301213888
4 changed files with 204 additions and 207 deletions

View File

@ -1,16 +1,16 @@
import Vue from "vue"; import Vue from 'vue'
import Router from "vue-router"; import Router from 'vue-router'
Vue.use(Router); Vue.use(Router)
/* Layout */ /* Layout */
import Layout from "@/layout"; import Layout from '@/layout'
/* Router Modules */ /* Router Modules */
import componentsRouter from "./modules/components"; import componentsRouter from './modules/components'
import chartsRouter from "./modules/charts"; import chartsRouter from './modules/charts'
import tableRouter from "./modules/table"; import tableRouter from './modules/table'
import nestedRouter from "./modules/nested"; import nestedRouter from './modules/nested'
/** /**
* Note: sub-menu only appear when route children.length >= 1 * Note: sub-menu only appear when route children.length >= 1
@ -40,244 +40,244 @@ import nestedRouter from "./modules/nested";
*/ */
export const constantRoutes = [ export const constantRoutes = [
{ {
path: "/redirect", path: '/redirect',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: "/redirect/:path(.*)", path: '/redirect/:path(.*)',
component: () => import("@/views/redirect/index") component: () => import('@/views/redirect/index')
} }
] ]
}, },
{ {
path: "/login", path: '/login',
component: () => import("@/views/login/index"), component: () => import('@/views/login/index'),
hidden: true hidden: true
}, },
{ {
path: "/auth-redirect", path: '/auth-redirect',
component: () => import("@/views/login/auth-redirect"), component: () => import('@/views/login/auth-redirect'),
hidden: true hidden: true
}, },
{ {
path: "/404", path: '/404',
component: () => import("@/views/error-page/404"), component: () => import('@/views/error-page/404'),
hidden: true hidden: true
}, },
{ {
path: "/401", path: '/401',
component: () => import("@/views/error-page/401"), component: () => import('@/views/error-page/401'),
hidden: true hidden: true
}, },
{ {
path: "/", path: '/',
name: "Dashboard", name: 'Dashboard',
component: Layout, component: Layout,
redirect: "/dashboard", redirect: '/dashboard',
children: [ children: [
{ {
path: "dashboard", path: 'dashboard',
component: () => import("@/views/dashboard/index"), component: () => import('@/views/dashboard/index'),
name: "Dashboard", name: 'Dashboard',
meta: { title: "首页", icon: "statistical", affix: true } meta: { title: '首页', icon: 'statistical', affix: true }
} }
] ]
}, },
{ {
path: "/convenience", path: '/convenience',
component: Layout, component: Layout,
name: "Convenience", name: 'Convenience',
redirect: "/convenience/list", redirect: '/convenience/list',
meta: { meta: {
title: "工单管理", title: '工单管理',
icon: "convenience" icon: 'convenience'
// roles: ["admin", "editor"] // roles: ["admin", "editor"]
}, },
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/convenience/list"), component: () => import('@/views/convenience/list'),
name: "ConvenienceList", name: 'ConvenienceList',
meta: { meta: {
title: "工单列表", title: '工单列表',
icon: "convenience", icon: 'convenience',
affix: true, affix: true,
parentTitle: "工单管理" parentTitle: '工单管理'
} }
}, },
{ {
path: "add", path: 'add',
component: () => import("@/views/convenience/add"), component: () => import('@/views/convenience/add'),
name: "ConvenienceList", name: 'ConvenienceList',
meta: { title: "创建工单", icon: "convenience", affix: true }, meta: { title: '创建工单', icon: 'convenience', affix: true },
hidden: true hidden: true
}, },
{ {
path: "detail", path: 'detail',
component: () => import("@/views/convenience/detail"), component: () => import('@/views/convenience/detail'),
name: "ConvenienceDetail", name: 'ConvenienceDetail',
meta: { meta: {
title: "工单详情", title: '工单详情',
icon: "convenience", icon: 'convenience',
affix: true, affix: true,
activeMenu: "/convenience/list" activeMenu: '/convenience/list'
}, },
hidden: true hidden: true
}, },
{ {
path: "typeList", path: 'typeList',
component: () => import("@/views/convenience/typeList"), component: () => import('@/views/convenience/typeList'),
name: "ConvenienceTypeList", name: 'ConvenienceTypeList',
meta: { title: "工单类型列表", icon: "convenience", affix: true }, meta: { title: '工单类型列表', icon: 'convenience', affix: true },
hidden: true hidden: true
} }
] ]
}, },
{ {
path: "/workBook", path: '/workBook',
component: Layout, component: Layout,
name: "WorkBook", name: 'WorkBook',
redirect: "/workBook/list", redirect: '/workBook/list',
meta: { meta: {
title: "工作手册", title: '工作手册',
icon: "list" icon: 'list'
}, },
hidden: false, hidden: false,
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/workBook/list"), component: () => import('@/views/workBook/list'),
name: "workBookList", name: 'workBookList',
meta: { meta: {
title: "工作手册列表", title: '工作手册列表',
icon: "workBook", icon: 'workBook',
affix: true, affix: true,
parentTitle: "工作手册" parentTitle: '工作手册'
} }
}, },
{ {
path: "detail", path: 'detail',
component: () => import("@/views/workBook/detail"), component: () => import('@/views/workBook/detail'),
name: "workBookDetail", name: 'workBookDetail',
meta: { meta: {
title: "工作手册详情", title: '工作手册详情',
icon: "workBook", icon: 'workBook',
affix: true, affix: true,
parentTitle: "工作手册详情" parentTitle: '工作手册详情'
}, },
hidden: true hidden: true
} }
] ]
}, },
{ {
path: "/serviceGuide", path: '/serviceGuide',
component: Layout, component: Layout,
name: "ServiceGuide", name: 'ServiceGuide',
redirect: "/serviceGuide/list", redirect: '/serviceGuide/list',
meta: { meta: {
title: "办事指南", title: '办事指南',
icon: "list" icon: 'list'
}, },
hidden: false, hidden: false,
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/serviceGuide/list"), component: () => import('@/views/serviceGuide/list'),
name: "ServiceGuideList", name: 'ServiceGuideList',
meta: { meta: {
title: "办事指南列表", title: '办事指南列表',
icon: "workBook", icon: 'workBook',
affix: true, affix: true,
parentTitle: "办事指南" parentTitle: '办事指南'
} }
}, },
{ {
path: "detail", path: 'detail',
component: () => import("@/views/serviceGuide/detail"), component: () => import('@/views/serviceGuide/detail'),
name: "serviceGuideDetail", name: 'serviceGuideDetail',
meta: { meta: {
title: "办事指南详情", title: '办事指南详情',
icon: "workBook", icon: 'workBook',
affix: true, affix: true,
parentTitle: "办事指南详情" parentTitle: '办事指南详情'
}, },
hidden: true hidden: true
} }
] ]
}, },
{ {
path: "/helpPrint", path: '/helpPrint',
component: Layout, component: Layout,
name: "HelpPrint", name: 'HelpPrint',
redirect: "/helpPrint/list", redirect: '/helpPrint/list',
meta: { meta: {
title: "代写代办管理", title: '代写代办管理',
icon: "list", icon: 'list',
roles: ["admin", "editor"] roles: ['admin', 'editor']
}, },
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/helpPrint/list"), component: () => import('@/views/helpPrint/list'),
name: "helpPrintList", name: 'helpPrintList',
meta: { meta: {
title: "代写代办列表", title: '代写代办列表',
icon: "dxdb", icon: 'dxdb',
affix: true, affix: true,
parentTitle: "代写代办管理" parentTitle: '代写代办管理'
} }
}, },
{ {
path: "detail", path: 'detail',
component: () => import("@/views/helpPrint/detail"), component: () => import('@/views/helpPrint/detail'),
name: "helpPrintDetail", name: 'helpPrintDetail',
meta: { meta: {
title: "代写代办详情", title: '代写代办详情',
icon: "dxdb", icon: 'dxdb',
affix: true, affix: true,
parentTitle: "代写代办详情" parentTitle: '代写代办详情'
}, },
hidden: true hidden: true
}, },
{ {
path: "read", path: 'read',
component: () => import("@/views/helpPrint/read"), component: () => import('@/views/helpPrint/read'),
name: "helpPrintDetailRead", name: 'helpPrintDetailRead',
meta: { meta: {
title: "代写代办详情", title: '代写代办详情',
icon: "dxdb", icon: 'dxdb',
affix: true, affix: true,
parentTitle: "代写代办详情" parentTitle: '代写代办详情'
}, },
hidden: true hidden: true
} }
] ]
}, },
{ {
path: "/townRanking", path: '/townRanking',
component: Layout, component: Layout,
name: "TownRanking", name: 'TownRanking',
redirect: "/townRanking/index", redirect: '/townRanking/index',
meta: { meta: {
title: "乡镇办件统计", title: '乡镇办件统计',
icon: "townRanking" icon: 'townRanking'
}, },
hidden: false, hidden: false,
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/townRanking/index"), component: () => import('@/views/townRanking/index'),
name: "TownRanking", name: 'TownRanking',
meta: { meta: {
title: "乡镇办件统计", title: '乡镇办件统计',
icon: "townRanking", icon: 'townRanking',
affix: true, affix: true,
parentTitle: "乡镇办件统计" parentTitle: '乡镇办件统计'
} }
} }
] ]
}, }
// { // {
// path: "/staff", // path: "/staff",
// component: Layout, // component: Layout,
@ -335,7 +335,7 @@ export const constantRoutes = [
// } // }
// ] // ]
// } // }
]; ]
/** /**
* asyncRoutes * asyncRoutes
@ -343,25 +343,25 @@ export const constantRoutes = [
*/ */
export const asyncRoutes = [ export const asyncRoutes = [
{ {
path: "/residentInformation", path: '/residentInformation',
component: Layout, component: Layout,
name: "ResidentInformation", name: 'ResidentInformation',
redirect: "/residentInformation/list", redirect: '/residentInformation/list',
meta: { meta: {
title: "居民信息管理", title: '居民信息管理',
icon: "jmInfo", icon: 'jmInfo',
roles: ["SSS"] roles: ['SSS']
}, },
children: [ children: [
{ {
path: "list", path: 'list',
component: () => import("@/views/residentInformation/list"), component: () => import('@/views/residentInformation/list'),
name: "residentInformationList", name: 'residentInformationList',
meta: { meta: {
title: "居民信息列表", title: '居民信息列表',
icon: "jmInfo", icon: 'jmInfo',
affix: true, affix: true,
parentTitle: "居民信息管理" parentTitle: '居民信息管理'
} }
} }
] ]
@ -621,22 +621,22 @@ export const asyncRoutes = [
// }, // },
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!
{ path: "*", redirect: "/404", hidden: true } { path: '*', redirect: '/404', hidden: true }
]; ]
const createRouter = () => const createRouter = () =>
new Router({ new Router({
// mode: 'history', // require service support // mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}); })
const router = createRouter(); const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter(); const newRouter = createRouter()
router.matcher = newRouter.matcher; // reset router router.matcher = newRouter.matcher // reset router
} }
export default router; export default router

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"></div> <div class="filter-container" />
<el-form <el-form
ref="convenienceForm" ref="convenienceForm"
style="width:680px" style="width:680px"
@ -32,8 +32,7 @@
:key="item.id" :key="item.id"
:label="item.eventName" :label="item.eventName"
:value="item.id" :value="item.id"
> />
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -61,9 +60,9 @@
</template> </template>
<script> <script>
import { add, typeList } from "@/api/convenience"; import { add, typeList } from '@/api/convenience'
import { info } from "@/api/staff"; import { info } from '@/api/staff'
import AliOss from "@/components/AliOSS/index.vue"; import AliOss from '@/components/AliOSS/index.vue'
export default { export default {
components: { components: {
@ -71,85 +70,85 @@ export default {
}, },
data() { data() {
var checkInfo = (rule, value, callback) => { var checkInfo = (rule, value, callback) => {
if (value === "") { if (value === '') {
callback(new Error("受理人不能为空")); callback(new Error('受理人不能为空'))
} else { } else {
info({ param: this.convenience.residentInformation || undefined }).then( info({ param: this.convenience.residentInformation || undefined }).then(
res => { res => {
if (!res.d) { if (!res.d) {
return callback(new Error("查无此人")); return callback(new Error('查无此人'))
} else { } else {
this.searchInput = res.d.id; this.searchInput = res.d.id
callback(); callback()
} }
} }
); )
}
} }
};
return { return {
convenience: { convenience: {
residentInformation: undefined, residentInformation: undefined,
eventTypeId: undefined, eventTypeId: undefined,
remark: undefined, remark: undefined,
sponsor: "STAFF", sponsor: 'STAFF',
attachment:undefined attachment: undefined
}, },
typeOptions: [], typeOptions: [],
rules: { rules: {
residentInformation: [{ validator: checkInfo, trigger: "blur" }], residentInformation: [{ validator: checkInfo, trigger: 'blur' }],
eventTypeId: [ eventTypeId: [
{ required: true, message: "办事项目不能为空", trigger: "change" } { required: true, message: '办事项目不能为空', trigger: 'change' }
] ]
// remark: [{ validator: checkRemark, trigger: "blur" }], // remark: [{ validator: checkRemark, trigger: "blur" }],
// attachment: [{ validator: checkAttachment, trigger: "change" }] // attachment: [{ validator: checkAttachment, trigger: "change" }]
}, },
fileList: undefined, fileList: undefined,
searchInput: undefined searchInput: undefined
}; }
}, },
mounted() { mounted() {
this.getTypeList(); this.getTypeList()
}, },
methods: { methods: {
getTypeList() { getTypeList() {
typeList().then(res => { typeList().then(res => {
this.typeOptions = res.d; this.typeOptions = res.d
}); })
}, },
handleAdd() { handleAdd() {
this.$refs.convenienceForm.validate(valid => { this.$refs.convenienceForm.validate(valid => {
if (valid) { if (valid) {
if (!this.convenience.remark) { if (!this.convenience.remark) {
if (!(this.convenience.attachment&&this.convenience.attachment.length > 0)) { if (!(this.convenience.attachment && this.convenience.attachment.length > 0)) {
this.$notify.error("文字说明与附件必须含有一项"); this.$notify.error('文字说明与附件必须含有一项')
return; return
} }
} }
let payload = Object.assign({}, this.convenience); const payload = Object.assign({}, this.convenience)
payload.residentInformation = this.searchInput; payload.residentInformation = this.searchInput
add(payload).then(res => { add(payload).then(res => {
if (res.c === 200) { if (res.c === 200) {
this.$notify.success("创建成功"); this.$notify.success('创建成功')
this.$router.push("/convenience/list"); this.$router.push('/convenience/list')
}else{ } else {
this.$notify.error(res.m) this.$notify.error(res.m)
} }
}); })
} }
}); })
}, },
handlePreview() {}, handlePreview() {},
handleRemove() {}, handleRemove() {},
beforeRemove() {}, beforeRemove() {},
handleExceed() {}, handleExceed() {},
toGuidLine(){ toGuidLine() {
this.$router.push({ this.$router.push({
path: '/serviceGuide/list', path: '/serviceGuide/list'
}) })
},
} }
}; }
}
</script> </script>
<style scope></style> <style scope></style>

View File

@ -12,40 +12,40 @@
:src="info.videoUrl" :src="info.videoUrl"
style="width:600px;height:300px" style="width:600px;height:300px"
controls controls
></video> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <Editor v-model="info.content" style="width: 100%" :disabled="true" /> --> <!-- <Editor v-model="info.content" style="width: 100%" :disabled="true" /> -->
<div v-html="info.content"></div> <div v-html="info.content" />
</div> </div>
</template> </template>
<script> <script>
import Editor from "@/components/UEditor/index.vue"; import Editor from '@/components/UEditor/index.vue'
import { getWorkBookInfo } from "@/api/workBook"; import { getWorkBookInfo } from '@/api/workBook'
export default { export default {
components: { Editor },
data() { data() {
return { return {
id: this.$route.query.id, id: this.$route.query.id,
info: {} info: {}
}; }
}, },
components: { Editor },
created() { created() {
this.getInfo(); this.getInfo()
}, },
methods: { methods: {
getInfo() { getInfo() {
// console.log(this.id); // console.log(this.id);
getWorkBookInfo({ id: this.id }).then(res => { getWorkBookInfo({ id: this.id }).then(res => {
console.log(res); console.log(res)
this.info = res.d; this.info = res.d
}); })
} }
} }
}; }
</script> </script>
<style></style> <style></style>

View File

@ -3,19 +3,17 @@
<div id="guideLine" style="background:#fff;padding-bottom:62px"> <div id="guideLine" style="background:#fff;padding-bottom:62px">
<div class="title">办事指南</div> <div class="title">办事指南</div>
<el-input <el-input
v-model="listQuery.keyword"
placeholder="输入关键字查询办事指南" placeholder="输入关键字查询办事指南"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="listQuery.keyword"
clearable clearable
class="searchInput" class="searchInput"
> />
</el-input>
<el-button <el-button
type="primary" type="primary"
style="padding:9px 28px ;margin-left:10px" style="padding:9px 28px ;margin-left:10px"
@click="handleSearch" @click="handleSearch"
>搜索</el-button >搜索</el-button>
>
<ul class="guideList"> <ul class="guideList">
<li v-for="item in list" :key="item.id" @click="toDetail(item.id)"> <li v-for="item in list" :key="item.id" @click="toDetail(item.id)">
{{ item.title }} {{ item.title }}
@ -26,8 +24,8 @@
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import Pagination from '@/components/Pagination'
import { workBookList } from "@/api/workBook"; import { workBookList } from '@/api/workBook'
export default { export default {
components: { Pagination }, components: { Pagination },
@ -40,33 +38,33 @@ export default {
lastPageIndex: 1, lastPageIndex: 1,
size: 99999, size: 99999,
keyword: undefined, keyword: undefined,
category: "HANDLING_GUIDELINE" category: 'HANDLING_GUIDELINE'
}
} }
};
}, },
created() { created() {
this.getList(); this.getList()
}, },
methods: { methods: {
getList() { getList() {
this.listLoading = true; this.listLoading = true
workBookList(this.listQuery).then(res => { workBookList(this.listQuery).then(res => {
// console.log(res) // console.log(res)
this.listLoading = false; this.listLoading = false
this.list = res.d.records; this.list = res.d.records
}); })
}, },
handleSearch() { handleSearch() {
this.getList(); this.getList()
}, },
toDetail(id) { toDetail(id) {
this.$router.push({ this.$router.push({
path: "/serviceGuide/detail", path: '/serviceGuide/detail',
query: { id } query: { id }
}); })
} }
} }
}; }
</script> </script>
<style scoped> <style scoped>