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) {
return request({
url: '/system/dict/type/add',
method: 'post',
data: data
data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
......@@ -55,9 +58,12 @@ export function updateType(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/system/dict/type/update/',
url: '/system/dict/type/update/' + businessId,
method: 'put',
data: data
data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
......@@ -88,12 +94,12 @@ export function exportType(query) {
}
// 获取字典选择框列表
export function optionselect() {
return request({
url: '/authority/system/dict/type/selectFather',
method: 'get'
})
}
// export function optionselect() {
// return request({
// url: '/authority/system/dict/type/selectFather',
// method: 'get'
// })
// }
// 获取字典选择框列表
export function selectDictType(dictType) {
return request({
......
import request from '@/utils/request'
import Qs from 'qs'
// 查询岗位列表
export function listPost(query) {
return request({
......@@ -19,19 +19,28 @@ export function getPost(postId) {
// 新增岗位
export function addPost(data) {
data = Qs.stringify(data)
return request({
url: '/system/post/add',
method: 'post',
data: data
data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
// 修改岗位
export function updatePost(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/system/post/update/',
url: '/system/post/update/' + businessId,
method: 'put',
data: data
data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
......
......@@ -58,11 +58,11 @@
<div class="mb12 font-small-bold">字典参数列表</div>
<el-table v-loading="loading" :data="dataList" border>
<el-table-column type="index" label="序号" width="50" />
<!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.dictCode || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column :show-overflow-tooltip="true" label="参数编码" prop="dictCode">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.dictCode || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column :show-overflow-tooltip="true" label="参数标签" prop="dictLabel">
<template slot-scope="scope">
{{ scope.row.dictLabel || '-' }}
......@@ -138,7 +138,7 @@
<el-input v-model.trim="form.dictValue" show-word-limit maxlength="300" placeholder="请输入参数键值" />
</el-form-item>
<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 label="参数状态" prop="status">
<el-radio-group v-model="form.status">
......@@ -164,6 +164,7 @@
<script>
import { listData, getData, delData, addData, updateData, exportData, checkDictLabelUnique } from '@/api/system/dict/data'
import { listType, getType } from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
export default {
name: 'Data',
......@@ -261,9 +262,9 @@ export default {
const dictId = this.$route.query && this.$route.query.dictId
this.getType(dictId)
this.getTypeList()
// this.getDicts('sys_normal_disable').then(response => {
// this.statusOptions = response.data
// })
this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data;
})
},
methods: {
// 状态
......@@ -415,16 +416,24 @@ export default {
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
exportData(queryParams).then(response => {
this.download(response.msg)
}).catch(function() {})
// this.$confirm('是否确认导出所有数据项?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(function() {
// return exportData(queryParams)
// })
this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportData(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 diff is collapsed.
<template>
<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-input
v-model="queryParams.postName"
......@@ -76,13 +76,13 @@
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
</el-form>
<div class="placeholder" />
<div style="padding:10px">
<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 :show-overflow-tooltip="true" label="岗位编号" align="center" prop="businessId">
<template slot-scope="scope">
......@@ -104,10 +104,10 @@
{{ scope.row.postSort || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="状态" align="center" prop="flag">
<template slot-scope="scope">
{{ scope.row.flag || '-' }}
</template>
<el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat">
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.flag || '-' }}-->
<!-- </template>-->
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
......@@ -192,8 +192,8 @@
:key="dict.dictValue"
:label="dict.dictValue"
>{{ dict.dictLabel }}
<!-- <el-radio label="0">正常</el-radio>-->
<!-- <el-radio label="1">停用</el-radio>-->
<!-- <el-radio label="0">正常</el-radio>-->
<!-- <el-radio label="1">停用</el-radio>-->
</el-radio>
</el-radio-group>
</el-form-item>
......@@ -316,8 +316,8 @@ export default {
rows: 10,
postCode: undefined,
postName: undefined,
flag: undefined,
status: ''
flag: undefined
// status: ''
},
// 表单参数
form: {
......@@ -436,7 +436,7 @@ export default {
deptId: undefined,
postSort: 0,
flag: '1',
status: '0',
// status: '0',
remark: undefined,
postNameAfter: undefined,
postNameBefore: undefined
......@@ -534,16 +534,24 @@ export default {
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
exportPost(queryParams).then(response => {
this.download(response.msg)
}).catch(function() {
this.$confirm('是否确认导出所有岗位数据项?', '警告', {
confirmButtonText: '确定',
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