Browse Source

带范围发布

old
jiangyy 4 years ago
parent
commit
377683885e
  1. 2
      .env.development
  2. 53
      src/views/form/publish/index.vue

2
.env.development

@ -2,7 +2,7 @@
VUE_APP_TITLE = 问卷调查测试环境
# 接口请求地址,会设置到 axios 的 baseURL 参数上
VUE_APP_API_ROOT_TDUCK = /tduck-api
VUE_APP_API_ROOT = http://192.158.1.140/api
VUE_APP_API_ROOT = http://192.168.1.140/api
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VUE_APP_DEBUG_TOOL =
# 高德地图key 暂时没有用到

53
src/views/form/publish/index.vue

@ -30,7 +30,7 @@
size="medium"
type="primary"
@click="publishProject">
<i class="el-icon-document-checked el-icon--right">开始发布</i>
<i class="el-icon-document-checked el-icon--right">发布</i>
</el-button>
<!-- <el-button class="publish-btn"
size="medium"
@ -125,41 +125,7 @@ export default {
children: 'subOrgList'
},
count: 1,
data: [{
orgId: 1,
orgName: '一级 1',
subOrgList: [{
orgId: 4,
orgName: '二级 1-1',
subOrgList: [{
orgId: 9,
orgName: '三级 1-1-1'
}, {
orgId: 10,
orgName: '三级 1-1-2'
}]
}]
}, {
orgId: 2,
orgName: '一级 2',
subOrgList: [{
orgId: 5,
orgName: '二级 2-1'
}, {
orgId: 6,
orgName: '二级 2-2'
}]
}, {
orgId: 3,
orgName: '一级 3',
subOrgList: [{
orgId: 7,
orgName: '二级 3-1'
}, {
orgId: 8,
orgName: '二级 3-2'
}]
}],
data: [],
selAgencyList: [],
agencyArrayCopy: []
@ -251,10 +217,17 @@ export default {
return false
}
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/publish`, { key: this.projectKey }).then(() => {
this.publishStatus = true
this.msgSuccess('发布成功')
})
const params = {
key: this.projectKey,
client: this.clientType,
rangeList: this.selAgencyList
}
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/publish`,
params).then(() => {
this.publishStatus = true
this.msgSuccess('发布成功')
})
},
stopPublishProject () {
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/stop`, { 'key': this.projectKey }).then(res => {

Loading…
Cancel
Save