Commit 73e04e68 authored by shen_yan_pu's avatar shen_yan_pu

Merge remote-tracking branch 'origin/zdTest' into zdTest

parents 78a3a205 c10db975
...@@ -46,7 +46,10 @@ export function addType(data) { ...@@ -46,7 +46,10 @@ export function addType(data) {
return request({ return request({
url: '/system/dict/type/add', url: '/system/dict/type/add',
method: 'post', method: 'post',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -55,9 +58,12 @@ export function updateType(data) { ...@@ -55,9 +58,12 @@ export function updateType(data) {
const businessId = data.businessId const businessId = data.businessId
data = Qs.stringify(data) data = Qs.stringify(data)
return request({ return request({
url: '/system/dict/type/update/', url: '/system/dict/type/update/' + businessId,
method: 'put', method: 'put',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
...@@ -88,12 +94,12 @@ export function exportType(query) { ...@@ -88,12 +94,12 @@ export function exportType(query) {
} }
// 获取字典选择框列表 // 获取字典选择框列表
export function optionselect() { // export function optionselect() {
return request({ // return request({
url: '/authority/system/dict/type/selectFather', // url: '/authority/system/dict/type/selectFather',
method: 'get' // method: 'get'
}) // })
} // }
// 获取字典选择框列表 // 获取字典选择框列表
export function selectDictType(dictType) { export function selectDictType(dictType) {
return request({ return request({
......
import request from '@/utils/request' import request from '@/utils/request'
import Qs from 'qs'
// 查询岗位列表 // 查询岗位列表
export function listPost(query) { export function listPost(query) {
return request({ return request({
...@@ -19,19 +19,28 @@ export function getPost(postId) { ...@@ -19,19 +19,28 @@ export function getPost(postId) {
// 新增岗位 // 新增岗位
export function addPost(data) { export function addPost(data) {
data = Qs.stringify(data)
return request({ return request({
url: '/system/post/add', url: '/system/post/add',
method: 'post', method: 'post',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
// 修改岗位 // 修改岗位
export function updatePost(data) { export function updatePost(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({ return request({
url: '/system/post/update/', url: '/system/post/update/' + businessId,
method: 'put', method: 'put',
data: data data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
......
...@@ -58,11 +58,11 @@ ...@@ -58,11 +58,11 @@
<div class="mb12 font-small-bold">字典参数列表</div> <div class="mb12 font-small-bold">字典参数列表</div>
<el-table v-loading="loading" :data="dataList" border> <el-table v-loading="loading" :data="dataList" border>
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">--> <!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{ scope.row.dictCode || '-' }}--> <!-- {{ scope.row.dictCode || '-' }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column :show-overflow-tooltip="true" label="参数标签" prop="dictLabel"> <el-table-column :show-overflow-tooltip="true" label="参数标签" prop="dictLabel">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dictLabel || '-' }} {{ scope.row.dictLabel || '-' }}
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<el-input v-model.trim="form.dictValue" show-word-limit maxlength="300" placeholder="请输入参数键值" /> <el-input v-model.trim="form.dictValue" show-word-limit maxlength="300" placeholder="请输入参数键值" />
</el-form-item> </el-form-item>
<el-form-item label="参数排序" prop="dictSort"> <el-form-item label="参数排序" prop="dictSort">
<el-input-number style="width: 100%" v-model="form.dictSort" controls-position="right" :min="0" /> <el-input-number v-model="form.dictSort" style="width: 100%" controls-position="right" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="参数状态" prop="status"> <el-form-item label="参数状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
<script> <script>
import { listData, getData, delData, addData, updateData, exportData, checkDictLabelUnique } from '@/api/system/dict/data' import { listData, getData, delData, addData, updateData, exportData, checkDictLabelUnique } from '@/api/system/dict/data'
import { listType, getType } from '@/api/system/dict/type' import { listType, getType } from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
export default { export default {
name: 'Data', name: 'Data',
...@@ -261,9 +262,9 @@ export default { ...@@ -261,9 +262,9 @@ export default {
const dictId = this.$route.query && this.$route.query.dictId const dictId = this.$route.query && this.$route.query.dictId
this.getType(dictId) this.getType(dictId)
this.getTypeList() this.getTypeList()
// this.getDicts('sys_normal_disable').then(response => { this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
// this.statusOptions = response.data this.statusOptions = response.data;
// }) })
}, },
methods: { methods: {
// 状态 // 状态
...@@ -415,16 +416,24 @@ export default { ...@@ -415,16 +416,24 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams
exportData(queryParams).then(response => { this.$confirm('是否确认导出所有数据项?', '警告', {
this.download(response.msg) confirmButtonText: '确定',
}).catch(function() {}) cancelButtonText: '取消',
// this.$confirm('是否确认导出所有数据项?', '提示', { type: 'warning'
// confirmButtonText: '确定', }).then(function() {
// cancelButtonText: '取消', return exportData(queryParams).then(response => {
// type: 'warning' const blob = new Blob([response])
// }).then(function() { const downloadElement = document.createElement('a')
// return exportData(queryParams) const href = window.URL.createObjectURL(blob)// 创建下载的链接
// }) downloadElement.href = href
downloadElement.download = '字典数据信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
})
} }
} }
} }
......
This diff is collapsed.
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" v-show="showSearch" label-width="68px"> <el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px">
<el-form-item label="岗位名称" prop="postName"> <el-form-item label="岗位名称" prop="postName">
<el-input <el-input
v-model="queryParams.postName" v-model="queryParams.postName"
...@@ -76,13 +76,13 @@ ...@@ -76,13 +76,13 @@
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:10px"> <div style="padding:10px">
<div class="mb12 font-small-bold">岗位管理列表</div> <div class="mb12 font-small-bold">岗位管理列表</div>
<el-table :data="postList" border> <el-table v-loading="loading" :data="postList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :show-overflow-tooltip="true" label="岗位编号" align="center" prop="businessId"> <el-table-column :show-overflow-tooltip="true" label="岗位编号" align="center" prop="businessId">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -104,10 +104,10 @@ ...@@ -104,10 +104,10 @@
{{ scope.row.postSort || '-' }} {{ scope.row.postSort || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :show-overflow-tooltip="true" label="状态" align="center" prop="flag"> <el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat">
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.flag || '-' }} <!-- {{ scope.row.flag || '-' }}-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column :show-overflow-tooltip="true" label="创建时间" align="center" prop="createDate" width="180"> <el-table-column :show-overflow-tooltip="true" label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -192,8 +192,8 @@ ...@@ -192,8 +192,8 @@
:key="dict.dictValue" :key="dict.dictValue"
:label="dict.dictValue" :label="dict.dictValue"
>{{ dict.dictLabel }} >{{ dict.dictLabel }}
<!-- <el-radio label="0">正常</el-radio>--> <!-- <el-radio label="0">正常</el-radio>-->
<!-- <el-radio label="1">停用</el-radio>--> <!-- <el-radio label="1">停用</el-radio>-->
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -316,8 +316,8 @@ export default { ...@@ -316,8 +316,8 @@ export default {
rows: 10, rows: 10,
postCode: undefined, postCode: undefined,
postName: undefined, postName: undefined,
flag: undefined, flag: undefined
status: '' // status: ''
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -436,7 +436,7 @@ export default { ...@@ -436,7 +436,7 @@ export default {
deptId: undefined, deptId: undefined,
postSort: 0, postSort: 0,
flag: '1', flag: '1',
status: '0', // status: '0',
remark: undefined, remark: undefined,
postNameAfter: undefined, postNameAfter: undefined,
postNameBefore: undefined postNameBefore: undefined
...@@ -534,16 +534,24 @@ export default { ...@@ -534,16 +534,24 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams
exportPost(queryParams).then(response => { this.$confirm('是否确认导出所有岗位数据项?', '警告', {
this.download(response.msg) confirmButtonText: '确定',
}).catch(function() { cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportPost(queryParams).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '岗位信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
}) })
// this.$confirm('是否确认导出所有职务数据项?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(function() {
// return
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment