mirror of https://gitee.com/xiaonuobase/snowy
【更新】界面优化
parent
1cea64a89a
commit
68cec8e416
|
@ -42,7 +42,7 @@
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="true"
|
||||
:alert="false"
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<ellipsis :length="10" tooltip>{{ text }}</ellipsis>
|
||||
</span>
|
||||
<span slot="fileLocation" slot-scope="text">
|
||||
{{ fileLocationFilter(text) }}
|
||||
{{ 'file_storage_location' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="fileSuffix" slot-scope="text">
|
||||
<a-tag color="blue">{{ text }}</a-tag>
|
||||
|
@ -90,7 +90,6 @@
|
|||
</template>
|
||||
<script>
|
||||
import { STable, Ellipsis, XCard } from '@/components'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import { sysFileInfoPage, sysFileInfoDelete, sysFileInfoUpload, sysFileInfoDownload } from '@/api/modular/system/fileManage'
|
||||
import detailForm from './detailForm'
|
||||
import previewForm from './previewForm'
|
||||
|
@ -164,13 +163,6 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
fileLocationFilter (fileLocation) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.fileLocationDictTypeDropDown.filter(item => item.code == fileLocation)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 预览文件(微软插件)
|
||||
*/
|
||||
|
@ -181,9 +173,7 @@
|
|||
* 获取字典数据
|
||||
*/
|
||||
sysDictTypeDropDown () {
|
||||
sysDictTypeDropDown({ code: 'file_storage_location' }).then((res) => {
|
||||
this.fileLocationDictTypeDropDown = res.data
|
||||
})
|
||||
this.fileLocationDictTypeDropDown = this.$options.filters['dictData']('file_storage_location')
|
||||
},
|
||||
/**
|
||||
* 下载文件(所有文件)
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
import { STable, Ellipsis, XCard, XDown } from '@/components'
|
||||
import { sysOpLogPage, sysOpLogDelete, sysOpLogExport } from '@/api/modular/system/logManage'
|
||||
import detailsOplog from './details'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<a-col :md="8" :sm="24">
|
||||
<a-form-item label="类型" >
|
||||
<a-select v-model="queryParam.type" placeholder="请选择类型" allow-clear >
|
||||
<a-select-option v-for="(item,index) in typeDictTypeDropDown" :key="index" :value="item.code" >{{ item.value }}</a-select-option>
|
||||
<a-select-option v-for="(item,index) in typeDictTypeDropDown" :key="index" :value="item.code" >{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
@ -29,7 +29,7 @@
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="true"
|
||||
:alert="false"
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
|
@ -37,10 +37,10 @@
|
|||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysNotice:add')" >新增公告</a-button>
|
||||
</template>
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
{{ 'notice_status' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="type" slot-scope="text">
|
||||
{{ typeFilter(text) }}
|
||||
{{ 'notice_type' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<div v-if="record.status == 0">
|
||||
|
@ -78,7 +78,6 @@
|
|||
<script>
|
||||
import { STable, XCard } from '@/components'
|
||||
import { sysNoticePage, sysNoticeDelete, sysNoticeChangeStatus } from '@/api/modular/system/noticeManage'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import addForm from './addForm'
|
||||
import editForm from './editForm'
|
||||
import detailForm from './detailForm'
|
||||
|
@ -141,26 +140,8 @@
|
|||
* 获取字典数据
|
||||
*/
|
||||
sysDictTypeDropDown () {
|
||||
sysDictTypeDropDown({ code: 'notice_status' }).then((res) => {
|
||||
this.statusDictTypeDropDown = res.data
|
||||
})
|
||||
sysDictTypeDropDown({ code: 'notice_type' }).then((res) => {
|
||||
this.typeDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDictTypeDropDown.filter(item => item.code == status)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
typeFilter (type) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.typeDictTypeDropDown.filter(item => item.code == type)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
this.statusDictTypeDropDown = this.$options.filters['dictData']('notice_status')
|
||||
this.typeDictTypeDropDown = this.$options.filters['dictData']('notice_type')
|
||||
},
|
||||
/**
|
||||
* 修改状态
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<a-col :md="8" :sm="24">
|
||||
<a-form-item label="类型" v-if="hasPerm('sysNotice:received')">
|
||||
<a-select v-model="queryParam.type" placeholder="请选择类型" allow-clear >
|
||||
<a-select-option v-for="(item,index) in typeDictTypeDropDown" :key="index" :value="item.code" >{{ item.value }}</a-select-option>
|
||||
<a-select-option v-for="(item,index) in typeDictTypeDropDown" :key="index" :value="item.code" >{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
@ -31,15 +31,15 @@
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="true"
|
||||
:alert="false"
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<span slot="status" slot-scope="text">
|
||||
{{ statusFilter(text) }}
|
||||
{{ 'notice_status' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="type" slot-scope="text">
|
||||
{{ typeFilter(text) }}
|
||||
{{ 'notice_type' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysNotice:received')" @click="$refs.detailForm.detail(record)">查看</a>
|
||||
|
@ -54,7 +54,6 @@
|
|||
import { STable, XCard } from '@/components'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { sysNoticeReceived } from '@/api/modular/system/noticeReceivedManage'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
import detailForm from './detailForm'
|
||||
export default {
|
||||
components: {
|
||||
|
@ -113,26 +112,8 @@
|
|||
* 获取字典数据
|
||||
*/
|
||||
sysDictTypeDropDown () {
|
||||
sysDictTypeDropDown({ code: 'notice_status' }).then((res) => {
|
||||
this.statusDictTypeDropDown = res.data
|
||||
})
|
||||
sysDictTypeDropDown({ code: 'notice_type' }).then((res) => {
|
||||
this.typeDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
statusFilter (status) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.statusDictTypeDropDown.filter(item => item.code == status)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
},
|
||||
typeFilter (type) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.typeDictTypeDropDown.filter(item => item.code == type)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
this.statusDictTypeDropDown = this.$options.filters['dictData']('notice_status')
|
||||
this.typeDictTypeDropDown = this.$options.filters['dictData']('notice_type')
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh()
|
||||
|
|
|
@ -29,9 +29,8 @@
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="true"
|
||||
:alert="false"
|
||||
:rowKey="(record) => record.id"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template slot="operator" v-if="hasPerm('sysTimers:add')">
|
||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysTimers:add')">新增定时器</a-button>
|
||||
|
@ -45,12 +44,12 @@
|
|||
<span slot="jobStatus" slot-scope="text,record" v-if="hasPerm('sysTimers:start') || hasPerm('sysTimers:stop')">
|
||||
<a-popconfirm placement="top" :title="text===1? '确定停止该任务?':'确定启动该任务?'" @confirm="() => editjobStatusStatus(text,record)">
|
||||
<a-badge :status="text===1? 'processing':'default'" />
|
||||
<a>{{ jobStatusFilter(text) }}</a>
|
||||
<a>{{ 'run_status' | dictType(text) }}</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
<span slot="jobStatus" v-else>
|
||||
<a-badge :status="text===1? 'processing':'default'" />
|
||||
{{ jobStatusFilter(text) }}
|
||||
{{ 'run_status' | dictType(text) }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('sysTimers:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
||||
|
@ -70,7 +69,6 @@
|
|||
import { sysTimersPage, sysTimersDelete, sysTimersStart, sysTimersStop } from '@/api/modular/system/timersManage'
|
||||
import addForm from './addForm'
|
||||
import editForm from './editForm'
|
||||
import { sysDictTypeDropDown } from '@/api/modular/system/dictManage'
|
||||
export default {
|
||||
name: 'PosIndex',
|
||||
components: {
|
||||
|
@ -116,8 +114,6 @@
|
|||
return res.data
|
||||
})
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
jobStatusDictTypeDropDown: []
|
||||
}
|
||||
},
|
||||
|
@ -137,17 +133,15 @@
|
|||
* 获取字典数据
|
||||
*/
|
||||
sysDictTypeDropDown () {
|
||||
sysDictTypeDropDown({ code: 'run_status' }).then((res) => {
|
||||
this.jobStatusDictTypeDropDown = res.data
|
||||
})
|
||||
},
|
||||
jobStatusFilter (jobStatus) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const values = this.jobStatusDictTypeDropDown.filter(item => item.code == jobStatus)
|
||||
if (values.length > 0) {
|
||||
return values[0].value
|
||||
}
|
||||
this.jobStatusDictTypeDropDown = this.$options.filters['dictData']('run_status')
|
||||
},
|
||||
// jobStatusFilter (jobStatus) {
|
||||
// // eslint-disable-next-line eqeqeq
|
||||
// const values = this.jobStatusDictTypeDropDown.filter(item => item.code == jobStatus)
|
||||
// if (values.length > 0) {
|
||||
// return values[0].value
|
||||
// }
|
||||
// },
|
||||
/**
|
||||
* 启动停止
|
||||
*/
|
||||
|
@ -186,15 +180,8 @@
|
|||
this.$message.error('删除错误:' + err.message)
|
||||
})
|
||||
},
|
||||
toggleAdvanced () {
|
||||
this.advanced = !this.advanced
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
onSelectChange (selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue