2022.8.8 部门权限问题

master
271556543@qq.com 3 years ago
parent df47e516e0
commit bb6ced2c55

@ -1,32 +1,40 @@
import request from '@/utils/request' import request from '@/utils/request'
export function save(data) { export function save(data) {
return request({ return request({
url: '/api/admin/department/save', url: '/api/admin/department/save',
method: 'post', method: 'post',
data data
}) })
} }
export function listdept() { export function listdept() {
return request({ return request({
url: '/api/admin/department', url: '/api/admin/department',
method: 'get' method: 'get'
}) })
} }
export function del(data) { export function listdeptNoAuth(params = {show_tree:1}){
return request({ return request({
url: '/api/admin/department/delete', url:'/api/admin/other/admin-department-list',
method: 'post', method:'get',
data params
}) })
} }
export function adminDepartmentList(data) { export function del(data) {
return request({ return request({
url: '/api/admin/other/admin-department-list', url: '/api/admin/department/delete',
method: 'get', method: 'post',
params: data data
}) })
} }
export function adminDepartmentList(data) {
return request({
url: '/api/admin/other/admin-department-list',
method: 'get',
params: data
})
}

@ -217,7 +217,7 @@
<script> <script>
import {addBudget,getBudget,delBudget,editorBudget,detailBudget} from "@/api/budget/budget" import {addBudget,getBudget,delBudget,editorBudget,detailBudget} from "@/api/budget/budget"
import {listdept} from "@/api/system/department" import {listdeptNoAuth} from "@/api/system/department"
import {Message} from "element-ui"; import {Message} from "element-ui";
import {parseTime} from "@/utils" import {parseTime} from "@/utils"
export default { export default {
@ -336,7 +336,7 @@ export default {
}, },
// //
getDepartment(){ getDepartment(){
listdept().then(res=>{ listdeptNoAuth().then(res=>{
this.departments = res this.departments = res
}) })
}, },

@ -123,7 +123,7 @@ export default {
label:"ID", label:"ID",
sortable:false, sortable:false,
prop:'id', prop:'id',
width:160 width:130
}, },
{ {
label:"类型", label:"类型",
@ -150,6 +150,12 @@ export default {
sortable: false, sortable: false,
prop:'money', prop:'money',
align:'right' align:'right'
},
{
label:'使用金额',
sortable: false,
prop:'useMoney',
align:'right'
} }
], ],
journalTable:[ journalTable:[
@ -272,6 +278,20 @@ export default {
this.id = id this.id = id
let res = await detailContract({id:id}) let res = await detailContract({id:id})
this.detail = res this.detail = res
let plans = res.plans
let linkPlan = res.plan_link
let linkPlanTable = plans.map(item => {
let res = linkPlan.filter(item1 => {
return item1.plan_id === item.id
})[0]
return {
id:item.id,
name:item.name,
money:item.money,
useMoney:res.use_money
}
})
this.detail.plans = linkPlanTable
let plan = await getContractSign({contract_id:id}) let plan = await getContractSign({contract_id:id})
this.signPlan = plan.data this.signPlan = plan.data

@ -293,7 +293,7 @@
<script> <script>
import {getContract,addContrant,delContract} from "@/api/contract/contract" import {getContract,addContrant,delContract} from "@/api/contract/contract"
import {getparameter} from "@/api/system/dictionary" import {getparameter} from "@/api/system/dictionary"
import {listdept} from "@/api/system/department"; import {listdeptNoAuth} from "@/api/system/department";
import {getBudget} from "@/api/budget/budget" import {getBudget} from "@/api/budget/budget"
import {getOatoken} from "@/api/oatoken" import {getOatoken} from "@/api/oatoken"
import {parseTime} from "@/utils" import {parseTime} from "@/utils"
@ -849,7 +849,7 @@ export default {
}, },
// //
async getDepartment(){ async getDepartment(){
this.departments = await listdept() this.departments = await listdeptNoAuth()
}, },
// //
async getPurchaseType(){ async getPurchaseType(){

@ -49,7 +49,7 @@
<script> <script>
import {getProgress} from "@/api/budget/budget" import {getProgress} from "@/api/budget/budget"
import {listdept} from "@/api/system/department"; import {listdeptNoAuth} from "@/api/system/department";
export default { export default {
data() { data() {
return { return {
@ -131,7 +131,7 @@ export default {
}, },
// //
getDepartment(){ getDepartment(){
listdept().then(res=>{ listdeptNoAuth().then(res=>{
this.departments = res this.departments = res
}) })
}, },

Loading…
Cancel
Save