mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
🔄refactor: response.result调整为response.data
This commit is contained in:
parent
069991504c
commit
f496f48738
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
|
||||
* @Date: 2022-05-12 23:34:17
|
||||
* @LastEditTime: 2024-02-24 18:56:22
|
||||
* @LastEditTime: 2025-06-11 21:17:23
|
||||
* @Description: 为角色分配模块
|
||||
* @
|
||||
* @Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved.
|
||||
@ -119,7 +119,7 @@ export default {
|
||||
mounted() {
|
||||
var _this = this
|
||||
login.getModules().then(response => {
|
||||
var modules = response.result.map(function (item) {
|
||||
var modules = response.data.map(function (item) {
|
||||
let lable = item.name
|
||||
if (!item.isSys) {
|
||||
lable += '(非系统模块,可分配字段)'
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
})
|
||||
// 获取用户可访问的全部的菜单
|
||||
apiModules.loadMenus('').then(response => {
|
||||
_this.menus = response.result
|
||||
_this.menus = response.data
|
||||
_this.init()
|
||||
})
|
||||
},
|
||||
@ -156,13 +156,13 @@ export default {
|
||||
var _this = this
|
||||
apiModules.loadForRole(_this.roleId).then(response => {
|
||||
//选中有具体路由的节点,因为el-tree设置了自动级联,会自动选中上面的节点。但需要用tree.getCheckedNodes(false, true)获取
|
||||
_this.$refs.tree.setCheckedKeys(response.result.filter(i => i.url.trim() != "/").map(item => item.id))
|
||||
_this.$refs.tree.setCheckedKeys(response.data.filter(i => i.url.trim() != "/").map(item => item.id))
|
||||
})
|
||||
},
|
||||
getRoleMenuIds() { // 获取角色已分配的菜单
|
||||
var _this = this
|
||||
apiModules.loadMenusForRole(_this.roleId).then(response => {
|
||||
_this.roleMenuIds = response.result.map(item => item.id)
|
||||
_this.roleMenuIds = response.data.map(item => item.id)
|
||||
})
|
||||
},
|
||||
onChange(val) {
|
||||
|
@ -263,7 +263,7 @@ export default {
|
||||
this.changeAttrType()
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getOrgs().then(response => {
|
||||
_this.orgs = response.result.map(function (item) {
|
||||
_this.orgs = response.data.map(function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
|
@ -79,11 +79,11 @@ export default {
|
||||
var moduleId = route.meta.moduleId
|
||||
//加载模块对应的打印方案
|
||||
modules.loadPrinterPlans(moduleId).then(response => {
|
||||
this.modulePlans = response.result
|
||||
this.modulePlans = response.data
|
||||
})
|
||||
//加载模块对应的送审方案
|
||||
modules.loadFlowSchemes(moduleId).then(response => {
|
||||
this.flowschemes = response.result
|
||||
this.flowschemes = response.data
|
||||
})
|
||||
this.buttons = elements.sort((a, b) => {
|
||||
return a.sort - b.sort
|
||||
|
@ -278,7 +278,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
roles.getList(this.tableData.listQuery).then((response) => {
|
||||
this.tableData.datas = response.result
|
||||
this.tableData.datas = response.data
|
||||
this.initCurrentPageData()
|
||||
this.setSelectTable()
|
||||
})
|
||||
@ -313,7 +313,7 @@ export default {
|
||||
*/
|
||||
getLeftTree() {
|
||||
login.getOrgs().then((response) => {
|
||||
this.leftTreeDatas = response.result.map(function (item) {
|
||||
this.leftTreeDatas = response.data.map(function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
|
@ -16,7 +16,7 @@ const user = {
|
||||
getCheckModules({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getModules(state.token).then(response => {
|
||||
commit('SET_CHECK_MODULES', response.result)
|
||||
commit('SET_CHECK_MODULES', response.data)
|
||||
resolve(response)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
@ -19,8 +19,8 @@ const serverConf = {
|
||||
}
|
||||
|
||||
isIdentityAuth().then(response => {
|
||||
commit('SET_IDENTITYAUTH', response.result)
|
||||
resolve(response.result)
|
||||
commit('SET_IDENTITYAUTH', response.data)
|
||||
resolve(response.data)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
@ -47,7 +47,7 @@ const user = {
|
||||
GetInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo(state.token).then(response => {
|
||||
commit('SET_NAME', response.result)
|
||||
commit('SET_NAME', response.data)
|
||||
resolve(response)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -59,7 +59,7 @@ const user = {
|
||||
GetDefaultOrg({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getOrgs(state.token).then(response => {
|
||||
commit('SET_DEFAULTORG', response.result[0])
|
||||
commit('SET_DEFAULTORG', response.data[0])
|
||||
resolve(response)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -70,7 +70,7 @@ const user = {
|
||||
GetModules({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getModules(state.token).then(response => {
|
||||
commit('SET_MODULES', response.result)
|
||||
commit('SET_MODULES', response.data)
|
||||
resolve(response)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -85,8 +85,8 @@ const user = {
|
||||
return
|
||||
}
|
||||
getModulesTree(state.token).then(response => {
|
||||
commit('SET_MODULES', response.result)
|
||||
resolve(response.result)
|
||||
commit('SET_MODULES', response.data)
|
||||
resolve(response.data)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
@ -391,7 +391,7 @@ export default {
|
||||
// 获取部门信息
|
||||
getPartData() {
|
||||
login.getOrgs().then((response) => {
|
||||
this.partDatas = response.result.map(function(item) {
|
||||
this.partDatas = response.data.map(function(item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
@ -460,7 +460,7 @@ export default {
|
||||
this.comonInfo.loading = true
|
||||
this.roleInfo.listQuery.key = this.searchKey
|
||||
roles.getList(this.listQuery).then((response) => {
|
||||
this.comonInfo.datas = response.result
|
||||
this.comonInfo.datas = response.data
|
||||
this.comonInfo.loading = false
|
||||
this.setSelectTable()
|
||||
})
|
||||
|
@ -222,24 +222,24 @@ export default {
|
||||
canWriteFormItemIds: JSON.stringify(_this.canWriteFormItemIds),
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.result.frmType === 1) {
|
||||
if (response.data.frmType === 1) {
|
||||
// 用户自定义的页面,即Vue组件
|
||||
_this.postObj.frmType = 1
|
||||
_this.postObj.dbName = response.result.webId
|
||||
_this.postObj.dbName = response.data.webId
|
||||
let loadComp = () => import(`@/views/forms/userDefine/${this.postObj.dbName}/add`)
|
||||
loadComp().then(res => {
|
||||
_this.userDefineComp = res.default
|
||||
})
|
||||
|
||||
} else if (response.result.frmType === 2) {
|
||||
} else if (response.data.frmType === 2) {
|
||||
_this.reLoadVform = false;
|
||||
// 拖拽界面
|
||||
_this.postObj.frmType = 2
|
||||
_this.postObj.dbName = ''
|
||||
response.result.html = response.result.content // 暂无用content替代一下html
|
||||
response.data.html = response.data.content // 暂无用content替代一下html
|
||||
|
||||
//拖动表单
|
||||
if (!response.result.contentData.includes('widgetList')) {
|
||||
if (!response.data.contentData.includes('widgetList')) {
|
||||
this.$message({
|
||||
message: '最新版表单设计不支持v4.4及以前版本的拖动表单,新增个表单试试~~',
|
||||
type: 'error',
|
||||
@ -247,7 +247,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
this.formJson = JSON.parse(response.result.contentData)
|
||||
this.formJson = JSON.parse(response.data.contentData)
|
||||
this.$nextTick(()=>{
|
||||
_this.reLoadVform = true;
|
||||
_this.$nextTick(()=>{
|
||||
@ -256,20 +256,20 @@ export default {
|
||||
})
|
||||
|
||||
//读写权限控制
|
||||
if (response.result.canWriteFormItemIds && response.result.canWriteFormItemIds.length > 0) {
|
||||
if (response.data.canWriteFormItemIds && response.data.canWriteFormItemIds.length > 0) {
|
||||
_this.$nextTick(function () {
|
||||
_this.$refs.vFormRef.disableForm()
|
||||
_this.$refs.vFormRef.enableWidgets(response.result.canWriteFormItemIds)
|
||||
_this.$refs.vFormRef.enableWidgets(response.data.canWriteFormItemIds)
|
||||
})
|
||||
}
|
||||
|
||||
_this.frmPreview = response.result.html // 表单预览的数据
|
||||
_this.fields = response.result.fields // 表单属性的个数
|
||||
_this.frmPreview = response.data.html // 表单预览的数据
|
||||
_this.fields = response.data.fields // 表单属性的个数
|
||||
} else {
|
||||
_this.postObj.frmType = 0
|
||||
_this.postObj.dbName = ''
|
||||
_this.frmPreview = response.result.htmlWithCanWriteIds // 表单预览的数据
|
||||
_this.fields = response.result.fields // 表单属性的个数
|
||||
_this.frmPreview = response.data.htmlWithCanWriteIds // 表单预览的数据
|
||||
_this.fields = response.data.fields // 表单属性的个数
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -102,18 +102,18 @@ export default {
|
||||
id: id,
|
||||
})
|
||||
.then((response) => {
|
||||
_this.postObj = response.result
|
||||
_this.postObj = response.data
|
||||
if (_this.postObj.frmType === 2) {
|
||||
//拖动表单
|
||||
if (!response.result.frmContentData.includes('widgetList')) {
|
||||
if (!response.data.frmContentData.includes('widgetList')) {
|
||||
_this.$message({
|
||||
message: '最新版表单设计不支持v4.4及以前版本的拖动表单,新增个表单试试~~',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
_this.formJson = JSON.parse(response.result.frmContentData)
|
||||
_this.formData = JSON.parse(response.result.frmData)
|
||||
_this.formJson = JSON.parse(response.data.frmContentData)
|
||||
_this.formData = JSON.parse(response.data.frmData)
|
||||
|
||||
_this.$nextTick(function () {
|
||||
this.$refs.vFormRef.disableForm()
|
||||
@ -135,7 +135,7 @@ export default {
|
||||
flowInstanceId: id,
|
||||
})
|
||||
.then((response) => {
|
||||
this.histories = response.result
|
||||
this.histories = response.data
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
|
@ -255,7 +255,7 @@
|
||||
id: row.id,
|
||||
})
|
||||
.then((response) => {
|
||||
var type = response.result.nextNodeDesignateType
|
||||
var type = response.data.nextNodeDesignateType
|
||||
var secondNodeDync = type === 'RUNTIME_SPECIAL_USER' || type === 'RUNTIME_SPECIAL_ROLE'
|
||||
if (secondNodeDync) {
|
||||
this.$router.push('/flowinstances/verify/' + row.id)
|
||||
|
@ -169,9 +169,9 @@ export default {
|
||||
id: id,
|
||||
})
|
||||
.then((response) => {
|
||||
this.postObj = response.result
|
||||
this.formData = JSON.parse(response.result.frmData)
|
||||
this.formJson = JSON.parse(response.result.frmContentData)
|
||||
this.postObj = response.data
|
||||
this.formData = JSON.parse(response.data.frmData)
|
||||
this.formJson = JSON.parse(response.data.frmContentData)
|
||||
|
||||
if (this.postObj.frmType === 1) {
|
||||
// 用户自定义的页面,即Vue组件
|
||||
|
@ -149,29 +149,29 @@ export default {
|
||||
id: id,
|
||||
})
|
||||
.then((response) => {
|
||||
this.flowObj = response.result
|
||||
this.flowObj = response.data
|
||||
if (this.flowObj.frmType === 2) {
|
||||
//拖动表单
|
||||
if (!response.result.frmContentData.includes('widgetList')) {
|
||||
if (!response.data.frmContentData.includes('widgetList')) {
|
||||
this.$message({
|
||||
message: '最新版表单设计不支持v4.4及以前版本的拖动表单,新增个表单试试~~',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
this.formJson = JSON.parse(response.result.frmContentData)
|
||||
this.formData = JSON.parse(response.result.frmData)
|
||||
this.formJson = JSON.parse(response.data.frmContentData)
|
||||
this.formData = JSON.parse(response.data.frmData)
|
||||
} else if (this.flowObj.frmType === 1) { //用户自定义表单
|
||||
let loadComp = () => import(`@/views/forms/userDefine/${this.flowObj.dbName}/detail`)
|
||||
loadComp().then(res => {
|
||||
this.userDefineComp = res.default
|
||||
})
|
||||
}
|
||||
this.postObj.frmType = response.result.frmType
|
||||
this.postObj.NodeDesignateType = response.result.nextNodeDesignateType //节点的执行权限类型,如执行时选定用户或设计时确定用户
|
||||
this.postObj.frmType = response.data.frmType
|
||||
this.postObj.NodeDesignateType = response.data.nextNodeDesignateType //节点的执行权限类型,如执行时选定用户或设计时确定用户
|
||||
var nodes = JSON.parse(this.flowObj.schemeContent).nodes
|
||||
this.FlowNodes = nodes // 需要过滤条件,应该退回到已经处理过的某个节点
|
||||
this.canWriteFormItemIds = response.result.canWriteFormItemIds
|
||||
this.canWriteFormItemIds = response.data.canWriteFormItemIds
|
||||
|
||||
if (this.flowObj.frmType === 2) {
|
||||
//控制拖动表单字段读写权限
|
||||
|
@ -245,9 +245,9 @@ export default {
|
||||
id: val,
|
||||
})
|
||||
.then((response) => {
|
||||
_this.postObj.frmType = response.result.frmType
|
||||
if (response.result.frmType === 1) {// 自定义表单
|
||||
let loadComp = () => import(`@/views/forms/userDefine/${response.result.webId}/add`)
|
||||
_this.postObj.frmType = response.data.frmType
|
||||
if (response.data.frmType === 1) {// 自定义表单
|
||||
let loadComp = () => import(`@/views/forms/userDefine/${response.data.webId}/add`)
|
||||
loadComp().then(res => {
|
||||
_this.userDefineComp = res.default
|
||||
_this.$nextTick(() => {
|
||||
@ -258,8 +258,8 @@ export default {
|
||||
|
||||
return
|
||||
}
|
||||
if (response.result.frmType === 2) {
|
||||
if (!response.result.contentData.includes('widgetList')) {
|
||||
if (response.data.frmType === 2) {
|
||||
if (!response.data.contentData.includes('widgetList')) {
|
||||
this.$message({
|
||||
message: '最新版表单设计不支持v4.4及以前版本的拖动表单,新增个表单试试~~',
|
||||
type: 'error',
|
||||
@ -267,15 +267,15 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 拖动表单
|
||||
_this.formJson = JSON.parse(response.result.contentData)
|
||||
_this.formJson = JSON.parse(response.data.contentData)
|
||||
_this.$refs.vFormRef[0].setFormJson(_this.formJson)
|
||||
_this.$nextTick(()=>{
|
||||
_this.currentForm = _this.$refs.vFormRef[0].getFieldWidgets().map(item=>{return {name:item.field.options.name, title:item.field.options.label}})
|
||||
})
|
||||
return
|
||||
}
|
||||
_this.frmPreview = response.result.html // 默认动态表单
|
||||
_this.currentForm = JSON.parse(response.result.contentData)
|
||||
_this.frmPreview = response.data.html // 默认动态表单
|
||||
_this.currentForm = JSON.parse(response.data.contentData)
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
|
@ -223,7 +223,7 @@ export default {
|
||||
forms
|
||||
.get(id)
|
||||
.then((response) => {
|
||||
this.postForm = response.result
|
||||
this.postForm = response.data
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
|
@ -135,7 +135,7 @@ export default {
|
||||
handleChange(file, fileList) {
|
||||
this.temp.files = fileList
|
||||
.filter((u) => u.status === 'success')
|
||||
.map((u) => u.response.result[0])
|
||||
.map((u) => u.response.data[0])
|
||||
.map((u) => {
|
||||
return {
|
||||
fileName: u.fileName,
|
||||
|
@ -73,7 +73,7 @@
|
||||
methods: {
|
||||
handleChange(file, fileList) {
|
||||
this.temp.files = fileList.filter(u => u.status === 'success')
|
||||
.map(u => u.response.result[0])
|
||||
.map(u => u.response.data[0])
|
||||
.map(u => {
|
||||
return {
|
||||
fileName: u.fileName,
|
||||
|
@ -437,7 +437,7 @@ export default {
|
||||
})
|
||||
|
||||
flowschemesApi.loadUrlFormFlowScheme().then((response) => {
|
||||
this.sysFlowschemes = response.result
|
||||
this.sysFlowschemes = response.data
|
||||
})
|
||||
|
||||
},
|
||||
@ -524,14 +524,14 @@ export default {
|
||||
this.listLoading = true
|
||||
var moduleId = this.currentModule === null ? null : this.currentModule.id
|
||||
modules.loadMenus(moduleId).then(response => {
|
||||
this.list = response.result
|
||||
this.total = response.result.length
|
||||
this.list = response.data
|
||||
this.total = response.data.length
|
||||
this.listLoading = false
|
||||
})
|
||||
|
||||
//加载模块对应的打印方案
|
||||
modules.loadPrinterPlans(moduleId).then(response => {
|
||||
this.modulePlans = response.result
|
||||
this.modulePlans = response.data
|
||||
if(this.modulePlans.length >0){
|
||||
this.canSelPrinterPlans = this.canSelPrinterPlans.filter(x => !this.modulePlans.some(b=>b.id == x.id));
|
||||
}else{
|
||||
@ -541,7 +541,7 @@ export default {
|
||||
|
||||
//加载模块对应的送审方案
|
||||
modules.loadFlowSchemes(moduleId).then(response => {
|
||||
this.flowschemes = response.result
|
||||
this.flowschemes = response.data
|
||||
if(this.flowschemes.length >0){
|
||||
this.canSelFlowschemes = this.canSelFlowschemes.filter(x => !this.flowschemes.some(b=>b.id == x.id));
|
||||
}else{
|
||||
@ -552,7 +552,7 @@ export default {
|
||||
getModulesTree() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getModules().then(response => {
|
||||
_this.modules = response.result.map(function (item) {
|
||||
_this.modules = response.data.map(function (item) {
|
||||
return {
|
||||
sortNo: item.sortNo,
|
||||
id: item.id,
|
||||
@ -635,8 +635,8 @@ export default {
|
||||
_this.temp.parentId = _this.temp.parentId || _this.lastParentId
|
||||
modules.add(_this.temp).then(response => {
|
||||
// 需要回填数据库生成的数据
|
||||
_this.temp.id = response.result.id
|
||||
_this.temp.cascadeId = response.result.cascadeId
|
||||
_this.temp.id = response.data.id
|
||||
_this.temp.cascadeId = response.data.cascadeId
|
||||
_this.list.unshift(_this.temp)
|
||||
_this.dialogFormVisible = false
|
||||
_this.$notify({
|
||||
@ -715,7 +715,7 @@ export default {
|
||||
if (valid) {
|
||||
modules.addMenu(this.menuTemp).then(response => {
|
||||
// 需要回填数据库生成的数据
|
||||
this.menuTemp.id = response.result.id
|
||||
this.menuTemp.id = response.data.id
|
||||
this.list.unshift(this.menuTemp)
|
||||
this.dialogMenuVisible = false
|
||||
this.$notify({
|
||||
|
@ -404,7 +404,7 @@ export default {
|
||||
getOrgTree() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getOrgs().then(response => {
|
||||
_this.orgs = response.result.map(function (item) {
|
||||
_this.orgs = response.data.map(function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
@ -461,8 +461,8 @@ export default {
|
||||
if (valid) {
|
||||
orgs.add(this.temp).then((response) => {
|
||||
// 需要回填数据库生成的数据
|
||||
this.temp.id = response.result.id
|
||||
this.temp.cascadeId = response.result.cascadeId
|
||||
this.temp.id = response.data.id
|
||||
this.temp.cascadeId = response.data.cascadeId
|
||||
this.list.unshift({...this.temp, ...{chairmanName:this.chairmanName}})
|
||||
this.dialogFormVisible = false
|
||||
this.$notify({
|
||||
|
@ -277,8 +277,8 @@ export default {
|
||||
}
|
||||
resourcesApi.loadForRole(this.multipleSelection[0].id)
|
||||
.then(response => {
|
||||
this.assignedResourceIds = response.result.map(u => u.id)
|
||||
this.assignedResourceNames = response.result.map(u => u.name).join(',')
|
||||
this.assignedResourceIds = response.data.map(u => u.id)
|
||||
this.assignedResourceNames = response.data.map(u => u.name).join(',')
|
||||
this.dialogAccessResource = true
|
||||
})
|
||||
break
|
||||
@ -314,8 +314,8 @@ export default {
|
||||
this.listLoading = true
|
||||
this.list = []
|
||||
roles.getList(this.listQuery).then(response => {
|
||||
this.roleList = response.result
|
||||
this.total = response.result.length
|
||||
this.roleList = response.data
|
||||
this.total = response.data.length
|
||||
this.listLoading = false
|
||||
this.pageFn()
|
||||
})
|
||||
@ -370,7 +370,7 @@ export default {
|
||||
if (valid) {
|
||||
roles.add(this.temp).then((response) => {
|
||||
this.roleUsers.list.unshift([])
|
||||
this.temp.id = response.result.id
|
||||
this.temp.id = response.data.id
|
||||
this.list.unshift(this.temp)
|
||||
this.dialogFormVisible = false
|
||||
this.$notify({
|
||||
|
@ -232,7 +232,7 @@ export default {
|
||||
tableViewName: newColView,
|
||||
})
|
||||
.then((response) => {
|
||||
this.columnList = response.result;
|
||||
this.columnList = response.data;
|
||||
this.initPrint();
|
||||
});
|
||||
}
|
||||
@ -241,7 +241,7 @@ export default {
|
||||
sysPrinterPlans
|
||||
.getTables()
|
||||
.then((response) => {
|
||||
this.tableList = response.result;
|
||||
this.tableList = response.data;
|
||||
});
|
||||
this.initPrint();
|
||||
this.id = this.$route.params && this.$route.params.id
|
||||
@ -251,11 +251,11 @@ export default {
|
||||
id: this.id,
|
||||
})
|
||||
.then((response) => {
|
||||
this.name = response.result.name;
|
||||
this.columnView = response.result.columnView;
|
||||
this.sourceSql = response.result.sourceSql
|
||||
this.groupBy = response.result.groupBy
|
||||
let template = JSON.parse(response.result.planContent)
|
||||
this.name = response.data.name;
|
||||
this.columnView = response.data.columnView;
|
||||
this.sourceSql = response.data.sourceSql
|
||||
this.groupBy = response.data.groupBy
|
||||
let template = JSON.parse(response.data.planContent)
|
||||
hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: template,
|
||||
settingContainer: '#PrintElementOptionSetting',
|
||||
@ -546,7 +546,7 @@ export default {
|
||||
inParamColumn: this.inParamColumns.join(),
|
||||
planContent: JSON.stringify(hiprintTemplate.getJson()) //模板内容
|
||||
}).then((response) => {
|
||||
this.id = response.result
|
||||
this.id = response.data
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '创建成功',
|
||||
|
@ -279,7 +279,7 @@ export default {
|
||||
mounted() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getOrgs().then(response => {
|
||||
_this.orgs = response.result.map(function (item) {
|
||||
_this.orgs = response.data.map(function (item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
@ -415,7 +415,7 @@ export default {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
users.add(this.temp).then((response) => {
|
||||
this.temp.id = response.result
|
||||
this.temp.id = response.data
|
||||
this.list.unshift({...this.temp, ...{parentName:this.parentName}})
|
||||
this.dialogFormVisible = false
|
||||
this.$notify({
|
||||
@ -471,7 +471,7 @@ export default {
|
||||
apiRoles.loadForUser(this.temp.id).then(response => {
|
||||
_this.dialogRoleStatus = 'update'
|
||||
_this.dialogRoleVisible = true
|
||||
_this.selectRoles = response.result
|
||||
_this.selectRoles = response.data
|
||||
_this.getRoleList()
|
||||
_this.$nextTick(() => {
|
||||
_this.$refs['rolesForm'].clearValidate()
|
||||
@ -481,7 +481,7 @@ export default {
|
||||
// 获取角色
|
||||
getRoleList() {
|
||||
apiRoles.getList({}).then(response => {
|
||||
this.selectRoleNames = [...response.result].filter(x => this.selectRoles.indexOf(x.id) > -1).map(item => item.name || item.account).join(',')
|
||||
this.selectRoleNames = [...response.data].filter(x => this.selectRoles.indexOf(x.id) > -1).map(item => item.name || item.account).join(',')
|
||||
})
|
||||
},
|
||||
rolesChange(type, val) {
|
||||
|
@ -161,14 +161,14 @@
|
||||
getUserProfile() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getUserProfile().then(response => {
|
||||
_this.temp = response.result
|
||||
_this.temp = response.data
|
||||
})
|
||||
},
|
||||
|
||||
getModulesTree() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getModules().then(response => {
|
||||
_this.modules = response.result.map(function(item) {
|
||||
_this.modules = response.data.map(function(item) {
|
||||
return {
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
@ -183,7 +183,7 @@
|
||||
getOrgTree() {
|
||||
var _this = this // 记录vuecomponent
|
||||
login.getOrgs().then(response => {
|
||||
_this.orgs = response.result.map(function(item) {
|
||||
_this.orgs = response.data.map(function(item) {
|
||||
var name = item.name
|
||||
if (_this.defaultorgid === item.id) {
|
||||
name = name + '✅'
|
||||
|
@ -74,7 +74,7 @@ export default {
|
||||
async getMainInfo(id) {
|
||||
try {
|
||||
const response = await getMainInfo({id: id})
|
||||
this.firstTemp = response.result
|
||||
this.firstTemp = response.data
|
||||
} catch (error) {
|
||||
this.$message.error('获取主表信息失败')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user