master
xy 2 years ago
parent db0685b41c
commit a14150f9d2

@ -17,7 +17,14 @@ export function loginOss(data) {
})
}
export function loginOssV2 (data) {
return request({
url: "/api/admin/auth/oss-login-v2",
method: "post",
data,
noloading:true
})
}
export function getInfo(token) {
return request({

@ -158,7 +158,7 @@ export default {
async logout() {
await this.$store.dispatch('app/clearLayout')
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
this.$router.push(`/login`);
},
handleClickOutside() {
this.$store.dispatch("app/closeSideBar", {

@ -9,6 +9,7 @@ import {
getToken
} from '@/utils/auth' // get token from cookie
import getPageTitle from '@/utils/get-page-title'
import { loginOssV2 } from "@/api/user"
NProgress.configure({
showSpinner: false
@ -23,13 +24,19 @@ router.beforeEach(async (to, from, next) => {
// set page title
document.title = getPageTitle(to.meta.title)
if (to.query.code) {
console.log(to)
const { token } = await loginOssV2({
code: to.query.code
})
store.commit('user/SET_TOKEN',token)
}
// determine whether the user has logged in
const hasToken = getToken()
if (hasToken) {
if (to.path === '/login') {
// if is logged in, redirect to the home page
console.log(to.fullPath)
await store.dispatch('user/resetToken')
next(to.fullPath)

@ -16,14 +16,7 @@ const store = new Vuex.Store({
settings,
user
},
getters,
plugins:[
createPersistedState({
storage:window.localStorage,
key:'worker-layout',
paths:['app.workerLayout']
})
]
getters
})
export default store

@ -48,17 +48,17 @@
<xy-table stripe ref="xyTable" :objectSpanMethod="objectSpanMethod" :table-item="table" :list="list" :show-summary="true"
:summary-method="summary">
<template v-slot:btns>
<el-table-column header-align="center" align="left" :width="130" label="操作" >
<el-table-column header-align="center" align="left" :width="150" label="操作" >
<template #default="{ row }">
<Button size="small" type="primary" @click="$refs['payPlan'].rowName = row.name,$refs['payPlan'].setId(row.id),$refs['payPlan'].show();">付款计划</Button>
<Button v-if="row.pid === 0" size="small" type="primary" @click="$refs['payPlan'].rowName = row.name,$refs['payPlan'].setId(row.id),$refs['payPlan'].show();"></Button>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange" />
</div>
<!-- <div style="display: flex;justify-content: flex-end;">-->
<!-- <Page :total="total" show-elevator @on-change="pageChange" show-sizer @on-page-size-change="pageSizeChange" />-->
<!-- </div>-->
<payPlan ref="payPlan"></payPlan>
</div>
@ -136,76 +136,75 @@
total: 0,
pageIndex: 1,
pageSize: 10,
table: [{
label: "隶属项目",
prop: 'pid_info_name',
width: 200,
align: 'left',
sortable: false,
fixed: 'left'
},
table: [
{
label: "项目名称",
prop: 'name',
prop: "name",
width: 200,
align: 'left',
align: "left",
sortable: false,
fixed: 'left'
fixed: "left",
},
{
label: "预算类型",
prop: 'type_detail.value',
label: "预算类型",
width: 115,
},
{
label: "所属年份",
prop: 'year',
width: 105
prop: "year",
width: 105,
},
// {
// label: "",
// prop: "plan_department.name",
// width: 110,
// },
{
label: "相关科室",
prop: 'plan_department.name',
width: 110
},
{
label: '年初预算金额(元)',
prop: 'money',
align: 'right',
label: "年初预算金额(元)",
prop: "money",
align: "right",
width: 180,
formatter: (cell, data, value) => {
return moneyFormatter(value)
}
if (value == 0) return "--";
else return moneyFormatter(value);
},
},
{
label: '调整后预算金额(元)',
prop: 'update_money',
align: 'right',
label: "调整后预算金额(元)",
prop: "update_money",
align: "right",
width: 200,
formatter: (cell, data, value) => {
return moneyFormatter(value)
}
return moneyFormatter(value);
},
},
{
label: "创建信息",
prop: 'created_at',
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), '{y}-{m}-{d}')
}
return parseTime(new Date(value), "{y}-{m}-{d}");
},
},
{
label: '科室',
width: 150,
prop: 'plan_department.name'
},
{
label: "描述",
minWidth: 300,
prop: 'content',
align: 'left',
sortable: false
prop: "content",
align: "left",
sortable: false,
},
],
select: {
page: 1,
year: "",
type: "",
department: ""
department: "",
},
departments: [], //
@ -286,20 +285,21 @@
year: this.select.year,
type: this.select.type,
plan_department_id: this.select.department,
top_pid: 1
//top_pid: 1,
is_auth: 0,
is_tree: 1
}).then(res => {
for (var m of res.list.data) {
for (var m of res.list) {
m.pid_info_name = m.pid_info?.name
}
this.list =
mergeTableRow({
data: res.list.data,
data: res.list,
mergeColNames: ["pid_info_name"], //
firstMergeColNames: ["pid_info_name"], // firstMerge
firstMerge: 'pid_info_name' //
})
this.total = res.list.total
//this.total = res.list.total
this.totalMoney = res.total_money
})
},

@ -130,7 +130,7 @@
</div>
</div>
<div class="out-sign-info" v-if="outContractDetail.flow_detail">
<div class="sign-info-title">合同会签信息</div>
<div class="sign-info-title">合同审批信息</div>
<div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div>
<div class="sign-info-item-content">

@ -176,7 +176,7 @@
<template v-slot:join_status v-if="adminEdit">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
合同会签流程
合同审批流程
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.join_status" placeholder="请选择">
@ -236,10 +236,10 @@
<Input v-model="planSearch" search enter-button=" " placeholder="搜索预算计划.." @on-search="getBudgets" />
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;"
ref="editorPlanTable" row-key="id" border default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" @select="selectPlan">
ref="editorPlanTable" row-key="id" border default-expand-all :tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }" @select="selectPlan">
<template v-slot:btns>
<el-table-column label="使用金额" header-align="center">
<template slot-scope="scope">
<el-table-column label="使用金额" header-align="center" width="130">
<template slot-scope="scope" v-if="scope.row.pid === 0">
<Input :value="scope.row.useMoney" @input="planInput($event,scope.row)" />
</template>
</el-table-column>
@ -449,7 +449,10 @@ import { resetSelect } from '@/utils'
planTable: [{
sortable: false,
width: 44,
type: "selection"
type: "selection",
selectable: (row, index) => {
return row.pid === 0
}
},
{
label: "科室",

@ -228,7 +228,7 @@
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">
合同会签状态
合同审批状态
</span>
<Select
@ -419,7 +419,7 @@
size="small"
type="primary"
@click="signProcess(scope.row)"
>合同会签
>合同审批
</Button>
</template>
<template
@ -958,7 +958,7 @@
row-key="id"
border
default-expand-all
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
@select="selectPlan"
>
<template v-slot:btns>
@ -969,7 +969,7 @@
width="140"
>
<template slot-scope="scope">
<Input v-if="scope.row.pid !== 0"
<Input v-if="scope.row.pid === 0"
:value="scope.row.useMoney"
@input="planInput($event, scope.row)"
/>
@ -1491,7 +1491,7 @@ export default {
}
},
{
label: "合同会签流程",
label: "合同审批流程",
width: 145,
prop: "join_status",
formatter: (cell, data, value) => {
@ -1778,7 +1778,7 @@ export default {
type: "selection",
fixed: "left",
selectable: (row, index) => {
return row.pid !== 0
return row.pid === 0
}
},
{

Loading…
Cancel
Save