Commit 027c59cd by liimin

合并代码

1 parent e5d040b7
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<script> <script>
import DetailDialog from './detailDialog' import DetailDialog from './detailDialog'
import { getListApi, detailApi, removeApi, exportApi, downloadApi } from '@api/materiaOrderManagement' import { getListApi, removeApi, exportApi, downloadApi } from '@api/materiaOrderManagement'
import notice from '@/common/notice' import notice from '@/common/notice'
export default { export default {
name: 'fimsMateriaOrderManagement', name: 'fimsMateriaOrderManagement',
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
/* 接口请求-start */ /* 接口请求-start */
getParams() { getParams() {
var time = [{ attr: 'startTime', addTime: '00:00:00' }, { attr: 'endTime', addTime: '23:59:59' }] var time = [{ attr: 'startTime', addTime: '00:00:00' }, { attr: 'endTime', addTime: '23:59:59' }]
this.searchForm.createTime && this.searchForm.createTime.map((value, i) => this.searchForm[time[i].attr] = value + ' ' + time[i].addTime) this.searchForm.createTime && this.searchForm.createTime.map((value, i) => (this.searchForm[time[i].attr] = value + ' ' + time[i].addTime))
return { return {
pageCount: this.pageSize, pageCount: this.pageSize,
pageSize: this.currentPage, pageSize: this.currentPage,
......
...@@ -109,10 +109,9 @@ ...@@ -109,10 +109,9 @@
import { getListApi, reportApi, exportApi } from '@api/systemMonitor' import { getListApi, reportApi, exportApi } from '@api/systemMonitor'
import notice from '@/common/notice' import notice from '@/common/notice'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { cloneDeep } from 'lodash'
export default { export default {
name: 'index', name: 'index',
data () { data() {
return { return {
subSystemRadio: '全部', subSystemRadio: '全部',
tag: Object.freeze({ tag: Object.freeze({
...@@ -226,7 +225,7 @@ export default { ...@@ -226,7 +225,7 @@ export default {
} }
}, },
mounted () { mounted() {
this.$echarts = echarts this.$echarts = echarts
this.loadingGetList() this.loadingGetList()
this.loadBaseData() this.loadBaseData()
...@@ -237,7 +236,7 @@ export default { ...@@ -237,7 +236,7 @@ export default {
methods: { methods: {
...mapActions('d2admin/base', ['load']), ...mapActions('d2admin/base', ['load']),
async loadBaseData () { async loadBaseData() {
// this.baseData.station = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY) // this.baseData.station = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY)
const { station, subsys } = await this.load() const { station, subsys } = await this.load()
this.baseData.station = _.cloneDeep(station) this.baseData.station = _.cloneDeep(station)
...@@ -245,12 +244,12 @@ export default { ...@@ -245,12 +244,12 @@ export default {
this.baseData.subsys.unshift({ confCode: '', confValue: '全部' }) this.baseData.subsys.unshift({ confCode: '', confValue: '全部' })
}, },
loadingGetList () { loadingGetList() {
this.tableLoading = true this.tableLoading = true
this.getList() this.getList()
}, },
/* 接口请求-start */ /* 接口请求-start */
getParams () { getParams() {
return { return {
pageCount: this.pageSize, pageCount: this.pageSize,
pageSize: this.currentPage, pageSize: this.currentPage,
...@@ -258,7 +257,7 @@ export default { ...@@ -258,7 +257,7 @@ export default {
} }
}, },
getList () { getList() {
const params = this.getParams() const params = this.getParams()
getListApi(params).then(res => { getListApi(params).then(res => {
this.tableData = res.subsystemList this.tableData = res.subsystemList
...@@ -269,7 +268,7 @@ export default { ...@@ -269,7 +268,7 @@ export default {
this.tableLoading = false this.tableLoading = false
}) })
}, },
getPie (label = '') { getPie(label = '') {
const params = { const params = {
subsystemTypeCode: label ? this.baseData.subsys.find(item => item.confValue === label).confCode : '' subsystemTypeCode: label ? this.baseData.subsys.find(item => item.confValue === label).confCode : ''
} }
...@@ -279,7 +278,7 @@ export default { ...@@ -279,7 +278,7 @@ export default {
notice.errorTips() notice.errorTips()
}) })
}, },
exportFile () { exportFile() {
const params = this.getParams() const params = this.getParams()
exportApi(params).then(res => { exportApi(params).then(res => {
this.$open(res.url) this.$open(res.url)
...@@ -293,7 +292,7 @@ export default { ...@@ -293,7 +292,7 @@ export default {
// offlineNum 离网数量 // offlineNum 离网数量
// normalNum 正常数量 // normalNum 正常数量
// breakdownNum 故障数量 // breakdownNum 故障数量
drawPie (params) { drawPie(params) {
let item = this.totalOptions.series[0] let item = this.totalOptions.series[0]
item.data[0].value = params.onlineNum ? params.onlineNum : 0 item.data[0].value = params.onlineNum ? params.onlineNum : 0
item.data[1].value = params.offlineNum ? params.offlineNum : 0 item.data[1].value = params.offlineNum ? params.offlineNum : 0
...@@ -306,19 +305,19 @@ export default { ...@@ -306,19 +305,19 @@ export default {
}, },
// 搜索 // 搜索
handleSearch () { handleSearch() {
// 调接口 // 调接口
this.loadingGetList() this.loadingGetList()
}, },
// 页码 // 页码
handleSizeChange (value) { handleSizeChange(value) {
this.pageSize = value this.pageSize = value
// 调接口 // 调接口
this.loadingGetList() this.loadingGetList()
}, },
handleCurrentChange (value) { handleCurrentChange(value) {
this.currentPage = value this.currentPage = value
// 调接口 // 调接口
this.loadingGetList() this.loadingGetList()
......
...@@ -112,13 +112,12 @@ import EditDialog from './editDialog' ...@@ -112,13 +112,12 @@ import EditDialog from './editDialog'
import { BaseData } from '@/common/constants' import { BaseData } from '@/common/constants'
import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement' import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice' import notice from '@/common/notice'
import { clearTimeout, setTimeout } from 'timers'
export default { export default {
name: 'fimsTrafficManagement', name: 'fimsTrafficManagement',
components: { components: {
EditDialog EditDialog
}, },
data () { data() {
return { return {
// 新增/编辑弹窗 // 新增/编辑弹窗
editVisible: false, editVisible: false,
...@@ -179,23 +178,23 @@ export default { ...@@ -179,23 +178,23 @@ export default {
} }
}, },
mounted () { mounted() {
this.loadingGetList() this.loadingGetList()
this.loadBaseData() this.loadBaseData()
}, },
methods: { methods: {
async loadBaseData () { async loadBaseData() {
const data = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY) const data = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY)
this.baseData.station = data this.baseData.station = data
}, },
loadingGetList () { loadingGetList() {
this.tableLoading = true this.tableLoading = true
this.getList() this.getList()
}, },
/* 接口请求-start */ /* 接口请求-start */
getParams () { getParams() {
return { return {
pageCount: this.pageSize, pageCount: this.pageSize,
pageSize: this.currentPage, pageSize: this.currentPage,
...@@ -203,7 +202,7 @@ export default { ...@@ -203,7 +202,7 @@ export default {
} }
}, },
getList () { getList() {
const params = this.getParams() const params = this.getParams()
getListApi(params).then(res => { getListApi(params).then(res => {
this.tableData = res.trafficList this.tableData = res.trafficList
...@@ -214,10 +213,10 @@ export default { ...@@ -214,10 +213,10 @@ export default {
this.tableLoading = false this.tableLoading = false
}) })
}, },
editTraffic (value) { editTraffic(value) {
// console.log(value) // console.log(value)
const params = _.cloneDeep(this.editFormReset) const params = _.cloneDeep(this.editFormReset)
Object.keys(params).map(key => params[key] = value[key]) Object.keys(params).map(key => (params[key] = value[key]))
params.stationName = this.baseData.station.find(item => item.confCode === params.stationCode).confValue params.stationName = this.baseData.station.find(item => item.confCode === params.stationCode).confValue
!value.id ? delete params.id : delete params.trafficCode !value.id ? delete params.id : delete params.trafficCode
params.method = value.id ? methods.Edit : methods.Add params.method = value.id ? methods.Edit : methods.Add
...@@ -232,43 +231,43 @@ export default { ...@@ -232,43 +231,43 @@ export default {
}, },
/* 接口请求-end */ /* 接口请求-end */
// 搜索 // 搜索
handleSearch () { handleSearch() {
this.loadingGetList() this.loadingGetList()
}, },
// 页码 // 页码
handleSizeChange (value) { handleSizeChange(value) {
// console.log(value) // console.log(value)
this.pageSize = value this.pageSize = value
// 调接口 // 调接口
this.loadingGetList() this.loadingGetList()
}, },
handleCurrentChange (value) { handleCurrentChange(value) {
// console.log(value) // console.log(value)
this.currentPage = value this.currentPage = value
// 调接口 // 调接口
this.loadingGetList() this.loadingGetList()
}, },
handleEditClose () { handleEditClose() {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
// delete this.editForm.id // delete this.editForm.id
}, },
handleEditConfirm () { handleEditConfirm() {
var editParams = _.cloneDeep(this.editForm) var editParams = _.cloneDeep(this.editForm)
this.editTraffic(editParams) this.editTraffic(editParams)
}, },
// 表格-编辑 // 表格-编辑
handleEdit (row) { handleEdit(row) {
// console.log(row) // console.log(row)
this.editForm = _.cloneDeep(row) this.editForm = _.cloneDeep(row)
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleDelete (row) { handleDelete(row) {
this.$confirm('确认删除?', '删除', { this.$confirm('确认删除?', '删除', {
comfirmButtonText: '确认', comfirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:rules="rules" :rules="rules"
> >
<el-form-item label="角色名:" prop="roleName"> <el-form-item label="角色名:" prop="roleName">
<el-input v-model="roleForm.roleName" requred maxlength="10" clearable placeholder="请输入角色名"></el-input> <el-input v-model="roleForm.roleName" requred maxlength="10" clearable placeholder="请输入角色名" :disabled="!!roleForm.roleId"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述:"> <el-form-item label="描述:">
<el-input <el-input
......
...@@ -41,7 +41,7 @@ module.exports = { ...@@ -41,7 +41,7 @@ module.exports = {
loaderOptions: { loaderOptions: {
// 设置 scss 公用变量文件 // 设置 scss 公用变量文件
sass: { sass: {
data: `@import '~@/assets/style/public.scss';` data: '@import \'~@/assets/style/public.scss\';'
} }
} }
}, },
...@@ -94,7 +94,7 @@ module.exports = { ...@@ -94,7 +94,7 @@ module.exports = {
.plugin('theme-color-replacer') .plugin('theme-color-replacer')
.use(ThemeColorReplacer, [{ .use(ThemeColorReplacer, [{
fileName: 'css/theme-colors.[contenthash:8].css', fileName: 'css/theme-colors.[contenthash:8].css',
resolveCss (resultCss) { // optional. Resolve result css code as you wish. resolveCss(resultCss) { // optional. Resolve result css code as you wish.
return resultCss.replace(/process.env.VUE_APP_ELEMENT_COLOR/g, process.env.VUE_APP_ELEMENT_COLOR) return resultCss.replace(/process.env.VUE_APP_ELEMENT_COLOR/g, process.env.VUE_APP_ELEMENT_COLOR)
}, },
matchColors: [ matchColors: [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!