mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 04:29:36 +08:00
Merge branch 'shoot-hand-html' of https://gitee.com/elegant_wings/dbd-meeting-html into shoot-hand-html
This commit is contained in:
commit
2ee6b2843f
@ -11,3 +11,11 @@ export function getRepairRemindList (parameter) {
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function delRepairRemind (parameter) {
|
||||
return axios({
|
||||
url: api.repairRemind + '/remove',
|
||||
method: 'post',
|
||||
data: parameter
|
||||
})
|
||||
}
|
||||
|
@ -1,83 +1,80 @@
|
||||
<template>
|
||||
<a-card :bordered='false'>
|
||||
<div class='table-page-search-wrapper'>
|
||||
<a-form layout='inline'>
|
||||
<a-row :gutter='48'>
|
||||
<a-col :md='5' :sm='15'>
|
||||
<a-form-item label='报修单号'>
|
||||
<a-input placeholder='请输入报修单号' v-model='queryParam.sn' />
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="报修单号">
|
||||
<a-input placeholder="请输入报修单号" v-model="queryParam.sn" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md='8' :sm='24'>
|
||||
<span class='table-page-search-submitButtons'>
|
||||
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
||||
<a-button style='margin-left: 8px' @click='() => queryParam = {}'>重置</a-button>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-tabs :default-active-key='tabKey' @change='callback'>
|
||||
<a-tab-pane key='1' tab='全部信息'>
|
||||
<a-tabs :default-active-key="tabKey" @change="callback">
|
||||
<a-tab-pane key="1" tab="全部信息">
|
||||
<a-table
|
||||
size='default'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data-source='workerData'
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="workerData"
|
||||
>
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
||||
<a-divider type='vertical' />
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key='2' tab='未读通知' force-render>
|
||||
<a-tab-pane key="2" tab="未读通知" force-render>
|
||||
<a-table
|
||||
size='default'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data-source='noReadData'
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="noReadData"
|
||||
>
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
||||
<a-divider type='vertical' />
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key='3' tab='已读通知' force-render>
|
||||
<a-tab-pane key="3" tab="已读通知" force-render>
|
||||
<a-table
|
||||
size='default'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:data-source='readData'
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data-source="readData"
|
||||
>
|
||||
<span slot='name' slot-scope='text, record'>
|
||||
<a-tag color='blue'>
|
||||
<span slot="name" slot-scope="text, record">
|
||||
<a-tag color="blue">
|
||||
消息提示
|
||||
</a-tag>
|
||||
</span>
|
||||
<span slot='content' slot-scope='text, record'>
|
||||
<a @click='toRepair(record.repairId)'>{{ record.content }}</a>
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a @click="toRepair(record.repairId)">{{ record.content }}</a>
|
||||
</span>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
||||
<a-divider type='vertical' />
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="hanleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
@ -87,7 +84,7 @@
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getRepairRemindList } from '@/api/admin/repair/repairRemind'
|
||||
import { delRepairRemind, getRepairRemindList } from '@/api/admin/repair/repairRemind'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
|
||||
export default {
|
||||
@ -95,7 +92,7 @@ export default {
|
||||
components: {
|
||||
STable
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
tabKey: '1',
|
||||
labelCol: {
|
||||
@ -128,6 +125,12 @@ export default {
|
||||
{
|
||||
title: '时间',
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
@ -143,13 +146,13 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
created () {
|
||||
this.tabKey = this.$route.query.tabKey
|
||||
this.workerList()
|
||||
},
|
||||
methods: {
|
||||
// admin/repair/stats/workerList
|
||||
workerList() {
|
||||
workerList () {
|
||||
getRepairRemindList().then(res => {
|
||||
this.workerData = res.rows
|
||||
|
||||
@ -159,29 +162,53 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
callback() {
|
||||
callback () {
|
||||
|
||||
},
|
||||
|
||||
handleAdd() {
|
||||
handleAdd () {
|
||||
this.$refs.modal.add()
|
||||
},
|
||||
handleView(workerId) {
|
||||
handleView (workerId) {
|
||||
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
|
||||
},
|
||||
|
||||
toRepair(repairId) {
|
||||
toRepair (repairId) {
|
||||
this.$router.push({ name: 'repairView', query: { repairId: repairId } })
|
||||
},
|
||||
|
||||
handleEdit(record) {
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
handleOk() {
|
||||
handleOk () {
|
||||
this.$refs.table.refresh(true)
|
||||
console.log('handleSaveOk')
|
||||
},
|
||||
handleComplete(id) {
|
||||
hanleDelete (id) {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
content: '确认要删除工单吗?',
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
onOk () {
|
||||
delRepairRemind({ id: id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('操作成功')
|
||||
_this.workerList()
|
||||
} else {
|
||||
_this.$message.error(res.msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('系统错误,请稍后再试')
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleComplete (id) {
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '警告',
|
||||
@ -189,7 +216,7 @@ export default {
|
||||
okText: '是',
|
||||
okType: 'warning',
|
||||
cancelText: '否',
|
||||
onOk() {
|
||||
onOk () {
|
||||
complete(id).then(res => {
|
||||
if (res.code === 0) {
|
||||
_this.$message.success('操作成功')
|
||||
@ -201,7 +228,7 @@ export default {
|
||||
this.$message.error('系统错误,请稍后再试')
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
onCancel () {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user