解决run build的问题,并更改baseUrl到https

main
wuyize 2022-07-08 16:10:19 +08:00
parent e79a2134c4
commit fa6ded8ed2
5 changed files with 34 additions and 14 deletions

View File

@ -1,4 +1,5 @@
//const baseUrl = "http://192.168.31.194:8081/" //const baseUrl = "http://192.168.31.194:8081/"
//const baseUrl = "http://36.5.61.1:8081/" //const baseUrl = "http://36.5.61.1:8081/"
const baseUrl = "http://101.34.228.45:8080/api/" //const baseUrl = "http://101.34.228.45:8080/api/"
const baseUrl = "https://www.hammer-hfut.tk/api/"
export default baseUrl; export default baseUrl;

View File

@ -30,7 +30,7 @@
<el-table-column min-width="10%" align="right"> <el-table-column min-width="10%" align="right">
<template #default="scope"> <template #default="scope">
<div style="height: 32px;"> <div style="height: 32px;">
<el-button v-show="this.$store.state.staff===null? false:(this.$store.state.staff.staffId===scope.row.projectCreator)" type="primary" plain <el-button v-show="showCloseProjectButton(scope.row)" type="primary" plain
@click="onCloseProject(scope.row)">结项 @click="onCloseProject(scope.row)">结项
</el-button> </el-button>
</div> </div>
@ -98,6 +98,9 @@ export default {
staffId: Number staffId: Number
} }
},
computed: {
}, },
created() { created() {
// watch 便 // watch 便
@ -119,6 +122,9 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
showCloseProjectButton(row) {
return this.$store.state.staff===null? false:(this.$store.state.staff.staffId===row.projectCreator)
},
onRowClick(row, column, event) { onRowClick(row, column, event) {
router.push({path: '/project/'+row.projectId}) router.push({path: '/project/'+row.projectId})
}, },

View File

@ -32,13 +32,15 @@
display: flex; flex-direction: row; align-items: center;justify-content: space-between"> display: flex; flex-direction: row; align-items: center;justify-content: space-between">
<logout-button></logout-button> <logout-button></logout-button>
<span <span
style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">{{ project.projectName }}</span> style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">{{
project.projectName
}}</span>
<div style="margin: 0 30px 0 30px; ; <div style="margin: 0 30px 0 30px; ;
display: flex; flex-direction: row-reverse; align-items: center"> display: flex; flex-direction: row-reverse; align-items: center">
<div style="width: 42px;height: 42px; background-color: #409EFF; border-radius: 21px; <div style="width: 42px;height: 42px; background-color: #409EFF; border-radius: 21px;
display: flex; justify-content: center;align-items: center;"> display: flex; justify-content: center;align-items: center;">
<span style="color: white">{{ <span style="color: white">{{
this.$store.state.staff === null ? this.$store.state.staff : this.$store.state.staff.staffFullname[0] getStaffFullname()[0]
}}</span> }}</span>
</div> </div>
<div style="height: 100%; margin-right: 10px; <div style="height: 100%; margin-right: 10px;
@ -46,7 +48,7 @@
<span <span
style="color: #606266; font-family: 'Segoe UI',sans-serif;font-size: 14px;font-weight: bold; "> style="color: #606266; font-family: 'Segoe UI',sans-serif;font-size: 14px;font-weight: bold; ">
{{ {{
this.$store.state.staff === null ? this.$store.state.staff : this.$store.state.staff.staffFullname getStaffFullname()
}}</span> }}</span>
<span style="color: #606266; font-family: 'Segoe UI',sans-serif;font-size: 12px;">{{ <span style="color: #606266; font-family: 'Segoe UI',sans-serif;font-size: 12px;">{{
projectStaffPosition projectStaffPosition
@ -116,6 +118,9 @@ export default {
this.getProjectGroup() this.getProjectGroup()
}, },
methods: { methods: {
getStaffFullname() {
return this.$store.state.staff === null ? ' ' : this.$store.state.staff.staffFullname
},
getProjectInfo() { getProjectInfo() {
const that = this const that = this
request({ request({

View File

@ -1,14 +1,15 @@
<template> <template>
<view style="display: flex;height: 100%;justify-content: space-around;"> <view style="display: flex;margin: 0 30px 10px 30px;height: 100%;justify-content: space-around;">
<div class="left" ref="leftRef" style="width: 50%;height: 100%;"> <div class="left" ref="leftRef" style="width: 50%;height: 100%;padding: 0 30px 0 0">
<div style="margin: 0 0 26px 0;display: flex;flex-direction: row;justify-content: space-between" ref="left_title_Ref"> <div style="margin: 0 0 26px 0;display: flex;flex-direction: row;justify-content: space-between" ref="left_title_Ref">
<p style="text-align:center; 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">项目团队</p> <p style="text-align:center; 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">项目团队</p>
<el-button style="" type="primary" >新增成员</el-button> <el-button style="" type="primary" >新增成员</el-button>
</div> </div>
<el-table <el-table
ref="tableRef" ref="tableRef"
class="projectTable" style="width: 100%"
:height="tableHeight" :height="tableHeight"
:data="tableData"> :data="tableData">
<el-table-column prop="staffFullname" label="姓名" min-width="25%"> </el-table-column> <el-table-column prop="staffFullname" label="姓名" min-width="25%"> </el-table-column>
@ -59,7 +60,7 @@
</div> </div>
</div> </div>
<div class="right" style="width: 45%;display: flex;flex-direction: column;height: 100%;"> <div class="right" style="width: 50%;display: flex;flex-direction: column;height: 100%;">
<div style="display: flex;flex-direction: column;height: 100%"> <div style="display: flex;flex-direction: column;height: 100%">
<p style="'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266;margin: 0 0 30px 0;flex-shrink: 0;">岗位统计</p> <p style="'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266;margin: 0 0 30px 0;flex-shrink: 0;">岗位统计</p>
<div style="flex: 1;height: 100%"> <div style="flex: 1;height: 100%">

View File

@ -488,9 +488,16 @@ export default {
else else
Promise.reject(response) Promise.reject(response)
}).catch(function (error) { }).catch(function (error) {
console.log(error) console.log(error.data)
let msg = '修改失败,'
if(error.data&&error.data.msg)
{
msg+=error.data.msg
}
else
msg+='未知错误'
ElMessage({ ElMessage({
message: '修改失败', message: msg,
type: 'error', type: 'error',
}) })
if (submitForm.taskFatherId === 0) { if (submitForm.taskFatherId === 0) {