2 files modified
5 files added
| | |
| | | |
| | | export const getTreeList = (params) => { |
| | | return request({ |
| | | url: '/api/blade-category/category//tree', |
| | | url: '/api/blade-category/category/tree', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getAll = () => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup//all', |
| | | method: 'get', |
| | | params: {} |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroupItem/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroupItem/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroupItem/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroupItem/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroupItem/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-placeCheck/placeCheck/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-placeCheck/placeCheck/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-placeCheck/placeCheck/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-placeCheck/placeCheck/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-placeCheck/placeCheck/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | <template> |
| | | <base-container> |
| | | <div class="p-all-20 h100 b-r-6 b-c-w"> |
| | | <el-row> |
| | | <!--树--> |
| | | <el-col :span="7"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <el-button type="text" @click="groupAdd">新增</el-button> |
| | | </div> |
| | | |
| | | <el-tree :data="treeData" node-key="id" default-expand-all :expand-on-click-node="false" |
| | | @node-click="nodeClick"> |
| | | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span>{{ node.label }}</span> |
| | | <span> |
| | | <el-button type="text" size="mini" icon="el-icon-edit" @click="() => groupEdit(data)"></el-button> |
| | | <el-button type="text" size="mini" icon="el-icon-delete" |
| | | @click="() => groupRemove(node, data)"></el-button> |
| | | </span> |
| | | </span> |
| | | </el-tree> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="1"></el-col> |
| | | |
| | | <!--表格--> |
| | | <el-col :span="16"> |
| | | <el-card class="box-card"> |
| | | <avue-crud v-if="groupId" :option="itemOption" :table-loading="loading" :data="tableData" :page.sync="page" |
| | | v-model="itemForm" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"> |
| | | > |
| | | <template slot="menuLeft"> |
| | | |
| | | </template> |
| | | </avue-crud> |
| | | <el-empty v-else description="请先选择指标项"></el-empty> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!--巡查指标添加弹窗--> |
| | | <el-dialog title="巡查指标" :visible.sync="groupFormVisible" width="50%" append-to-body |
| | | :before-close="handleGroupFormClose"> |
| | | |
| | | <avue-form ref="groupForm" v-model="groupForm" :option="groupOption" @submit="groupSubmit"></avue-form> |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | </base-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | add as addGroup, |
| | | getAll, |
| | | remove as removeGroup, |
| | | update as updateGroup |
| | | } from "@/api/patrol/patrolGroup" |
| | | import { |
| | | add, |
| | | getDetail, |
| | | getList, |
| | | remove, |
| | | update |
| | | } from "@/api/patrol/patrolGroupItem" |
| | | |
| | | export default { |
| | | name: "patrolProblemType", |
| | | data() { |
| | | return { |
| | | groupFormVisible: false, |
| | | groupId: "", |
| | | //指标组相关 |
| | | treeData: [], |
| | | groupForm: {}, |
| | | groupOption: { |
| | | column: [{ |
| | | label: "指标组名称", |
| | | prop: "name", |
| | | span: 24 |
| | | }] |
| | | }, |
| | | |
| | | //指标项相关 |
| | | itemForm: {}, |
| | | itemOption: { |
| | | height: 'auto', |
| | | calcHeight: 210, |
| | | tip: false, |
| | | indexFixed: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | indexLabel: '序号', |
| | | searchBtnText: '查 询', |
| | | emptyBtnText: '重 置', |
| | | emptyBtnIcon: 'el-icon-refresh', |
| | | viewBtn: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "巡查项描述", |
| | | prop: "itemsName", |
| | | type: "input", |
| | | span: 24, |
| | | search: true, |
| | | searchSpan: 8, |
| | | searchLabelWidth: 100, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入名称", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "问题描述", |
| | | prop: "description", |
| | | type: "input", |
| | | span: 24, |
| | | search: true, |
| | | searchSpan: 8, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入名称说明", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | ] |
| | | }, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | tableData: [] |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.loadTreeData() |
| | | }, |
| | | handleGroupFormClose() { |
| | | this.groupFormVisible = false |
| | | this.$refs.groupForm.resetForm() |
| | | }, |
| | | |
| | | //指标组相关 |
| | | loadTreeData() { |
| | | getAll().then(res => { |
| | | if (res.data.code == 200) { |
| | | let data = res.data.data |
| | | let arr = [] |
| | | if (data.length > 0) { |
| | | data.forEach(e => { |
| | | let obj = { |
| | | label: e.name, |
| | | value: e.id |
| | | } |
| | | arr.push(obj) |
| | | }) |
| | | } |
| | | this.treeData = arr |
| | | } |
| | | }) |
| | | }, |
| | | groupAdd() { |
| | | this.groupFormVisible = true |
| | | this.groupForm.id = "" |
| | | }, |
| | | groupEdit(data) { |
| | | this.groupFormVisible = true |
| | | this.groupForm.id = data.value |
| | | this.groupForm.name = data.label |
| | | }, |
| | | groupRemove(node, data) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return removeGroup(data.value) |
| | | }) |
| | | .then(() => { |
| | | this.groupId = "" |
| | | this.loadTreeData() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | groupSubmit(form, done) { |
| | | if (form.id) { |
| | | updateGroup(form).then(() => { |
| | | this.loadTreeData() |
| | | this.handleGroupFormClose() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "修改成功!" |
| | | }) |
| | | done() |
| | | }, error => {}) |
| | | |
| | | |
| | | } else { |
| | | addGroup(form).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.loadTreeData() |
| | | this.$nextTick(() => { |
| | | this.handleGroupFormClose() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "添加成功!" |
| | | }) |
| | | done() |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | nodeClick(data) { |
| | | this.groupId = data.value |
| | | this.onLoad(this.page) |
| | | }, |
| | | |
| | | |
| | | rowSave(row, done, loading) { |
| | | row.groupId = this.groupId |
| | | add(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | loading() |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | loading() |
| | | }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done() |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | Object.assign(params, { |
| | | groupId: this.groupId |
| | | }) |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.tableData = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | |
| | | :deep(.el-card__header) { |
| | | padding: 6px 18px; |
| | | } |
| | | |
| | | .clearfix { |
| | | text-align: left; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/patrol/placeChek" |
| | | |
| | | import { |
| | | addPd, |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | addBtn: false, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | // selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "所属街道", |
| | | prop: "streetName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "所属网格", |
| | | prop: "gridName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所隐患", |
| | | prop: "remark", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | }, |
| | | |
| | | { |
| | | label: "场所负责人", |
| | | prop: "principal", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | label: "场所负责人电话", |
| | | prop: "principalPhone", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "签名", |
| | | prop: "signaturePath", |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | var videoUrl = this.findObject(this.option.column, "videoUrl") |
| | | var content = this.findObject(this.option.column, "content") |
| | | if (val.indexOf('ksp') != -1) { |
| | | videoUrl.display = true |
| | | content.display = false |
| | | videoUrl.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | viewBtn: this.vaildData(this.permission.article_view, true), |
| | | delBtn: this.vaildData(this.permission.article_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_edit, true), |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | this.form = data |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | if (item.signaturePath.length > 0) { |
| | | var urls = [] |
| | | var names = item.signaturePath.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.signaturePath = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).then((res) => { |
| | | const data = res.data.data |
| | | this.districtTree = data |
| | | const column = this.findObject(this.option.column, "articleList") |
| | | column.dicData = res.data.data |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | |
| | | <script> |
| | | import { |
| | | getTreeList, |
| | | add, |
| | | submit, |
| | | update, |
| | | remove |
| | | } from '@/api/categoryLabel/category' |
| | |
| | | menuWidth: 240, |
| | | lazy: true, |
| | | rowKey: 'id', |
| | | // defaultExpandAll: true, |
| | | defaultExpandAll: true, |
| | | column: [{ |
| | | label: '名称', |
| | | prop: 'name' |
| | |
| | | label: 'ID', |
| | | prop: 'id', |
| | | display: false |
| | | }, { |
| | | label: '层级', |
| | | prop: 'level', |
| | | // display: false |
| | | }, { |
| | | label: '编码', |
| | | prop: 'categoryNo', |
| | | // display: false |
| | | }, { |
| | | label: '父级id', |
| | | prop: 'parentId', |
| | |
| | | }, |
| | | |
| | | rowSave(row, done) { |
| | | row.parentId = this.parentId |
| | | row.labelName = row.name |
| | | add(row).then(() => { |
| | | // row.parentId = this.parentId |
| | | row.categoryName = row.name |
| | | submit(row).then(() => { |
| | | this.initFlag = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | |
| | | |
| | | |
| | | |
| | | <style></style> |
| | | <style></style> |