diff --git a/ah-jjzhgd-web/src/api/dict.js b/ah-jjzhgd-web/src/api/dict.js new file mode 100644 index 0000000..0525671 --- /dev/null +++ b/ah-jjzhgd-web/src/api/dict.js @@ -0,0 +1,65 @@ +import request from '@/utils/request' +/** + * 字典管理js + */ +/** + * 获取集合 + * @param data + * @returns {AxiosPromise} + */ +export function getList(keyWord) { + return request({ + url: '/system/sys/dict/getDictList', + method: 'get', + params:{keyWord} + }) +} + +/** + * 新增 + * @param data + * @returns {AxiosPromise} + */ +export function addDict(data){ + return request({ + url: '/system/sys/dict/addDict', + method: 'post', + data + }) +} +/** + * 新增 + * @param data + * @returns {AxiosPromise} + */ +export function updateDict(data){ + return request({ + url: '/system/sys/dict/updateDict', + method: 'post', + data + }) +} + +/** + * 新增 + * @param data + * @returns {AxiosPromise} + */ +export function delDict(data){ + return request({ + url: '/system/sys/dict/delDict', + method: 'post', + data + }) +} +/** + * 新增 + * @param data + * @returns {AxiosPromise} + */ +export function getDetails(id){ + return request({ + url: '/system/sys/dict/getDetails/'+id, + method: 'post', + }) +} diff --git a/ah-jjzhgd-web/src/api/org.js b/ah-jjzhgd-web/src/api/org.js index 150daf9..96aaf22 100644 --- a/ah-jjzhgd-web/src/api/org.js +++ b/ah-jjzhgd-web/src/api/org.js @@ -45,7 +45,7 @@ export function updateOrg(data){ */ export function delOrg(data){ return request({ - url: '/system/sys/org/delOrg/', + url: '/system/sys/org/delOrg', method: 'post', data }) diff --git a/ah-jjzhgd-web/src/api/select.js b/ah-jjzhgd-web/src/api/select.js index 58a6438..f0b6ca2 100644 --- a/ah-jjzhgd-web/src/api/select.js +++ b/ah-jjzhgd-web/src/api/select.js @@ -15,6 +15,23 @@ export function fetchRoleList() { }) } +/** + * 查询下拉选集合 + * int 类型 code + * code null 查询全部 + * code->pid + * @returns {AxiosPromise} + */ +export function fetchDictList(code) { + if(code==null){ + code=''; + } + return request({ + url: '/system/sys/select/getDictList?code='+code, + method: 'post', + }) +} + /** 菜单查询 */ export function fetchMenuList(query) { return request({ @@ -22,4 +39,4 @@ export function fetchMenuList(query) { method: 'post', params: query }) -} \ No newline at end of file +} diff --git a/ah-jjzhgd-web/src/permission.js b/ah-jjzhgd-web/src/permission.js index 82866fa..eb846d5 100644 --- a/ah-jjzhgd-web/src/permission.js +++ b/ah-jjzhgd-web/src/permission.js @@ -13,7 +13,6 @@ const whiteList = ['/login', '/auth-redirect'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar NProgress.start() - // set page title document.title = getPageTitle(to.meta.title) diff --git a/ah-jjzhgd-web/src/utils/get-page-title.js b/ah-jjzhgd-web/src/utils/get-page-title.js index cab7fd9..0c45aea 100644 --- a/ah-jjzhgd-web/src/utils/get-page-title.js +++ b/ah-jjzhgd-web/src/utils/get-page-title.js @@ -1,6 +1,6 @@ import defaultSettings from '@/settings' -const title = defaultSettings.title || 'Vue Element Admin' +const title = defaultSettings.title || '智慧工地' export default function getPageTitle(pageTitle) { if (pageTitle) { diff --git a/ah-jjzhgd-web/src/views/system/dict/index.vue b/ah-jjzhgd-web/src/views/system/dict/index.vue index 159699e..148e833 100644 --- a/ah-jjzhgd-web/src/views/system/dict/index.vue +++ b/ah-jjzhgd-web/src/views/system/dict/index.vue @@ -1,179 +1,97 @@ - + diff --git a/ah-jjzhgd-web/src/views/system/org/index.vue b/ah-jjzhgd-web/src/views/system/org/index.vue index 0c7377f..0756924 100644 --- a/ah-jjzhgd-web/src/views/system/org/index.vue +++ b/ah-jjzhgd-web/src/views/system/org/index.vue @@ -26,7 +26,7 @@ - + @@ -52,15 +52,6 @@ - - - - - - - Confirm - - @@ -76,29 +67,14 @@ export default { name: 'ComplexTable', components: { Pagination,Treeselect }, directives: { waves }, - filters: { - statusFilter(status) { - const statusMap = { - published: 'success', - draft: 'info', - deleted: 'danger' - } - return statusMap[status] - } - }, data() { return { - tableKey: 0, tableData: null, - total: 0, listLoading: true, listQuery: { keyWord: '', }, orgList: [], - importanceOptions: [1, 2, 3], - sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }], - statusOptions: ['published', 'draft', 'deleted'], showReviewer: false, temp: { orgId: null, @@ -115,7 +91,6 @@ export default { create: '新增' }, dialogPvVisible: false, - pvData: [], rules: { orgName: [{ required: true, message: '组织机构名称不能为空', trigger: 'blur' }] }, @@ -192,10 +167,10 @@ export default { this.dialogStatus = 'update' this.dialogFormVisible = true getDetails(row.orgId).then((response)=>{ - if(response.data.pId=='0'){ - response.data.pId=null; - } - this.temp=response.data; + if(response.data.pId=='0'){ + response.data.pId=null; + } + this.temp=response.data; }) }, @@ -237,20 +212,6 @@ export default { } }) }, - handleDownload() { - this.downloadLoading = true - import('@/vendor/Export2Excel').then(excel => { - const tHeader = ['timestamp', 'title', 'type', 'importance', 'status'] - const filterVal = ['timestamp', 'title', 'type', 'importance', 'status'] - const data = this.formatJson(filterVal) - excel.export_json_to_excel({ - header: tHeader, - data, - filename: 'table-list' - }) - this.downloadLoading = false - }) - }, formatJson(filterVal) { },