Commit 411e9609 authored by 黄贤军's avatar 黄贤军

bug修改

parent 93f27c3a
Pipeline #21506 passed with stage
in 1 minute and 6 seconds
...@@ -5,6 +5,7 @@ var erpAPI = 'http://47.100.21.215:40402' ...@@ -5,6 +5,7 @@ var erpAPI = 'http://47.100.21.215:40402'
var authAPI = 'http://47.110.145.204:8095/' var authAPI = 'http://47.110.145.204:8095/'
// var erPiUrl = 'http://47.100.21.215:40402' // var erPiUrl = 'http://47.100.21.215:40402'
var mesAPI = 'http://47.110.145.204:8109/' // var mesAPI = 'http://47.110.145.204:8109/' //
mesAPI = 'http://192.168.4.116:5000/'
mesAPI = 'http://192.168.4.116:23000/' mesAPI = 'http://192.168.4.116:23000/'
var mockAPI = 'http://47.110.145.204:8082/mock/239' var mockAPI = 'http://47.110.145.204:8082/mock/239'
module.exports = { module.exports = {
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="set_project('ruleForm')">保存</el-button> <el-button type="primary" @click="set_project('ruleForm')">保存</el-button>
<el-button type="primary" @click="install_runner()">安装runner</el-button> <el-button type="primary" @click="install_runner()">安装runner</el-button>
<el-button type="primary" @click="application()">应用修改</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float:right;margin-top:-300px;margin-right:47%;"> <el-form-item style="float:right;margin-top:-300px;margin-right:47%;">
<el-progress type="circle" v-show="percentage!==0" :percentage="percentage"></el-progress> <el-progress type="circle" v-show="percentage!==0" :percentage="percentage"></el-progress>
...@@ -109,12 +110,45 @@ ...@@ -109,12 +110,45 @@
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
</el-tab-pane>
<el-tab-pane label="服务器配置" name="four">
<el-form :model="service_ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="项目代码" prop="name" >
<el-input class="demo" disabled v-model="service_ruleForm.project_no"></el-input>
<span class="Prompt">此项目代码从系统配置项目代码中获取</span>
</el-form-item>
<el-form-item label="数据库IP" prop="name">
<el-input class="demo" v-model="service_ruleForm.db_ip"></el-input>
</el-form-item>
<el-form-item label="数据库端口" prop="name">
<el-input class="demo" v-model="service_ruleForm.db_port"></el-input>
</el-form-item>
<el-form-item label="数据库用户名" prop="name">
<el-input class="demo" v-model="service_ruleForm.db_user"></el-input>
</el-form-item>
<el-form-item label="数据库密码" prop="name">
<el-input class="demo" type="password" v-model="service_ruleForm.db_password"></el-input>
</el-form-item>
<el-form-item label="TIIP数据库名" prop="name">
<el-input class="demo" v-model="service_ruleForm.tiip_db_name"></el-input>
</el-form-item>
<el-form-item label="MES数据库名" prop="name">
<el-input class="demo" v-model="service_ruleForm.mes_db_name"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="set_project('service_ruleForm')">保存</el-button>
</el-form-item>
<el-form-item style="float:right;margin-top:-300px;margin-right:47%;">
<el-progress type="circle" v-show="percentage!==0" :percentage="percentage"></el-progress>
</el-form-item>
</el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="推送升级" name="third"> <el-tab-pane label="推送升级" name="third">
<el-form :model="remote_server" :rules="rules" ref="remote_server" label-width="130px" class="demo-ruleForm"> <el-form :model="remote_server" :rules="rules" ref="remote_server" label-width="130px" class="demo-ruleForm">
<el-form-item label="项目代码" prop="name" > <!-- <el-form-item label="项目代码" prop="name" >
<el-input class="demo" v-model="remote_server.project_no"></el-input> <el-input class="demo" v-model="remote_server.project_no"></el-input>
</el-form-item> </el-form-item> -->
<el-form-item label="服务器IP" prop="name"> <el-form-item label="服务器IP" prop="name">
<el-input class="demo" v-model="remote_server.server_ip"></el-input> <el-input class="demo" v-model="remote_server.server_ip"></el-input>
</el-form-item> </el-form-item>
...@@ -179,6 +213,7 @@ export default { ...@@ -179,6 +213,7 @@ export default {
}, },
activeName: 'first', activeName: 'first',
ruleForm: { }, ruleForm: { },
service_ruleForm: {},
dialogTableVisible: false, dialogTableVisible: false,
gridData: [ gridData: [
{ {
...@@ -256,13 +291,12 @@ export default { ...@@ -256,13 +291,12 @@ export default {
} else { } else {
this.text = res.data this.text = res.data
} }
}).catch(() => {
clearInterval(this.chatTimer)
}) })
}, },
upgrade() { upgrade() {
axios.get(`mesAPI/upgrade/remote/`).then(res => { axios.get(`mesAPI/upgrade/remote/`).then(res => {
if (res.data) {
console.log(11)
}
this.dialogVisible_install = true this.dialogVisible_install = true
var myDate = new Date() var myDate = new Date()
var since_time = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-${myDate.getDate()} ${myDate.getHours()}:${myDate.getMinutes()}:${myDate.getSeconds()}` var since_time = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-${myDate.getDate()} ${myDate.getHours()}:${myDate.getMinutes()}:${myDate.getSeconds()}`
...@@ -316,18 +350,30 @@ export default { ...@@ -316,18 +350,30 @@ export default {
} }
) )
}, },
handleClick(tab, event) { handleClick(e) {
console.log(tab) if (e.label === '系统配置') {
}, this.get_project()
handleCurrentChange() { } else if (e.label === '系统升级') {
console.log(22) this.query_bill_list()
}, } else if (e.label === '服务器配置') {
handleSizeChange() { this.get_service_project()
console.log(22) } else {
this.get_remote_server()
}
console.log(e.label)
}, },
// 设置项目链接 // 设置项目链接
set_project() { set_project(str) {
this.$API.post(`mesAPI/connection/`, {}, {}, this.ruleForm).then(res => { let url = ''
let data = {}
if (str === 'service_ruleForm') {
url = `mesAPI/connection/remote_db/`
data = this.service_ruleForm
} else {
url = `mesAPI/connection/`
data = this.ruleForm
}
this.$API.post(url, {}, {}, data).then(res => {
if (res.data.message === '保存成功') { if (res.data.message === '保存成功') {
this.$message.success(res.data.message) this.$message.success(res.data.message)
} else { } else {
...@@ -336,6 +382,34 @@ export default { ...@@ -336,6 +382,34 @@ export default {
this.get_project() this.get_project()
}) })
}, },
// 安装应用
application() {
this.$confirm('此操作会重启所有app, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.openFullScreen('重启中,请稍等')
this.$API.get(`mesAPI/upgrade/apply/`).then(res => {
this.closeFullScreen(this.openFullScreen())
this.$message.success('修改成功')
}).catch(() => {
this.closeFullScreen(this.openFullScreen())
})
}).catch(() => {
})
},
// 获取服务器配置
get_service_project() {
this.$API.get(`mesAPI/connection/remote_db/`).then(res => {
if (!res.data) {
this.service_ruleForm = {}
} else {
this.service_ruleForm = res.data
this.service_ruleForm.project_no = this.ruleForm.project_no
}
})
},
// 获取项目链接 // 获取项目链接
get_project() { get_project() {
this.$API.get(`mesAPI/connection/`).then(res => { this.$API.get(`mesAPI/connection/`).then(res => {
...@@ -367,8 +441,9 @@ export default { ...@@ -367,8 +441,9 @@ export default {
}, },
activated() { activated() {
this.get_project() this.get_project()
this.query_bill_list() // this.query_bill_list()
this.get_remote_server() // this.get_remote_server()
// this.get_service_project()
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment