diff --git a/src/api/bst/article.js b/src/api/bst/article.js new file mode 100644 index 0000000..0348d93 --- /dev/null +++ b/src/api/bst/article.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询文章列表 +export function listArticle(query) { + return request({ + url: '/bst/article/list', + method: 'get', + params: query + }) +} + +// 查询文章详细 +export function getArticle(id) { + return request({ + url: '/bst/article/' + id, + method: 'get' + }) +} + +// 新增文章 +export function addArticle(data) { + return request({ + url: '/bst/article', + method: 'post', + data: data + }) +} + +// 修改文章 +export function updateArticle(data) { + return request({ + url: '/bst/article', + method: 'put', + data: data + }) +} + +// 删除文章 +export function delArticle(id) { + return request({ + url: '/bst/article/' + id, + method: 'delete' + }) +} diff --git a/src/api/bst/articleCategory.js b/src/api/bst/articleCategory.js new file mode 100644 index 0000000..42047a7 --- /dev/null +++ b/src/api/bst/articleCategory.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询文章分类列表 +export function listArticleCategory(query) { + return request({ + url: '/bst/articleCategory/list', + method: 'get', + params: query + }) +} + +// 查询文章分类详细 +export function getArticleCategory(id) { + return request({ + url: '/bst/articleCategory/' + id, + method: 'get' + }) +} + +// 新增文章分类 +export function addArticleCategory(data) { + return request({ + url: '/bst/articleCategory', + method: 'post', + data: data + }) +} + +// 修改文章分类 +export function updateArticleCategory(data) { + return request({ + url: '/bst/articleCategory', + method: 'put', + data: data + }) +} + +// 删除文章分类 +export function delArticleCategory(id) { + return request({ + url: '/bst/articleCategory/' + id, + method: 'delete' + }) +} diff --git a/src/utils/enums.js b/src/utils/enums.js index 0df5e47..df18105 100644 --- a/src/utils/enums.js +++ b/src/utils/enums.js @@ -30,12 +30,11 @@ export const ChannelType = { // 渠道API类型 export const ChannelApiType = { - WECHAT: "1", // 微信 - ALI_PAY: "2", // 支付宝 - BANK: "3", // 银行卡 - TL_WX: "5", // 通联微信 - TM_WX: "6", // 太米微信 - XY_WX: "7", // 国通星驿微信 + WECHAT: "WX", // 微信 + ALI_PAY: "ALI", // 支付宝 + BANK: "BANK", // 银行卡 + BALANCE: "BALANCE", // 余额 + TM_WX: "TM_WX", // 太米微信 } // 运营区状态 @@ -123,6 +122,12 @@ export const DeviceStatus = { }, } +// 设备锁状态 +export const DeviceLockStatus = { + LOCKED: "0", // 锁车 + UNLOCKED: "1", // 开锁 +} + // 加盟类型 export const AreaJoinType = { JOIN: "1", // 加盟 diff --git a/src/views/bst/article/index.vue b/src/views/bst/article/index.vue new file mode 100644 index 0000000..c8dfef6 --- /dev/null +++ b/src/views/bst/article/index.vue @@ -0,0 +1,342 @@ + + + diff --git a/src/views/bst/articleCategory/index.vue b/src/views/bst/articleCategory/index.vue new file mode 100644 index 0000000..dce96a7 --- /dev/null +++ b/src/views/bst/articleCategory/index.vue @@ -0,0 +1,323 @@ + + + diff --git a/src/views/bst/device/index.vue b/src/views/bst/device/index.vue index fa28a2a..048fab0 100644 --- a/src/views/bst/device/index.vue +++ b/src/views/bst/device/index.vue @@ -276,7 +276,7 @@ icon="el-icon-unlock" @click="handleUnlock(scope.row)" v-has-permi="['bst:device:unlock']" - v-show="DeviceStatus.canAdminUnlock().includes(scope.row.status)" + v-show="canUnlock(scope.row)" >开锁 锁车 { + return DeviceStatus.canAdminUnlock().includes(row.status) + && DeviceLockStatus.LOCKED == row.lockStatus + } + }, + canLock() { + return (row) => { + return DeviceStatus.canLock().includes(row.status) + && DeviceLockStatus.UNLOCKED == row.lockStatus + } + }, + } +} \ No newline at end of file diff --git a/src/views/bst/fault/components/FaultEditDialog.vue b/src/views/bst/fault/components/FaultEditDialog.vue new file mode 100644 index 0000000..0055c62 --- /dev/null +++ b/src/views/bst/fault/components/FaultEditDialog.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/views/bst/fault/index.vue b/src/views/bst/fault/index.vue index ab66ebc..5600f15 100644 --- a/src/views/bst/fault/index.vue +++ b/src/views/bst/fault/index.vue @@ -1,8 +1,8 @@ + + @@ -96,10 +84,10 @@ 修改 + icon="el-icon-view" + @click="handleView(scope.row)" + v-has-permi="['bst:fault:query']" + >详情 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -155,6 +118,9 @@ import { listFault, getFault, delFault, addFault, updateFault } from "@/api/bst/fault"; import { $showColumns } from '@/utils/mixins'; import FormCol from "@/components/FormCol/index.vue"; +import LocationLog from "@/views/bst/locationLog/index.vue"; +import LocationLogViewDialog from "@/views/bst/locationLog/components/LocationLogViewDialog.vue"; +import FaultEditDialog from "@/views/bst/fault/components/FaultEditDialog.vue"; // 默认排序字段 const defaultSort = { @@ -165,7 +131,7 @@ const defaultSort = { export default { name: "Fault", mixins: [$showColumns], - components: {FormCol}, + components: {FaultEditDialog, FormCol}, dicts: ['fault_site','appeal_status'], data() { return { @@ -201,7 +167,10 @@ export default { title: "", // 是否显示弹出层 open: false, + // 选中的ID + selectedId: null, defaultSort, + // 查询参数 queryParams: { pageNum: 1, @@ -212,7 +181,7 @@ export default { vehicleCode: null, picture: null, orderId: null, - faultSite: null, + faultSiteList:[], faultDetail: null, appealStatus: null, }, @@ -290,6 +259,10 @@ export default { this.queryParams.pageNum = 1; this.getList(); }, + /** 查看详情 */ + handleView(row){ + this.selectedId = row.id + }, /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); @@ -301,52 +274,7 @@ export default { this.single = selection.length!==1 this.multiple = !selection.length }, - /** 新增按钮操作 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "添加故障"; - }, - /** 修改按钮操作 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getFault(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "修改故障"; - }); - }, - /** 提交按钮 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateFault(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); - } else { - addFault(this.form).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 删除按钮操作 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除故障编号为"' + ids + '"的数据项?').then(function() { - return delFault(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); - }, + /** 导出按钮操作 */ handleExport() { this.download('bst/fault/export', { diff --git a/src/views/bst/suit/components/SuitEditDialog.vue b/src/views/bst/suit/components/SuitEditDialog.vue index 31dfa49..15916c8 100644 --- a/src/views/bst/suit/components/SuitEditDialog.vue +++ b/src/views/bst/suit/components/SuitEditDialog.vue @@ -26,9 +26,14 @@ - - - + @@ -74,80 +79,96 @@ - +