Commit 25ee2930 authored by 张冬's avatar 张冬

项目终止接口对接及操作

parent 547733da
...@@ -158,6 +158,13 @@ export function projectDetail(projectId) { ...@@ -158,6 +158,13 @@ export function projectDetail(projectId) {
method: 'get' method: 'get'
}) })
} }
// 项目终止
export function projectEnd(projectId) {
return request({
url: `tender-end/projectEnd/${projectId}`,
method: 'put'
})
}
// 部署线上 // 部署线上
export function autodeploy() { export function autodeploy() {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</li> </li>
</ul> --> </ul> -->
<ul class="flex"> <ul class="flex">
<li v-for="(item,index) in states" :key="index" > <li v-for="(item,index) in states" :key="index">
<el-button type="primary" @click="jump(item.button,item.uri)">{{ item.button }}</el-button> <el-button type="primary" @click="jump(item.button,item.uri)">{{ item.button }}</el-button>
</li> </li>
</ul> </ul>
...@@ -29,54 +29,75 @@ ...@@ -29,54 +29,75 @@
</template> </template>
<script> <script>
import { projectConsole} from '@api/purchaser/bid' import {
import dataBreadcrumb from '@components/dataBreadcrumb.vue' projectEnd
import changeNav from '@components/changeNav.vue' } from '@api/common/list'
export default { import {
projectConsole
} from '@api/purchaser/bid'
import dataBreadcrumb from '@components/dataBreadcrumb.vue'
import changeNav from '@components/changeNav.vue'
export default {
components: { components: {
dataBreadcrumb, dataBreadcrumb,
changeNav changeNav
}, },
data() { data() {
return { return {
states:[], states: [],
breads: ['招标管理', '招标项目管理 ', '工作台'], breads: ['招标管理', '招标项目管理 ', '工作台'],
navs: ['工作台'], navs: ['工作台'],
remark:"" remark: ""
} }
}, },
methods: { methods: {
back(){ back() {
this.$router.go(-1) this.$router.go(-1)
}, },
async jump(label,url){ jump(label, url) {
console.log(label,url) if (label == "项目终止") {
if(label=="项目终止"){
this.$confirm('确定要终止吗?', '提示', { this.$confirm('确定要终止吗?', '提示', {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(async () => {
this.$message.success('终止成功') let projectId = localStorage.getItem("projectId")
const {
msg,
code
} = await projectEnd(projectId)
if (code == 200) {
this.$message({
message: msg,
type: 'success',
duration: 1500
})
setTimeout(() => {
this.$router.go(-1)
}, 1500)
} else {
this.$message.error(msg)
}
}) })
.catch(() => {}) .catch(() => {})
}else{ } else {
this.$router.push(url) this.$router.push(url)
} }
}, },
async getprojectConsole() { async getprojectConsole() {
try { try {
let message={} let message = {}
message.projectId=localStorage.getItem("projectId") message.projectId = localStorage.getItem("projectId")
message.type=1 message.type = 1
const { const {
data, data,
msg, msg,
code code
} = await projectConsole(message) } = await projectConsole(message)
if(code==200){ if (code == 200) {
this.states=data this.states = data
this.remark=data[0].remark this.remark = data[0].remark
}else{ } else {
this.$message.error(msg) this.$message.error(msg)
} }
} catch (e) { } catch (e) {
...@@ -87,7 +108,7 @@ export default { ...@@ -87,7 +108,7 @@ export default {
created() { created() {
this.getprojectConsole() this.getprojectConsole()
} }
} }
</script> </script>
<style scoped> <style scoped>
...@@ -96,10 +117,12 @@ export default { ...@@ -96,10 +117,12 @@ export default {
/* margin-left: 50px; */ /* margin-left: 50px; */
} }
.state>ul{
.state>ul {
flex-wrap: wrap; flex-wrap: wrap;
} }
.state>ul>li{
.state>ul>li {
margin-right: 50px; margin-right: 50px;
margin-bottom: 50px; margin-bottom: 50px;
cursor: pointer; cursor: pointer;
......
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