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