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