mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-08-08 08:22:46 +08:00
1.登录页,去掉注册账户,去掉tab(src/views/user/login.vue)
2.固定语言为中文(src/locales/index.js、src/components/SeslectLang/index.jsx) 3.默认首页设置为/admin/repair/RepairDeviceList/repairStatistics(src/config/router.config.js) 4.左侧菜单固定(src/config/defaultSessting.js) 5.人员绩效前面小图标去掉(菜单设置,图标设为#) 6.工单列表页加入分页(基本重写逻辑) 7.人员绩效进入查看详情时,仅允许查看列表和详情,其余全部隐藏 8.重写了工单添加页和详情页,去掉了编辑工单功能 9.修复了添加工单后列表不加载BUG(子组件调用父组件方法handleOk) 10.故障类型、子类、报修地点、损坏原因等页面重新整理了一下,把文字统一,去掉了无用的筛选 11.人员绩效筛选加入人名,修改了重置的BUG,把全部加载改写成分页加载(a-tab上一定要加:force-render='true',预先dom加载好,否则refs获取不到,调用refresh时会报错) 12.选人时可以搜索人名或手机号(设置optionFilterProp="label",同时设置:label="item.username + item.mobile")
This commit is contained in:
parent
b18dd4d44d
commit
669a78fd20
@ -14,7 +14,7 @@ export function getRepair (parameter) {
|
||||
|
||||
export function getRepairList(data) {
|
||||
return axios({
|
||||
url: api.repair + '/list',
|
||||
url: api.repair + '/list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
@ -12,6 +12,14 @@ export function getRepairRemindList (parameter) {
|
||||
})
|
||||
}
|
||||
|
||||
export function readRepairRemind (parameter) {
|
||||
return axios({
|
||||
url: api.repairRemind + '/read',
|
||||
method: 'post',
|
||||
data: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function delRepairRemind (parameter) {
|
||||
return axios({
|
||||
url: api.repairRemind + '/remove',
|
||||
|
@ -46,7 +46,7 @@ const SelectLang = {
|
||||
</Menu>
|
||||
)
|
||||
return (
|
||||
<Dropdown overlay={langMenu} placement="bottomRight">
|
||||
<Dropdown overlay={langMenu} placement="bottomRight" style="display:none">
|
||||
<span class={prefixCls}>
|
||||
<Icon type="global" title={i18nRender('navBar.lang')} />
|
||||
</span>
|
||||
|
@ -18,7 +18,7 @@ export default {
|
||||
layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu`
|
||||
contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu
|
||||
fixedHeader: false, // sticky header
|
||||
fixSiderbar: false, // sticky siderbar
|
||||
fixSiderbar: true, // sticky siderbar
|
||||
colorWeak: false,
|
||||
menu: {
|
||||
locale: true
|
||||
|
@ -12,6 +12,10 @@ export const defaultRouterMap = [
|
||||
* @type { *[] }
|
||||
*/
|
||||
export const constantRouterMap = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/admin/repair/RepairDeviceList/repairStatistics' // 默认首页
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: UserLayout,
|
||||
|
@ -4,15 +4,14 @@ import storage from 'store'
|
||||
import moment from 'moment'
|
||||
|
||||
// default lang
|
||||
import enUS from './lang/en-US'
|
||||
|
||||
import zhCN from './lang/zh-CN'
|
||||
Vue.use(VueI18n)
|
||||
|
||||
export const defaultLang = 'en-US'
|
||||
export const defaultLang = 'zh-CN'
|
||||
|
||||
const messages = {
|
||||
'en-US': {
|
||||
...enUS
|
||||
'zh-CN': {
|
||||
...zhCN
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +32,8 @@ function setI18nLanguage (lang) {
|
||||
}
|
||||
|
||||
export function loadLanguageAsync (lang = defaultLang) {
|
||||
// 直接写死语言为中文,避免缓存
|
||||
lang = 'zh-CN'
|
||||
return new Promise(resolve => {
|
||||
// 缓存语言设置
|
||||
storage.set('lang', lang)
|
||||
|
@ -12,7 +12,8 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||
|
||||
const allowList = ['login', 'register', 'registerResult', 'chart'] // no redirect allowList
|
||||
const loginRoutePath = '/user/login'
|
||||
const defaultRoutePath = '/dashboard/analysis' // 登录跳转
|
||||
const defaultRoutePath = '/admin/repair/RepairDeviceList/repairStatistics' // 登录跳转
|
||||
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start() // start progress bar
|
||||
|
@ -29,7 +29,7 @@ const app = {
|
||||
color: '',
|
||||
weak: false,
|
||||
multiTab: true,
|
||||
lang: 'en-US',
|
||||
lang: 'zh-CN',
|
||||
_antLocale: {}
|
||||
},
|
||||
mutations: {
|
||||
|
@ -24,7 +24,7 @@ const rootRouter = {
|
||||
'key': '',
|
||||
'name': 'index',
|
||||
'component': 'BasicLayout',
|
||||
'redirect': '/dashboard/analysis', // 登录跳转
|
||||
'redirect': '/admin/repair/RepairDeviceList/repairStatistics', // 登录跳转
|
||||
'children': []
|
||||
}
|
||||
|
||||
|
@ -1,143 +1,143 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="维修单号">
|
||||
<a-input placeholder="请输入关键词" v-model="queryParam.sn" />
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-page-search-wrapper' v-if='!isShowModel'>
|
||||
<a-form layout='inline'>
|
||||
<a-row :gutter='48'>
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='维修单号'>
|
||||
<a-input placeholder='请输入关键词' v-model='queryParam.sn' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :allowClear="true" label="故障类别">
|
||||
<a-select v-model="queryParam.typeId"
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' :allowClear='true' label='故障类型'>
|
||||
<a-select v-model='queryParam.typeId'
|
||||
v-decorator="['typeId']"
|
||||
@change="selectDevice">
|
||||
<a-select-option v-for="item in typeList" :key="item.id">{{ item.name }}
|
||||
@change='selectDevice'>
|
||||
<a-select-option v-for='item in typeList' :key='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :allowClear="true" label="故障子类">
|
||||
<a-select v-model="queryParam.deviceId"
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' :allowClear='true' label='故障子类'>
|
||||
<a-select v-model='queryParam.deviceId'
|
||||
v-decorator="['deviceId', {rules: [{ required: true, message: '请选择所属设备' }]}]"
|
||||
@change="getDeviceName">
|
||||
<a-select-option v-for="item in deviceList" :key="item.id">{{ item.name }}
|
||||
@change='getDeviceName'>
|
||||
<a-select-option v-for='item in deviceList' :key='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="报修来源">
|
||||
<a-select v-model="queryParam.remark" :allowClear="true"
|
||||
v-decorator="['remark']">
|
||||
<a-select-option v-for="item in remarkOption" :key="item.value">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-col :md='7' :sm='20'>
|
||||
<a-form-item label='关键词(故障描述)'>
|
||||
<a-input placeholder='请输入关键词' v-model='queryParam.explain' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="工单状态">
|
||||
<a-select v-model="queryParam.type" :allowClear="true"
|
||||
v-decorator="['status']">
|
||||
<a-select-option v-for="item in options" :key="item.value">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="故障等级">
|
||||
<a-select v-model="queryParam.repairLevel" :allowClear="true"
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='故障等级'>
|
||||
<a-select v-model='queryParam.repairLevel' :allowClear='true'
|
||||
v-decorator="['repairLevel']">
|
||||
<a-select-option v-for="item in repairLevelOptions" :key="item.value">
|
||||
<a-select-option v-for='item in repairLevelOptions' :key='item.value'>
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="20">
|
||||
<a-form-item label="关键词(故障描述)">
|
||||
<a-input placeholder="请输入关键词" v-model="queryParam.explain" />
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='报修来源'>
|
||||
<a-select v-model='queryParam.remark' :allowClear='true'
|
||||
v-decorator="['remark']">
|
||||
<a-select-option v-for='item in remarkOption' :key='item.value'>
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="评价">
|
||||
<a-select v-model="queryParam.evalService"
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='工单状态'>
|
||||
<a-select v-model='queryParam.type' :allowClear='true'
|
||||
v-decorator="['status']">
|
||||
<a-select-option v-for='item in options' :key='item.value'>
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='评价'>
|
||||
<a-select v-model='queryParam.evalService'
|
||||
v-decorator="['evalService']">
|
||||
<a-select-option v-for="item in evalOptions" :key="item.value">
|
||||
<a-select-option v-for='item in evalOptions' :key='item.value'>
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="时间范围">
|
||||
<a-range-picker v-model="dateRange" @change="onChange" />
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='报修时间'>
|
||||
<a-range-picker v-model='dateRange' @change='onChange' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="selectRepairList()">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="reset()">重置</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepair()">导出工单模版</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="importDataVisible()">导入</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepairList()">导出工单数据</a-button>
|
||||
<a-col :md='8' :sm='24'>
|
||||
<span class='table-page-search-submitButtons'>
|
||||
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
||||
<a-button style='margin-left: 8px' @click='reset()'>重置</a-button>
|
||||
<a-button style='margin-left: 8px' type='primary' @click='exportRepair()'>导出工单模版</a-button>
|
||||
<a-button style='margin-left: 8px' type='primary' @click='importDataVisible()'>导入</a-button>
|
||||
<a-button style='margin-left: 8px' type='primary' @click='exportRepairList()'>导出工单数据</a-button>
|
||||
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<div class='table-operator' v-if='!isShowModel'>
|
||||
<a-button v-if='addEnable' type='primary' icon='plus' @click='$refs.modal.add()'>新建</a-button>
|
||||
</div>
|
||||
<a-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="loadData"
|
||||
<s-table
|
||||
size='default'
|
||||
ref='table'
|
||||
rowKey='id'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
:columns='columns'
|
||||
:data='loadData'
|
||||
>
|
||||
<span slot="status" slot-scope="text">
|
||||
<span slot='status' slot-scope='text'>
|
||||
{{ text | statusFilter }}
|
||||
</span>
|
||||
<span slot="remark" slot-scope="text">
|
||||
<a-tag v-if="text == '5110'" color="blue">
|
||||
<span slot='remark' slot-scope='text'>
|
||||
<a-tag v-if="text == '5110'" color='blue'>
|
||||
{{ text }}
|
||||
</a-tag>
|
||||
<a-tag v-else color="cyan">
|
||||
<a-tag v-else color='cyan'>
|
||||
普通报修
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleView(record.id)">详情</a>
|
||||
<a-divider type="vertical" />
|
||||
|
||||
<a v-if="editEnabel" @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
<a type="danger" @click="delByIds(record.id)">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
||||
<!-- <a-divider v-if='!isShowModel' type='vertical' />-->
|
||||
<!-- <a v-if='editEnabel && !isShowModel' @click='handleEdit(record)'>编辑</a>-->
|
||||
<a-divider v-if='!isShowModel' type='vertical' />
|
||||
<a type='danger' v-if='!isShowModel' @click='delByIds(record.id)'>删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<repair-modal ref="modal" @ok="handleOk" />
|
||||
</s-table>
|
||||
<repair-modal ref='modal' @success='handleOk' />
|
||||
|
||||
<a-modal v-model="visible" title="导入工单">
|
||||
<div style="display: flex">
|
||||
<a-modal v-model='visible' title='导入工单'>
|
||||
<div style='display: flex'>
|
||||
<a-upload
|
||||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
@change="customChange"
|
||||
:customRequest="customRequest">
|
||||
<a-button type="primary">导入工单</a-button>
|
||||
accept='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel'
|
||||
@change='customChange'
|
||||
:customRequest='customRequest'>
|
||||
<a-button type='primary'>导入工单</a-button>
|
||||
</a-upload>
|
||||
</div>
|
||||
|
||||
</a-modal>
|
||||
</a-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -162,6 +162,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dateRange: [],
|
||||
isShowModel: false, // 是否为查看模式,查看模式下仅允许查看列表、查看详情
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
@ -179,11 +180,28 @@ export default {
|
||||
// 高级搜索 展开/关闭
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
loadData: [],
|
||||
queryParam: {
|
||||
'type': 'all',
|
||||
'explain': '',
|
||||
'sn': '',
|
||||
'typeId': '',
|
||||
'deviceId': '',
|
||||
'status': '',
|
||||
'repairLevel': '',
|
||||
'beginTime': '',
|
||||
'endTime': '',
|
||||
'evalService': '',
|
||||
'timeout': '',
|
||||
'remark': '',
|
||||
'name': ''
|
||||
},
|
||||
// loadData: [],
|
||||
typeList: [],
|
||||
deviceList: [],
|
||||
repairLevelOptions: [{
|
||||
value: '',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: '一级',
|
||||
label: '一级'
|
||||
}, {
|
||||
@ -195,6 +213,9 @@ export default {
|
||||
}
|
||||
],
|
||||
evalOptions: [{
|
||||
value: '',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '好评'
|
||||
}, {
|
||||
@ -206,6 +227,9 @@ export default {
|
||||
}
|
||||
],
|
||||
remarkOption: [{
|
||||
value: '',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 'no',
|
||||
label: '普通报修'
|
||||
}, {
|
||||
@ -214,6 +238,9 @@ export default {
|
||||
}
|
||||
],
|
||||
options: [{
|
||||
value: 'all',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 'wait',
|
||||
label: '待派单'
|
||||
}, {
|
||||
@ -227,13 +254,13 @@ export default {
|
||||
label: '处理中'
|
||||
}, {
|
||||
value: 'evaling',
|
||||
label: '已完成,待评价'
|
||||
}, {
|
||||
value: 'invalid',
|
||||
label: '无效申请'
|
||||
label: '待评价'
|
||||
}, {
|
||||
value: 'evaled',
|
||||
label: '已评价'
|
||||
}, {
|
||||
value: 'invalid',
|
||||
label: '无效申请'
|
||||
}
|
||||
],
|
||||
// 表头
|
||||
@ -243,13 +270,17 @@ export default {
|
||||
dataIndex: 'sn'
|
||||
},
|
||||
{
|
||||
title: '故障类别',
|
||||
title: '故障类型',
|
||||
dataIndex: 'typeName'
|
||||
},
|
||||
{
|
||||
title: '故障子类',
|
||||
dataIndex: 'deviceName'
|
||||
},
|
||||
{
|
||||
title: '故障等级',
|
||||
dataIndex: 'repairLevel'
|
||||
},
|
||||
{
|
||||
title: '报修来源',
|
||||
dataIndex: 'remark',
|
||||
@ -260,10 +291,6 @@ export default {
|
||||
dataIndex: 'status',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
},
|
||||
{
|
||||
title: '故障等级',
|
||||
dataIndex: 'repairLevel'
|
||||
},
|
||||
{
|
||||
title: '报修人',
|
||||
dataIndex: 'name'
|
||||
@ -281,9 +308,38 @@ export default {
|
||||
}
|
||||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
// loadData: parameter => {
|
||||
loadData: parameter => {
|
||||
if (this.$route.query.repairUserId != null) {
|
||||
return oneWorkerList(Object.assign(parameter, { workerId: this.$route.query.repairUserId }))
|
||||
} else if (this.$route.query.floorId != null) {
|
||||
return oneFloorList(Object.assign(parameter, { floorerId: this.$route.query.floorId }))
|
||||
} else if (this.$route.query.floorCreateId != null) {
|
||||
return oneFloorCreateList(Object.assign(parameter, { floorerId: this.$route.query.floorCreateId }))
|
||||
} else {
|
||||
const data = {
|
||||
'role': 7,
|
||||
'type': this.queryParam.type,
|
||||
'repair': {
|
||||
'explain': this.queryParam.explain,
|
||||
'sn': this.queryParam.sn,
|
||||
'typeId': this.queryParam.typeId,
|
||||
'deviceId': this.queryParam.deviceId,
|
||||
'status': this.queryParam.status,
|
||||
'repairLevel': this.queryParam.repairLevel,
|
||||
'beginTime': this.queryParam.startTime,
|
||||
'endTime': this.queryParam.endTime,
|
||||
'evalService': this.queryParam.evalService,
|
||||
'timeout': this.queryParam.timeout,
|
||||
'remark': this.queryParam.remark,
|
||||
'name': this.queryParam.name
|
||||
}
|
||||
}
|
||||
return getRepairList(Object.assign(parameter, data))
|
||||
}
|
||||
// return getRepairList(Object.assign(parameter, this.queryParam))
|
||||
// },
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
addEnable: checkPermission('admin:repair:add'),
|
||||
editEnabel: checkPermission('admin:repair:edit'),
|
||||
removeEnable: checkPermission('admin:repair:list')
|
||||
@ -297,7 +353,7 @@ export default {
|
||||
'3': '重新派单',
|
||||
'5': '已派单',
|
||||
'7': '处理中',
|
||||
'9': '已完成,待评价',
|
||||
'9': '待评价',
|
||||
'11': '无效申请',
|
||||
'13': '已评价'
|
||||
}
|
||||
@ -305,22 +361,52 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log('this.$route.query', this.$route.query.evalService)
|
||||
// console.log('this.$route.query', this.$route.query.evalService)
|
||||
// 获取三个查询参数
|
||||
if (this.$route.query.evalService != null) {
|
||||
this.queryParam.evalService = this.$route.query.evalService
|
||||
}
|
||||
this.queryParam.timeout = this.$route.query.timeout
|
||||
this.selectRepairList()
|
||||
this.queryParam.type = this.$route.query.status || 'all'
|
||||
// this.selectRepairList()
|
||||
// 页面部分隐藏
|
||||
if (this.$route.query.repairUserId != null || this.$route.query.floorId != null || this.$route.query.floorCreateId != null) {
|
||||
// 从绩效入口进入,不允许新建、查询、编辑、删除等操作
|
||||
this.isShowModel = true
|
||||
}
|
||||
this.selectType()
|
||||
},
|
||||
methods: {
|
||||
fatherMethod(val) {
|
||||
console.log('val实际就是子组件传过来的childParam')
|
||||
},
|
||||
customChange() {
|
||||
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
reset() {
|
||||
this.queryParam = {}
|
||||
this.queryParam.typeId = ''
|
||||
this.selectRepairList()
|
||||
this.queryParam = {
|
||||
'type': 'all',
|
||||
'explain': '',
|
||||
'sn': '',
|
||||
'typeId': '',
|
||||
'deviceId': '',
|
||||
'status': '',
|
||||
'repairLevel': '',
|
||||
'beginTime': '',
|
||||
'endTime': '',
|
||||
'evalService': '',
|
||||
'timeout': '',
|
||||
'remark': '',
|
||||
'name': ''
|
||||
}
|
||||
this.handleOk(true)
|
||||
// this.queryParam = {}
|
||||
// this.queryParam.typeId = ''
|
||||
// this.selectRepairList()
|
||||
},
|
||||
customRequest(file) {
|
||||
// file 是上传的文件 其内容会在放在下面截图中
|
||||
@ -390,67 +476,43 @@ export default {
|
||||
// 查询分类
|
||||
selectType() {
|
||||
getRepairTypeList().then(res => {
|
||||
this.typeList = res.rows
|
||||
let _all = []
|
||||
_all.push({
|
||||
name: '全部', id: ''
|
||||
})
|
||||
_all = _all.concat(res.rows)
|
||||
this.typeList = _all
|
||||
// 给设备子类赋值,默认全部为空
|
||||
this.deviceList = [{
|
||||
name: '全部', id: ''
|
||||
}]
|
||||
})
|
||||
},
|
||||
// 查询设备
|
||||
selectDevice(typeId) {
|
||||
if (typeId === '') {
|
||||
// 全部的情况
|
||||
this.deviceList = [{
|
||||
name: '全部', id: ''
|
||||
}]
|
||||
this.queryParam.deviceId = ''
|
||||
} else {
|
||||
// ajax获取
|
||||
getRepairDeviceList({ 'typeId': typeId }).then(res => {
|
||||
this.deviceList = res.rows
|
||||
let _all = []
|
||||
_all.push({
|
||||
name: '全部', id: ''
|
||||
})
|
||||
_all = _all.concat(res.rows)
|
||||
this.deviceList = _all
|
||||
this.queryParam.deviceId = ''
|
||||
})
|
||||
}
|
||||
this.queryParam.typeId = typeId
|
||||
|
||||
},
|
||||
getDeviceName(deviceId) {
|
||||
this.queryParam.deviceId = deviceId
|
||||
},
|
||||
// 查询工单列表
|
||||
selectRepairList () {
|
||||
let type = 'all'
|
||||
if (this.queryParam.type != null) {
|
||||
type = this.queryParam.type
|
||||
}
|
||||
if (this.$route.query.status != null) {
|
||||
type = this.$route.query.status
|
||||
}
|
||||
|
||||
if (this.$route.query.repairUserId != null) {
|
||||
oneWorkerList({ workerId: this.$route.query.repairUserId }).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else if (this.$route.query.floorId != null) {
|
||||
oneFloorList({ floorerId: this.$route.query.floorId }).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else if (this.$route.query.floorCreateId != null) {
|
||||
oneFloorCreateList({ floorerId: this.$route.query.floorCreateId }).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else {
|
||||
|
||||
let datas = {
|
||||
'role': 7,
|
||||
'type': type,
|
||||
'repair': {
|
||||
'explain': this.queryParam.explain,
|
||||
'sn': this.queryParam.sn,
|
||||
'typeId': this.queryParam.typeId,
|
||||
'deviceId': this.queryParam.deviceId,
|
||||
'status': this.queryParam.status,
|
||||
'repairLevel': this.queryParam.repairLevel,
|
||||
'beginTime': this.queryParam.startTime,
|
||||
'endTime': this.queryParam.endTime,
|
||||
'evalService': this.queryParam.evalService,
|
||||
'timeout': this.queryParam.timeout,
|
||||
'remark': this.queryParam.remark,
|
||||
'name': this.queryParam.name
|
||||
}
|
||||
}
|
||||
getRepairList(datas).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
}
|
||||
},
|
||||
delByIds(ids) {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
@ -462,9 +524,9 @@ export default {
|
||||
onOk() {
|
||||
delRepair({ id: ids }).then(res => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.code)
|
||||
message.success('删除成功')
|
||||
_this.selectRepairList()
|
||||
_this.handleOk()
|
||||
// _this.selectRepairList()
|
||||
} else {
|
||||
message.error(res.msg)
|
||||
}
|
||||
@ -483,9 +545,10 @@ export default {
|
||||
handleEdit(record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
handleOk(status) {
|
||||
status = status || false
|
||||
this.$refs.table.refresh(status)
|
||||
// console.log('handleSaveOk')
|
||||
},
|
||||
handleComplete(id) {
|
||||
const _this = this
|
||||
|
@ -1,70 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 维修进度 -->
|
||||
<a-card :bordered="false" title="维修进度">
|
||||
<a-steps :current="mdl.status" progressDot>
|
||||
<a-card :bordered='false' title='维修进度'>
|
||||
<a-steps :current="nowStep" progressDot style='width: 80%;margin: 0px auto'>
|
||||
<a-step>
|
||||
<template v-slot:title>
|
||||
<span>待分配</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 1">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.createBy }}
|
||||
<template v-slot:description v-if='mdl.status >= 1'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.createTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<a-step v-if='mdl.status != 11'>
|
||||
<template v-slot:title>
|
||||
<span>待处理</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 5">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<template v-slot:description v-if='mdl.status >= 5'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<a-step v-if='mdl.status != 11'>
|
||||
<template v-slot:title>
|
||||
<span>处理中</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 7">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<template v-slot:description v-if='mdl.status >= 7'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<a-step v-if='mdl.status != 11'>
|
||||
<template v-slot:title>
|
||||
<span>已完成</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 9">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<template v-slot:description v-if='mdl.status >= 9'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<a-step v-if='mdl.status == 11'>
|
||||
<template v-slot:title>
|
||||
<span>已废弃</span>
|
||||
<span>已关闭</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status == 11">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<template v-slot:description v-if='mdl.status == 11'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<a-step v-if='mdl.status != 11'>
|
||||
<template v-slot:title>
|
||||
<span>已评价</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status == 13">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<template v-slot:description v-if='mdl.status == 13'>
|
||||
<div class='antd-pro-pages-profile-advanced-style-stepDescription'>
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -72,70 +66,89 @@
|
||||
</a-steps>
|
||||
</a-card>
|
||||
<!-- 维修信息 -->
|
||||
<a-card style="margin-top: 10px" :bordered="false" title="报修信息">
|
||||
<a-card style='margin-top: 10px' :bordered='false' title='报修信息'>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label="维修单号">{{ mdl.sn }}</a-descriptions-item>
|
||||
<a-descriptions-item label="设备类型">{{ mdl.typeName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="设备名称">{{ mdl.deviceName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="发起人">{{ mdl.name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="电话">{{ mdl.phone }}</a-descriptions-item>
|
||||
<a-descriptions-item label="故障等级">{{ mdl.repairLevel }}</a-descriptions-item>
|
||||
<a-descriptions-item label="故障类型">{{ mdl.failureTypeName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="报修地点">{{ mdl.address }}</a-descriptions-item>
|
||||
<a-descriptions-item label="楼层">{{ mdl.floor }}</a-descriptions-item>
|
||||
<a-descriptions-item label="门牌号">{{ mdl.room }}</a-descriptions-item>
|
||||
<a-descriptions-item label="派单员">{{ mdl.perUserName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="维修人">{{ mdl.repairUserName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="报修时间">{{ mdl.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">{{ mdl.statusName }}</a-descriptions-item>
|
||||
<a-descriptions-item label='维修单号'>{{ mdl.sn }}</a-descriptions-item>
|
||||
<a-descriptions-item label='报修人姓名'>{{ mdl.name }}</a-descriptions-item>
|
||||
<a-descriptions-item label='联系电话'>{{ mdl.phone }}</a-descriptions-item>
|
||||
<a-descriptions-item label='故障类型'>{{ mdl.typeName }} / {{ mdl.deviceName }}</a-descriptions-item>
|
||||
<a-descriptions-item label='报修地点'>{{ mdl.address }} / {{ mdl.floor }}</a-descriptions-item>
|
||||
<a-descriptions-item label='门牌号(地点)'>{{ mdl.room }}</a-descriptions-item>
|
||||
<a-descriptions-item label='故障描述'>{{ mdl.explain }}</a-descriptions-item>
|
||||
<a-descriptions-item label='报修时间'>{{ mdl.createTime }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-card>
|
||||
<a-card style="margin-top: 10px" :bordered="false" title="维修信息">
|
||||
<div style="display: flex;">
|
||||
<span style="margin:40px">
|
||||
报修图片
|
||||
</span>
|
||||
<div style="margin-bottom: 50px; margin-left: 30px" class="clearfix">
|
||||
<div class="fileList">
|
||||
<video class="file video" :src="item.url" v-for="item in files.voice"
|
||||
controls/>
|
||||
<img class="file image" :src="item.url" v-for="item in files.repair"
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='报修图片'>
|
||||
<div style='margin-left: 30px' class='clearfix'>
|
||||
<div class='fileList'>
|
||||
<img @click='openFile($event)' class='file image' :src='item.url' v-for='item in files.repair'
|
||||
v-if="item.fileType== 'image'" />
|
||||
<video class="file video" :src="item.url" v-for="item in files.repair"
|
||||
<video class='file video' :src='item.url' v-for='item in files.repair'
|
||||
v-if="item.fileType== 'video'" controls />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<a-descriptions layout="vertical" bordered>
|
||||
<a-descriptions-item label="解决方案">
|
||||
{{ mdl.solution }}
|
||||
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions layout="vertical" bordered>
|
||||
<a-descriptions-item label="故障原因">
|
||||
{{ mdl.cause }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
<a-card style="margin-top: 10px" :bordered="false" title="评价">
|
||||
<a-card style='margin-top: 10px' :bordered='false' title='派单信息'>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label="服务评价">
|
||||
<a-rate v-model="mdl.evalService" disabled />
|
||||
<a-descriptions-item label='派单员'>{{ mdl.perUserName }}</a-descriptions-item>
|
||||
<a-descriptions-item label='故障等级'>{{ mdl.repairLevel }}</a-descriptions-item>
|
||||
<a-descriptions-item label='状态'>{{ mdl.statusName }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-card>
|
||||
<a-card v-if='mdl.status >= 7 && mdl.status != 11' style='margin-top: 10px' :bordered='false' title='维修反馈'>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='维修员'>{{ mdl.repairUserName }}</a-descriptions-item>
|
||||
<a-descriptions-item label='故障类型'>{{ mdl.failureTypeName }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='故障原因'>{{ mdl.cause }}</a-descriptions-item>
|
||||
<a-descriptions-item label='解决方案'>{{ mdl.solution }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='反馈图片'>
|
||||
<div style='margin-left: 30px' class='clearfix'>
|
||||
<div class='fileList'>
|
||||
<img @click='openFile($event)' class='file image' :src='item.url' v-for='item in files.feedback'
|
||||
v-if="item.fileType== 'image'" />
|
||||
<video class='file video' :src='item.url' v-for='item in files.feedback'
|
||||
v-if="item.fileType== 'video'" controls />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="意见建议">
|
||||
{{ mdl.remark }}
|
||||
</a-descriptions>
|
||||
</a-card>
|
||||
<a-card v-if='mdl.status >= 9 && mdl.status != 11' style='margin-top: 10px' :bordered='false' title='服务评价'>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='服务评价'>
|
||||
<a-rate v-model='mdl.evalService' disabled />
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label='留言'>
|
||||
{{ mdl.feedback }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label='评价图片'>
|
||||
<div style='margin-left: 30px' class='clearfix'>
|
||||
<div class='fileList'>
|
||||
<img @click='openFile($event)' class='file image' :src='item.url' v-for='item in files.eval'
|
||||
v-if="item.fileType== 'image'" />
|
||||
<video class='file video' :src='item.url' v-for='item in files.eval'
|
||||
v-if="item.fileType== 'video'" controls />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-card>
|
||||
|
||||
<!-- 操作 -->
|
||||
<a-card style="margin-top: 10px" :bordered="false" title="维修日志">
|
||||
<a-table rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="false">
|
||||
<span slot="type" slot-scope="text">
|
||||
<a-card style='margin-top: 10px' :bordered='false' title='维修日志'>
|
||||
<a-table rowKey='id' :columns='columns' :dataSource='dataSource' :pagination='false'>
|
||||
<span slot='type' slot-scope='text'>
|
||||
{{ text | typeFilter }}
|
||||
</span>
|
||||
</a-table>
|
||||
@ -191,7 +204,8 @@ export default {
|
||||
},
|
||||
// form
|
||||
form: this.$form.createForm(this),
|
||||
files: {}
|
||||
files: {},
|
||||
nowStep: 0
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@ -201,7 +215,7 @@ export default {
|
||||
'3': '重新派单',
|
||||
'5': '已派单',
|
||||
'7': '处理中',
|
||||
'9': '已完成,待评价',
|
||||
'9': '待评价',
|
||||
'11': '已关闭',
|
||||
'13': '已评价'
|
||||
}
|
||||
@ -218,7 +232,7 @@ export default {
|
||||
'3': '重新派单',
|
||||
'5': '已派单',
|
||||
'7': '处理中',
|
||||
'9': '已完成,待评价',
|
||||
'9': '待评价',
|
||||
'11': '已关闭',
|
||||
'13': '已评价'
|
||||
}
|
||||
@ -231,6 +245,26 @@ export default {
|
||||
'id': repairId
|
||||
}
|
||||
getRepair(data).then(record => {
|
||||
const status = record.repair.status
|
||||
console.log(status)
|
||||
if (status == '1' || status == '3') {
|
||||
// 待分配或重新分配
|
||||
this.nowStep = 0
|
||||
} else if (status == '5') {
|
||||
// 已派单
|
||||
this.nowStep = 1
|
||||
} else if (status == '7') {
|
||||
this.nowStep = 2
|
||||
} else if (status == '9') {
|
||||
this.nowStep = 3
|
||||
} else if (status == '13') {
|
||||
this.nowStep = 4
|
||||
}
|
||||
if (status == '11') {
|
||||
// 已关闭,此时只有已关闭
|
||||
this.nowStep = 1
|
||||
}
|
||||
console.log(this.nowStep)
|
||||
this.mdl = Object.assign(record.repair)
|
||||
this.mdl.statusName = this.typeFilterRQ(this.mdl.status)
|
||||
// 维修记录
|
||||
@ -242,12 +276,21 @@ export default {
|
||||
item.fileType = this.checkMediaType(item.url)
|
||||
return item
|
||||
})
|
||||
record.files.feedback = record.files.feedback.map((item) => {
|
||||
item.url = process.env.VUE_APP_MODEL_BASE_URL + item.url
|
||||
item.fileType = this.checkMediaType(item.url)
|
||||
return item
|
||||
})
|
||||
record.files.eval = record.files.eval.map((item) => {
|
||||
item.url = process.env.VUE_APP_MODEL_BASE_URL + item.url
|
||||
item.fileType = this.checkMediaType(item.url)
|
||||
return item
|
||||
})
|
||||
record.files.voice = record.files.voice.map((item) => {
|
||||
item.url = process.env.VUE_APP_MODEL_BASE_URL + item.url
|
||||
return item
|
||||
})
|
||||
this.files = record.files
|
||||
console.log(this.files.voice)
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -301,18 +344,13 @@ export default {
|
||||
},
|
||||
rollback() {
|
||||
this.$router.push('/repair/repairList')
|
||||
},
|
||||
openFile(e) {
|
||||
window.open(e.target.currentSrc)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBase64 (file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader()
|
||||
reader.readAsDataURL(file)
|
||||
reader.onload = () => resolve(reader.result)
|
||||
reader.onerror = error => reject(error)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -1,136 +1,138 @@
|
||||
<template>
|
||||
<a-modal
|
||||
title="指派维修员"
|
||||
style="top: 20px;"
|
||||
:width="1200"
|
||||
v-model="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleSubmit"
|
||||
title='新建工单'
|
||||
style='top: 20px;'
|
||||
:width='1200'
|
||||
v-model='visible'
|
||||
:confirmLoading='confirmLoading'
|
||||
@ok='handleSubmit'
|
||||
>
|
||||
<a-form :form="form">
|
||||
<a-form-item style="display:none">
|
||||
<a-form :form='form'>
|
||||
|
||||
<a-form-item style='display:none'>
|
||||
<a-input v-decorator="['id']" />
|
||||
</a-form-item>
|
||||
|
||||
<a-card :bordered='true' title='工单详情'>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="所属分类">
|
||||
<a-select v-decorator="['typeId', {rules: [{ required: true, message: '请选择所属分类' }]}]"
|
||||
@change="selectDevice">
|
||||
<a-select-option v-for="item in typeList" :key="item.id" :value="item.id">{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='报修人姓名'>
|
||||
<a-input placeholder=''
|
||||
v-decorator="['name', {rules: [{ required: true, message: '请输入报修人姓名' }]}]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修设备">
|
||||
<a-select v-decorator="['deviceId', {rules: [{ required: true, message: '请选择所属设备' }]}]"
|
||||
@change="getDeviceName">
|
||||
<a-select-option v-for="item in deviceList" :key="item.id" :value="item.id">{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修人">
|
||||
<a-input placeholder="报修人"
|
||||
v-decorator="['name', {rules: [{ required: true, message: '请选择报修人' }]}]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="联系电话">
|
||||
<a-input placeholder="联系电话"
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='联系电话'>
|
||||
<a-input placeholder=''
|
||||
v-decorator="['phone', {rules: [{ required: true, message: '请输入联系电话' }]}]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="维修负责人">
|
||||
<a-select v-decorator="['repairUserId']"
|
||||
@change="selectUser">
|
||||
<a-select-option v-for="item in userList" :key="item.userId">{{ item.userName }}</a-select-option>
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='故障类型'>
|
||||
<a-select v-decorator="['typeId', {rules: [{ required: true, message: '请选择故障类型' }]}]"
|
||||
@change='selectDevice'>
|
||||
<a-select-option v-for='item in typeList' :key='item.id' :value='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修地点">
|
||||
<a-select v-decorator="['addressId', {rules: [{ required: true, message: '请选择报修地点' }]}]"
|
||||
@change="selectRoomList">
|
||||
<a-select-option v-for="item in addressList" :key="item.id" :value="item.id">{{ item.name }}
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='故障子类'>
|
||||
<a-select v-decorator="['deviceId', {rules: [{ required: true, message: '请选择故障子类' }]}]"
|
||||
@change='getDeviceName'>
|
||||
<a-select-option v-for='item in deviceList' :key='item.id' :value='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="楼层">
|
||||
<a-select v-decorator="['floorId', {rules: [{ required: true, message: '请选择详细地址' }]}]"
|
||||
@change="selectFloorName">
|
||||
<a-select-option v-for="item in roomList" :key="item.id" :value="item.id">{{ item.name }}
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='故障地点'>
|
||||
<a-select v-decorator="['addressId', {rules: [{ required: true, message: '请选择故障地点' }]}]"
|
||||
@change='selectRoomList'>
|
||||
<a-select-option v-for='item in addressList' :key='item.id' :value='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="门牌号(地点)">
|
||||
<a-input placeholder="门牌号"
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='楼层'>
|
||||
<a-select v-decorator="['floorId', {rules: [{ required: true, message: '请选择楼层' }]}]"
|
||||
@change='selectFloorName'>
|
||||
<a-select-option v-for='item in roomList' :key='item.id' :value='item.id'>{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='门牌号(地点)'>
|
||||
<a-input placeholder='门牌号'
|
||||
v-decorator="['room']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="故障类型">
|
||||
<a-select v-decorator="['failureTypeId' ]"
|
||||
>
|
||||
<a-select-option v-for="item in failureTypeList" :key="item.id">{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="故障描述">
|
||||
<a-textarea placeholder="故障描述" v-decorator="['explain']" />
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='故障描述'>
|
||||
<a-textarea placeholder='故障描述'
|
||||
v-decorator="['explain', {rules: [{ required: true, message: '请填写故障描述' }]}]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="10">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修图片">
|
||||
<a-col :span='20'>
|
||||
<a-form-item :labelCol='labelColFile' :wrapperCol='wrapperCol' label='报修图片' style='margin-bottom: 0'>
|
||||
<a-upload
|
||||
v-decorator="['repairImages']"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:file-list="fileList"
|
||||
:action="uploadUrl"
|
||||
:headers="headers"
|
||||
@preview="handlePreview"
|
||||
@change="handleChangeFileList"
|
||||
list-type='picture-card'
|
||||
class='avatar-uploader'
|
||||
:file-list='fileList'
|
||||
:action='uploadUrl'
|
||||
:headers='headers'
|
||||
@preview='handlePreview'
|
||||
@change='handleChangeFileList'
|
||||
>
|
||||
<div v-if="fileList.length < 4">
|
||||
<a-icon type="plus" />
|
||||
<div class="ant-upload-text"> 上传</div>
|
||||
<div v-if='fileList.length < 4'>
|
||||
<a-icon type='plus' />
|
||||
<div class='ant-upload-text'> 上传</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
|
||||
<img style="width: 100%" :src="previewImage" />
|
||||
<a-modal :visible='previewVisible' :footer='null' @cancel='handleCancel'>
|
||||
<img style='width: 100%' :src='previewImage' />
|
||||
</a-modal>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
<a-card :bordered='true' title='派单(选择维修人后即跳过小程序派单过程)' style='margin-top: 10px'>
|
||||
<a-row>
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='维修人' style='margin-bottom: 0'>
|
||||
<a-select v-decorator="['repairUserId']" @change='selectUser'>
|
||||
<a-select-option v-for='item in userList' :key='item.userId'>{{ item.userName }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span='10'>
|
||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='故障等级' style='margin-bottom: 0'>
|
||||
<a-select v-decorator="['repairLevel']" @change='selectLevel'>
|
||||
<a-select-option v-for='(item, index) in repairLevelOp' :key='index'>{{ item }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script>
|
||||
import { review } from '@/api/admin/repair'
|
||||
import { getRepair, review } from '@/api/admin/repair'
|
||||
import pick from 'lodash.pick'
|
||||
import { getUserList } from '@/api/system'
|
||||
import { getRepairTypeList, selectWorkerIdByTypeId } from '@/api/admin/repair/repairDeviceType'
|
||||
import { getRepairDeviceList } from '@/api/admin/repair/repairDevice'
|
||||
import { getRepairFailureTypeList } from '@/api/admin/repair/repairFailureType'
|
||||
|
||||
import { getRepairAddressList } from '@/api/admin/repair/repairAddress'
|
||||
import { getRepairRoomList } from '@/api/admin/repair/repairAddressFloor'
|
||||
@ -138,6 +140,7 @@ import { getRepairRoomList } from '@/api/admin/repair/repairAddressFloor'
|
||||
import moment from 'moment'
|
||||
import storage from 'store'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { exportRepair } from '@/api/admin/repair/repairIo'
|
||||
|
||||
const dateFormat = 'YYYY-MM-DD HH:mm:ss'
|
||||
|
||||
@ -152,16 +155,27 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 8 }
|
||||
},
|
||||
labelColFile: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
uploadUrl: process.env.VUE_APP_API_BASE_URL + '/admin/repairAttach/upload?operate=repair',
|
||||
uploadUrl: process.env.VUE_APP_API_BASE_URL + '/app/repairAttach/upload?a=a&operate=repair',
|
||||
imageUrl: '',
|
||||
headers: {
|
||||
Authorization: 'Bearer ' + storage.get(ACCESS_TOKEN)
|
||||
},
|
||||
fileList: [],
|
||||
fileList: [
|
||||
{
|
||||
uid: '1',
|
||||
name: 'Emilia',
|
||||
status: 'done',
|
||||
url: 'http://boot.demo.7326it.club/storage/2020021200028.jpg'
|
||||
}
|
||||
],
|
||||
confirmLoading: false,
|
||||
mdl: {},
|
||||
workerData: [],
|
||||
@ -175,7 +189,10 @@ export default {
|
||||
form: this.$form.createForm(this),
|
||||
typeList: [],
|
||||
deviceList: [],
|
||||
failureTypeList: [],
|
||||
repairLevel: '',
|
||||
repairLevelOp: [
|
||||
'一级', '二级', '三级'
|
||||
],
|
||||
userList: [],
|
||||
addressList: [],
|
||||
roomList: [],
|
||||
@ -194,7 +211,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.selectType()
|
||||
this.selectFailureType()
|
||||
// this.selectFailureType()
|
||||
this.getRepairAddressList()
|
||||
},
|
||||
methods: {
|
||||
@ -205,9 +222,22 @@ export default {
|
||||
})
|
||||
},
|
||||
selectUser(id) {
|
||||
this.repairLevel = this.repairLevelOp[0]
|
||||
},
|
||||
selectLevel(index) {
|
||||
this.repairLevel = this.repairLevelOp[index]
|
||||
},
|
||||
// 根据分类id 查询对应设备
|
||||
selectDevice (typeId) {
|
||||
selectDevice(typeId, record) {
|
||||
record = record || ''
|
||||
if (record === '') {
|
||||
record = {
|
||||
deviceId: '',
|
||||
deviceName: '',
|
||||
repairUserId: '',
|
||||
repairUserName: ''
|
||||
}
|
||||
}
|
||||
let type = this.typeList.find(item => item.id == typeId)
|
||||
this.typeId = type.id
|
||||
this.typeName = type.name
|
||||
@ -215,13 +245,20 @@ export default {
|
||||
typeId
|
||||
}).then(res => {
|
||||
this.deviceList = res.rows
|
||||
this.deviceName = record.deviceName
|
||||
this.deviceId = record.deviceId
|
||||
// 设置默认值
|
||||
this.form.setFieldsValue({ deviceId: record.deviceId })
|
||||
})
|
||||
selectWorkerIdByTypeId({ typeId }).then(res => {
|
||||
this.userList = res.data
|
||||
let _noUser = []
|
||||
_noUser.push({ userId: '', userName: '暂不派单' })
|
||||
this.userList = _noUser.concat(res.data)
|
||||
this.userList = this.userList.map(item => {
|
||||
item.repairUserId = item.userId
|
||||
return item
|
||||
})
|
||||
this.form.setFieldsValue({ repairUserId: record.repairUserId })
|
||||
})
|
||||
},
|
||||
getDeviceName(deviceId) {
|
||||
@ -229,29 +266,39 @@ export default {
|
||||
this.deviceName = device.name
|
||||
this.deviceId = device.id
|
||||
},
|
||||
selectFailureType () {
|
||||
getRepairFailureTypeList().then(res => {
|
||||
this.failureTypeList = res.rows
|
||||
})
|
||||
},
|
||||
// selectFailureType () {
|
||||
// getRepairFailureTypeList().then(res => {
|
||||
// this.failureTypeList = res.rows
|
||||
// })
|
||||
// },
|
||||
getRepairAddressList() {
|
||||
getRepairAddressList().then(res => {
|
||||
this.addressList = res.rows
|
||||
})
|
||||
},
|
||||
|
||||
selectRoomList (roomId) {
|
||||
console.log('selectRoomList', roomId)
|
||||
selectRoomList(roomId, record) {
|
||||
record = record || ''
|
||||
if (record === '') {
|
||||
record = {
|
||||
floor: record.floor,
|
||||
floorId: record.floorId
|
||||
}
|
||||
}
|
||||
// console.log('selectRoomList', roomId)
|
||||
let room = this.addressList.find(item => item.id == roomId)
|
||||
getRepairRoomList({ 'addressId': roomId }).then(res => {
|
||||
this.roomList = res.rows
|
||||
})
|
||||
this.address = room.name
|
||||
this.addressId = room.id
|
||||
getRepairRoomList({ 'addressId': roomId }).then(res => {
|
||||
this.roomList = res.rows
|
||||
this.floor = record.floor
|
||||
this.floorId = record.floorId
|
||||
// 设置默认值
|
||||
this.form.setFieldsValue({ floorId: record.floorId })
|
||||
})
|
||||
},
|
||||
selectFloorName(floorId) {
|
||||
let floor = this.roomList.find(item => item.id == floorId)
|
||||
|
||||
this.floor = floor.name
|
||||
this.floorId = floor.id
|
||||
},
|
||||
@ -281,21 +328,42 @@ export default {
|
||||
this.edit({ id: 0 })
|
||||
},
|
||||
edit(record) {
|
||||
console.log(record)
|
||||
if (record.id !== 0) {
|
||||
this.selectDevice(record.typeId)
|
||||
this.selectRoomList(record.addressId)
|
||||
}
|
||||
|
||||
this.mdl = Object.assign(record)
|
||||
this.mdl.typeList = this.typeList
|
||||
|
||||
// 获取信息
|
||||
getRepair({ id: record.id }).then(res => {
|
||||
this.selectDevice(record.typeId, {
|
||||
deviceId: record.deviceId,
|
||||
deviceName: record.deviceName,
|
||||
repairUserId: record.repairUserId ? record.repairUserId : ''
|
||||
})
|
||||
this.selectRoomList(record.addressId, { floor: record.floor, floorId: record.floorId })
|
||||
let info = res.repair
|
||||
this.mdl = Object.assign(info)
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'sn', 'repairName', 'typeList', 'repairLevel', 'typeId', 'typeName', 'deviceId', 'deviceName',
|
||||
'name', 'phone', 'addressId', 'address', 'floorId', 'floor', 'repairUserId', 'room', 'explain', 'perUserId', 'perUserName', 'preDate', 'cause',
|
||||
'solution', 'failureTypeId', 'failureTypeName'))
|
||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'sn', 'repairLevel', 'typeId', 'deviceId',
|
||||
'name', 'phone', 'addressId', 'floorId', 'repairUserId', 'room', 'explain'))
|
||||
})
|
||||
// 填充上传的图片
|
||||
const file = res.files.repair
|
||||
let _fileList = []
|
||||
for (let key in file) {
|
||||
let eachFile = {
|
||||
uid: file[key].id,
|
||||
name: file[key].url,
|
||||
status: 'done',
|
||||
url: process.env.VUE_APP_MODEL_BASE_URL + file[key].url
|
||||
}
|
||||
_fileList.push(eachFile)
|
||||
this.files.push(file[key].id)
|
||||
}
|
||||
this.fileList = _fileList
|
||||
})
|
||||
} else {
|
||||
this.fileList = []
|
||||
this.files = []
|
||||
this.visible = true
|
||||
}
|
||||
},
|
||||
onChange(dates, dateStrings) {
|
||||
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1])
|
||||
@ -305,16 +373,13 @@ export default {
|
||||
},
|
||||
handleSubmit(e) {
|
||||
e.preventDefault()
|
||||
console.log(this.files)
|
||||
|
||||
const uniqueArr = this.files.filter((value, index, self) => {
|
||||
return self.indexOf(value) === index
|
||||
})
|
||||
console.log()
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
console.log('Received values of form: ', values)
|
||||
this.confirmLoading = true
|
||||
|
||||
// this.confirmLoading = true
|
||||
values.beginDate = this.beginDate
|
||||
values.endDate = this.endDate
|
||||
values.typeName = this.typeName
|
||||
@ -325,23 +390,31 @@ export default {
|
||||
values.floorId = this.floorId
|
||||
values.address = this.address
|
||||
values.addressId = this.addressId
|
||||
if (values.repairUserId === '') {
|
||||
// 不选人,则不定等级
|
||||
this.repairLevel = ''
|
||||
this.repairUserId = ''
|
||||
}
|
||||
values.repairLevel = this.repairLevel
|
||||
const repairImages = []
|
||||
this.fileList.forEach((file, index) => {
|
||||
// 添加原来的
|
||||
if (file.hasOwnProperty('name') && file.hasOwnProperty('url') && file.hasOwnProperty('uid')) {
|
||||
repairImages.push({ 'name': file.name, 'url': file.name, 'uid': index })
|
||||
}
|
||||
if (file.status === 'done' && file.response.code === 0) {
|
||||
} else if (file.status === 'done' && file.response.code === 0) {
|
||||
const data = file.response
|
||||
repairImages.push({ 'name': data.fileName, 'url': data.fileName, 'uid': index })
|
||||
repairImages.push({ 'name': data.originalFilename, 'url': data.url, 'uid': index })
|
||||
}
|
||||
})
|
||||
// 多个图片
|
||||
values.repairImages = JSON.stringify(repairImages)
|
||||
console.log('Received values of form: ', values)
|
||||
review(values, uniqueArr).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
this.$emit('ok')
|
||||
this.$nextTick(() => {
|
||||
this.$emit('success')
|
||||
})
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
@ -358,7 +431,7 @@ export default {
|
||||
watch: {}
|
||||
}
|
||||
|
||||
function getBase64 (img, callback) {
|
||||
function getBase64FileList(img, callback) {
|
||||
const reader = new FileReader()
|
||||
reader.addEventListener('load', () => callback(reader.result))
|
||||
reader.readAsDataURL(img)
|
||||
|
@ -1,66 +1,125 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<a-tabs :active-key="tabKey" @change="callback">
|
||||
<a-tab-pane key="1" tab="全部信息">
|
||||
<a-table
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="workerData"
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-operator'>
|
||||
<a-button type='danger' icon='delete' @click='removeAll()'>清空消息</a-button>
|
||||
</div>
|
||||
<a-tabs :active-key='tabKey' @change='callback'>
|
||||
<a-tab-pane key='1' tab='全部信息' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableAll'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data='loadDataAll'
|
||||
>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleDelete(record.id)'>删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size="default"-->
|
||||
<!-- rowKey="id"-->
|
||||
<!-- :columns="columns"-->
|
||||
<!-- :data-source="workerData"-->
|
||||
<!-- >-->
|
||||
<!-- <span slot="name" slot-scope="text, record">-->
|
||||
<!-- <a-tag color="blue">-->
|
||||
<!-- 消息提示-->
|
||||
<!-- </a-tag>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="content" slot-scope="text, record">-->
|
||||
<!-- <a @click="toRepair(record.repairId)">{{ record.content }}</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="action" slot-scope="text, record">-->
|
||||
<!-- <a v-if="editEnabel" @click="handleDelete(record.id)">删除</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="未读通知" force-render>
|
||||
<a-table
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="noReadData"
|
||||
<a-tab-pane key='2' tab='未读通知' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableNew'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data='loadDataNew'
|
||||
>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleDelete(record.id)'>删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size='default'-->
|
||||
<!-- rowKey='id'-->
|
||||
<!-- :columns='columns'-->
|
||||
<!-- :data-source='noReadData'-->
|
||||
<!-- >-->
|
||||
<!-- <span slot='name' slot-scope='text, record'>-->
|
||||
<!-- <a-tag color='blue'>-->
|
||||
<!-- 消息提示-->
|
||||
<!-- </a-tag>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='content' slot-scope='text, record'>-->
|
||||
<!-- <a @click='toRepair(record.repairId)'>{{ record.content }}</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='action' slot-scope='text, record'>-->
|
||||
<!-- <a v-if='editEnabel' @click='handleDelete(record.id)'>删除</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="已读通知" force-render>
|
||||
<a-table
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="readData"
|
||||
<a-tab-pane key='3' tab='已读通知' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableRead'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data='loadDataRead'
|
||||
>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleDelete(record.id)'>删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size='default'-->
|
||||
<!-- rowKey='id'-->
|
||||
<!-- :columns='columns'-->
|
||||
<!-- :data-source='readData'-->
|
||||
<!-- >-->
|
||||
<!-- <span slot='name' slot-scope='text, record'>-->
|
||||
<!-- <a-tag color='blue'>-->
|
||||
<!-- 消息提示-->
|
||||
<!-- </a-tag>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='content' slot-scope='text, record'>-->
|
||||
<!-- <a @click='toRepair(record.repairId)'>{{ record.content }}</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='action' slot-scope='text, record'>-->
|
||||
<!-- <a v-if='editEnabel' @click='handleDelete(record.id)'>删除</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
@ -68,7 +127,7 @@
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { delRepairRemind, getRepairRemindList } from '@/api/admin/repair/repairRemind'
|
||||
import { clear, delRepairRemind, getRepairRemindList, readRepairRemind } from '@/api/admin/repair/repairRemind'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
|
||||
export default {
|
||||
@ -118,9 +177,18 @@ export default {
|
||||
}
|
||||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
// loadData: parameter => {
|
||||
loadDataAll: parameter => {
|
||||
return getRepairRemindList(parameter)
|
||||
},
|
||||
loadDataRead: parameter => {
|
||||
return getRepairRemindList(Object.assign(parameter, { isRead: 'already' }))
|
||||
// return getRepairList(Object.assign(parameter, this.queryParam))
|
||||
// },
|
||||
},
|
||||
loadDataNew: parameter => {
|
||||
return getRepairRemindList(Object.assign(parameter, { isRead: 'new' }))
|
||||
// return getRepairList(Object.assign(parameter, this.queryParam))
|
||||
},
|
||||
|
||||
addEnable: checkPermission('admin:repair:add'),
|
||||
editEnabel: checkPermission('admin:repair:edit'),
|
||||
removeEnable: checkPermission('admin:repair:list'),
|
||||
@ -132,7 +200,8 @@ export default {
|
||||
|
||||
created() {
|
||||
if (this.$route.query.tabKey != null) this.tabKey = this.$route.query.tabKey
|
||||
this.workerList()
|
||||
// this.workerList()
|
||||
this.$message.warn('该处工单提醒仅为查看,操作请至小程序!')
|
||||
},
|
||||
methods: {
|
||||
// admin/repair/stats/workerList
|
||||
@ -156,23 +225,26 @@ export default {
|
||||
handleView(workerId) {
|
||||
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
|
||||
},
|
||||
|
||||
toRepair(repairId) {
|
||||
this.$router.push({ name: 'repairView', query: { repairId: repairId } })
|
||||
// readRepairRemind({
|
||||
// id: repairId
|
||||
// }).then(res => {
|
||||
// this.$router.push({ name: 'repairView', query: { repairId: repairId } })
|
||||
// })
|
||||
},
|
||||
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
handleOk(status) {
|
||||
status = status || false
|
||||
this.$refs.tableAll.refresh(status)
|
||||
this.$refs.tableNew.refresh(status)
|
||||
this.$refs.tableRead.refresh(status)
|
||||
// console.log('handleSaveOk')
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
},
|
||||
hanleDelete (id) {
|
||||
handleDelete(id) {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
content: '确认要删除工单吗?',
|
||||
content: '确认要删除工单吗?',
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
@ -180,7 +252,7 @@ export default {
|
||||
delRepairRemind({ id: id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('操作成功')
|
||||
_this.workerList()
|
||||
_this.handleOk()
|
||||
} else {
|
||||
_this.$message.error(res.msg)
|
||||
}
|
||||
@ -192,19 +264,19 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleComplete (id) {
|
||||
removeAll() {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
content: '确认要完成工单吗?',
|
||||
content: '是否清空全部消息?',
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
onOk() {
|
||||
complete(id).then(res => {
|
||||
clear().then(res => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('操作成功')
|
||||
_this.$refs.table.refresh(true)
|
||||
_this.handleOk(true)
|
||||
} else {
|
||||
_this.$message.error(res.msg)
|
||||
}
|
||||
|
@ -1,70 +1,117 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="7" :sm="15">
|
||||
<a-form-item label="时间范围">
|
||||
<a-range-picker v-model="timeRange" @change="selectTime" />
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-page-search-wrapper'>
|
||||
<a-form layout='inline'>
|
||||
<a-row :gutter='48'>
|
||||
<a-col :md='4' :sm='15'>
|
||||
<a-form-item label='姓名'>
|
||||
<a-input placeholder='请输入姓名' v-model='queryParam.username' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="selectList()">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
<a-col :md='7' :sm='15'>
|
||||
<a-form-item label='时间范围'>
|
||||
<a-range-picker v-model='timeRange' @change='selectTime' />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md='8' :sm='24'>
|
||||
<span class='table-page-search-submitButtons'>
|
||||
<a-button type='primary' @click='selectList()'>查询</a-button>
|
||||
<a-button style='margin-left: 8px' @click='reset()'>重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-tabs default-active-key="1" @change="callback">
|
||||
<a-tab-pane key="2" tab="网格区域" force-render>
|
||||
<a-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="floorColumns"
|
||||
:data-source="floorData"
|
||||
<a-tabs default-active-key='1'>
|
||||
<a-tab-pane key='2' tab='网格区域' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableFloor'
|
||||
rowKey='id'
|
||||
:columns='floorColumns'
|
||||
:data='loadFloor'
|
||||
>
|
||||
<span slot="status" slot-scope="text">
|
||||
<span slot='status' slot-scope='text'>
|
||||
{{ text | statusFilter }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleFloorView(record.id)">详情</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleFloorView(record.id)'>详情</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size="default"-->
|
||||
<!-- ref="table"-->
|
||||
<!-- rowKey="id"-->
|
||||
<!-- :columns="floorColumns"-->
|
||||
<!-- :data-source="floorData"-->
|
||||
<!-- >-->
|
||||
<!-- <span slot="status" slot-scope="text">-->
|
||||
<!-- {{ text | statusFilter }}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="action" slot-scope="text, record">-->
|
||||
<!-- <a v-if="editEnabel" @click="handleFloorView(record.id)">详情</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="网格长">
|
||||
<a-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="floorCreateColumns"
|
||||
:data-source="floorCreateData"
|
||||
<a-tab-pane key='3' tab='网格长' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableFloorCreate'
|
||||
rowKey='id'
|
||||
:columns='floorCreateColumns'
|
||||
:data='loadFloorCreate'
|
||||
>
|
||||
<span slot="status" slot-scope="text">
|
||||
<span slot='status' slot-scope='text'>
|
||||
{{ text | statusFilter }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleFloorCreateView(record.id)">详情</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleFloorCreateView(record.id)'>详情</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size='default'-->
|
||||
<!-- ref='table'-->
|
||||
<!-- rowKey='id'-->
|
||||
<!-- :columns='floorCreateColumns'-->
|
||||
<!-- :data-source='floorCreateData'-->
|
||||
<!-- >-->
|
||||
<!-- <span slot='status' slot-scope='text'>-->
|
||||
<!-- {{ text | statusFilter }}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='action' slot-scope='text, record'>-->
|
||||
<!-- <a v-if='editEnabel' @click='handleFloorCreateView(record.id)'>详情</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="1" tab="维修人员">
|
||||
<a-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="workerData"
|
||||
<a-tab-pane key='1' tab='维修人员' :force-render='true'>
|
||||
<s-table
|
||||
size='default'
|
||||
ref='tableWorker'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data='loadWorker'
|
||||
>
|
||||
<span slot="status" slot-scope="text">
|
||||
<span slot='status' slot-scope='text'>
|
||||
{{ text | statusFilter }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleView(record.id)">详情</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</s-table>
|
||||
<!-- <a-table-->
|
||||
<!-- size='default'-->
|
||||
<!-- ref='table'-->
|
||||
<!-- rowKey='id'-->
|
||||
<!-- :columns='columns'-->
|
||||
<!-- :data-source='workerData'-->
|
||||
<!-- >-->
|
||||
<!-- <span slot='status' slot-scope='text'>-->
|
||||
<!-- {{ text | statusFilter }}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot='action' slot-scope='text, record'>-->
|
||||
<!-- <a v-if='editEnabel' @click='handleView(record.id)'>详情</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
</a-tab-pane>
|
||||
|
||||
</a-tabs>
|
||||
@ -151,7 +198,6 @@ export default {
|
||||
title: '工单总数',
|
||||
dataIndex: 'zs'
|
||||
},
|
||||
|
||||
{
|
||||
title: '已完成',
|
||||
dataIndex: 'closed'
|
||||
@ -229,6 +275,18 @@ export default {
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
loadFloor: parameter => {
|
||||
this.queryParam.name = this.queryParam.username
|
||||
return getFloorList(Object.assign(parameter, this.queryParam))
|
||||
},
|
||||
loadFloorCreate: parameter => {
|
||||
this.queryParam.keywords = this.queryParam.username
|
||||
return getFloorCreateList(Object.assign(parameter, this.queryParam))
|
||||
},
|
||||
loadWorker: parameter => {
|
||||
return getWorkerList(Object.assign(parameter, this.queryParam))
|
||||
},
|
||||
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
// loadData: parameter => {
|
||||
// return getRepairList(Object.assign(parameter, this.queryParam))
|
||||
@ -256,85 +314,25 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workerList()
|
||||
this.floorList()
|
||||
this.floorCreateList()
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.queryParam = {}
|
||||
this.timeRange = ''
|
||||
this.selectList()
|
||||
},
|
||||
selectList() {
|
||||
this.workerList(this.queryParam)
|
||||
this.floorList(this.queryParam)
|
||||
this.floorCreateList(this.queryParam)
|
||||
this.$refs.tableFloor.refresh(true)
|
||||
this.$refs.tableFloorCreate.refresh(true)
|
||||
this.$refs.tableWorker.refresh(true)
|
||||
// this.workerList(this.queryParam)
|
||||
// this.floorList(this.queryParam)
|
||||
// this.floorCreateList(this.queryParam)
|
||||
},
|
||||
// 切换时间
|
||||
selectTime(value, dateString) {
|
||||
this.queryParam.startDate = dateString[0]
|
||||
this.queryParam.endDate = dateString[1]
|
||||
console.log('this.queryParam', this.queryParam)
|
||||
},
|
||||
// admin/repair/stats/workerList
|
||||
workerList (query) {
|
||||
getWorkerList(query).then(res => {
|
||||
this.workerData = res.rows
|
||||
})
|
||||
},
|
||||
floorList (query) {
|
||||
getFloorList(query).then(res => {
|
||||
this.floorData = res.rows
|
||||
})
|
||||
},
|
||||
floorCreateList (query) {
|
||||
getFloorCreateList(query).then(res => {
|
||||
this.floorCreateData = res.rows
|
||||
})
|
||||
},
|
||||
callback () {
|
||||
|
||||
},
|
||||
handleAdd () {
|
||||
this.$refs.modal.add()
|
||||
},
|
||||
handleView (workerId) {
|
||||
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
|
||||
},
|
||||
handleFloorView (floorId) {
|
||||
console.log(floorId)
|
||||
this.$router.push({ name: 'repair', query: { floorId: floorId } })
|
||||
|
||||
},
|
||||
handleFloorCreateView (floorId) {
|
||||
this.$router.push({ name: 'repair', query: { floorCreateId: floorId } })
|
||||
},
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
},
|
||||
handleComplete (id) {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
content: '确认要完成工单吗?',
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
onOk () {
|
||||
complete(id).then(res => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('操作成功')
|
||||
_this.$refs.table.refresh(true)
|
||||
} else {
|
||||
_this.$message.error(res.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('系统错误,请稍后再试')
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div class="table-page-search-wrapper">-->
|
||||
<!-- <a-form layout="inline">-->
|
||||
<!-- <a-row :gutter="48">-->
|
||||
<!-- <a-col :md="8" :sm="24">-->
|
||||
<!-- <span class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>-->
|
||||
<!-- <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
|
@ -1,43 +1,43 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="名称">
|
||||
<a-input placeholder="请输入名称" v-model="queryParam.name" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
<a-button type="danger" icon="delete" @click="delByIds(selectedRowKeys)">删除</a-button>
|
||||
<a-card :bordered='false'>
|
||||
<!-- <div class="table-page-search-wrapper">-->
|
||||
<!-- <a-form layout="inline">-->
|
||||
<!-- <a-row :gutter="48">-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="名称">-->
|
||||
<!-- <a-input placeholder="请输入名称" v-model="queryParam.name" />-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="8" :sm="24">-->
|
||||
<!-- <span class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>-->
|
||||
<!-- <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
<!-- </div>-->
|
||||
<div class='table-operator'>
|
||||
<a-button v-if='addEnable' type='primary' icon='plus' @click='$refs.modal.add()'>新建</a-button>
|
||||
<a-dropdown v-if='removeEnable&&selectedRowKeys.length > 0'>
|
||||
<a-button type='danger' icon='delete' @click='delByIds(selectedRowKeys)'>删除</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<s-table
|
||||
size="default"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
size='default'
|
||||
ref='table'
|
||||
rowKey='id'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
:columns='columns'
|
||||
:data='loadData'
|
||||
>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a v-if="removeEnable" @click="delByIds([record.id])">删除</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleEdit(record)'>编辑</a>
|
||||
<a-divider type='vertical' />
|
||||
<a v-if='removeEnable' @click='delByIds([record.id])'>删除</a>
|
||||
</span>
|
||||
</s-table>
|
||||
<repairDevice-modal ref="modal" @ok="handleOk" />
|
||||
<repairDevice-modal ref='modal' @ok='handleOk' />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@ -116,7 +116,6 @@ export default {
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
},
|
||||
delByIds(ids) {
|
||||
delRepairDevice({ ids: ids.join(',') }).then(res => {
|
||||
|
@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="故障类型">
|
||||
<a-input placeholder="请输入名称" v-model="queryParam.name" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <div class="table-page-search-wrapper">-->
|
||||
<!-- <a-form layout="inline">-->
|
||||
<!-- <a-row :gutter="48">-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="故障类型">-->
|
||||
<!-- <a-input placeholder="请输入名称" v-model="queryParam.name" />-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <a-col :md="8" :sm="24">-->
|
||||
<!-- <span class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>-->
|
||||
<!-- <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
|
@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="名称">
|
||||
<a-input placeholder="请输入名称" v-model="queryParam.name"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div class="table-page-search-wrapper">-->
|
||||
<!-- <a-form layout="inline">-->
|
||||
<!-- <a-row :gutter="48">-->
|
||||
<!-- <a-col :md="5" :sm="15">-->
|
||||
<!-- <a-form-item label="名称">-->
|
||||
<!-- <a-input placeholder="请输入名称" v-model="queryParam.name"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="8" :sm="24">-->
|
||||
<!-- <span class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>-->
|
||||
<!-- <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator">
|
||||
<a-button v-if="addEnable" type="primary" icon="plus" @click="$refs.modal.add()">新建</a-button>
|
||||
<a-dropdown v-if="removeEnable&&selectedRowKeys.length > 0">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-modal
|
||||
title="操作"
|
||||
title="楼层"
|
||||
style="top: 20px;"
|
||||
:width="800"
|
||||
v-model="visible"
|
||||
@ -24,12 +24,12 @@
|
||||
<a-select show-search v-decorator="['adminId', {rules: [{ required: true, message: '网格长' }]}]"
|
||||
optionFilterProp="label"
|
||||
>
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.mobile">{{ item.username
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.username + item.mobile">{{ item.username
|
||||
}}--{{ item.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="序号">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="编码">
|
||||
<a-input placeholder="编码" v-decorator="['bm']" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-modal
|
||||
title="门牌管理"
|
||||
title="楼层"
|
||||
style="top: 20px;"
|
||||
:width="1100"
|
||||
v-model="visible"
|
||||
@ -74,6 +74,10 @@ import RepairAddressModal from '@/views/admin/repair/modules/RepairAddressModal'
|
||||
title: '网格长',
|
||||
dataIndex: 'adminName'
|
||||
},
|
||||
{
|
||||
title: '编码',
|
||||
dataIndex: 'bm'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remark'
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-modal
|
||||
title="操作"
|
||||
title="地点"
|
||||
style="top: 20px;"
|
||||
:width="800"
|
||||
v-model="visible"
|
||||
|
@ -18,19 +18,19 @@
|
||||
<a-input placeholder="请输入故障类型" v-decorator="['name']" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="预计完成时间">
|
||||
<a-input-number placeholder="预计完成时间" v-decorator="['days']" />
|
||||
<a-input-number placeholder="预计完成时间" v-decorator="['days']" style='width: 130px' /> 天
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="派单员">
|
||||
<a-select show-search v-decorator="['staffId', {rules: [{ required: true, message: '派单员' }]}]" optionFilterProp="label"
|
||||
>
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.mobile">{{ item.username }}--{{ item.mobile }}
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.username + item.mobile">{{ item.username }}--{{ item.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="维修员">
|
||||
<a-select show-search mode="multiple"
|
||||
v-decorator="['workerId', {rules: [{ required: true, message: '维修员' }]}]" optionFilterProp="label">
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.mobile">{{ item.username }}--{{ item.mobile }}
|
||||
<a-select-option v-for="item in staffLists" :key="item.id" :label="item.username + item.mobile">{{ item.username }}--{{ item.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
@ -7,16 +7,14 @@
|
||||
:form="form"
|
||||
@submit="handleSubmit"
|
||||
>
|
||||
<a-tabs :activeKey="customActiveKey" :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }" @change="handleTabClick">
|
||||
<a-tab-pane key="tab1" tab="账号密码登录">
|
||||
<a-alert
|
||||
v-if="isLoginError"
|
||||
type="error"
|
||||
showIcon
|
||||
style="margin-bottom: 24px;"
|
||||
style="margin-bottom: 24px"
|
||||
:message="errorMsg"
|
||||
/>
|
||||
<a-form-item>
|
||||
<a-form-item style='margin-top: 25px'>
|
||||
<a-input
|
||||
size="large"
|
||||
type="text"
|
||||
@ -34,47 +32,50 @@
|
||||
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
|
||||
</a-input-password>
|
||||
</a-form-item>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="tab2" tab="手机号登录" v-if='false'>
|
||||
<a-form-item>
|
||||
<a-input
|
||||
size="large"
|
||||
type="text"
|
||||
placeholder="手机号"
|
||||
v-decorator="['mobile', {rules: [{ required: true, pattern: /^1[34578]\d{9}$/, message: '请输入正确的手机号' }], validateTrigger: 'change'}]">
|
||||
<a-icon slot="prefix" type="mobile" :style="{ color: 'rgba(0,0,0,.25)' }" />
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<!-- <a-tabs :activeKey="customActiveKey" :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }" @change="handleTabClick">-->
|
||||
<!-- <a-tab-pane key="tab1" tab="帐号密码登录" v-if='false'>-->
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col class="gutter-row" :span="16">
|
||||
<a-form-item>
|
||||
<a-input
|
||||
size="large"
|
||||
type="text"
|
||||
placeholder="验证码"
|
||||
v-decorator="['captcha', {rules: [{ required: true, message: '请输入验证码' }], validateTrigger: 'blur'}]"
|
||||
>
|
||||
<a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }" />
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col class="gutter-row" :span="8">
|
||||
<a-button
|
||||
class="getCaptcha"
|
||||
tabindex="-1"
|
||||
:disabled="state.smsSendBtn"
|
||||
@click.stop.prevent="getCaptcha"
|
||||
v-text="!state.smsSendBtn && '获取验证码' || (state.time+' s')"
|
||||
></a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- <a-tab-pane key="tab2" tab="手机号登录" v-if='false'>-->
|
||||
<!-- <a-form-item>-->
|
||||
<!-- <a-input-->
|
||||
<!-- size="large"-->
|
||||
<!-- type="text"-->
|
||||
<!-- placeholder="手机号"-->
|
||||
<!-- v-decorator="['mobile', {rules: [{ required: true, pattern: /^1[34578]\d{9}$/, message: '请输入正确的手机号' }], validateTrigger: 'change'}]">-->
|
||||
<!-- <a-icon slot="prefix" type="mobile" :style="{ color: 'rgba(0,0,0,.25)' }" />-->
|
||||
<!-- </a-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
|
||||
<!-- <a-row :gutter="16">-->
|
||||
<!-- <a-col class="gutter-row" :span="16">-->
|
||||
<!-- <a-form-item>-->
|
||||
<!-- <a-input-->
|
||||
<!-- size="large"-->
|
||||
<!-- type="text"-->
|
||||
<!-- placeholder="验证码"-->
|
||||
<!-- v-decorator="['captcha', {rules: [{ required: true, message: '请输入验证码' }], validateTrigger: 'blur'}]"-->
|
||||
<!-- >-->
|
||||
<!-- <a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }" />-->
|
||||
<!-- </a-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col class="gutter-row" :span="8">-->
|
||||
<!-- <a-button-->
|
||||
<!-- class="getCaptcha"-->
|
||||
<!-- tabindex="-1"-->
|
||||
<!-- :disabled="state.smsSendBtn"-->
|
||||
<!-- @click.stop.prevent="getCaptcha"-->
|
||||
<!-- v-text="!state.smsSendBtn && '获取验证码' || (state.time+' s')"-->
|
||||
<!-- ></a-button>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- </a-tabs>-->
|
||||
|
||||
<a-form-item>
|
||||
<a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]">自动登录</a-checkbox>
|
||||
<router-link class="register" style="float: right;" :to="{ name: 'register' }">注册账户</router-link>
|
||||
<!-- <router-link class="register" style="float: right;" :to="{ name: 'register' }">注册账户</router-link>-->
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item style="margin-top:24px">
|
||||
|
@ -110,8 +110,8 @@ const vueConfig = {
|
||||
port: 8000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:9227',
|
||||
//target: 'https://company.haxy.com.cn:4443/shoot-hand',
|
||||
//target: 'http://127.0.0.1:9227',
|
||||
target: 'https://company.haxy.com.cn:4443/shoot-hand',
|
||||
pathRewrite: { '^/api': '' },
|
||||
ws: false,
|
||||
changeOrigin: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user