Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gaoyuanwei 2022-07-21 10:00:38 +08:00
commit a044ead9b0
7 changed files with 602 additions and 103 deletions

View File

@ -36,7 +36,9 @@
<div class="agreeOr"> <div class="agreeOr">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-radio-group v-model="agreeOrList" style="width: 230px"> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')">拒绝</el-button>
<!-- <el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button> <el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button> <el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group> </el-radio-group>
@ -54,9 +56,20 @@
class="inputBule" class="inputBule"
@click.native="agreeOrNot($store.state.contentTabsActiveName)" @click.native="agreeOrNot($store.state.contentTabsActiveName)"
>提交</el-button >提交</el-button
> > -->
</div> </div>
</div> </div>
<el-dialog
title="审批意见"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click="agreeOrNot()"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -81,6 +94,9 @@ export default {
}, },
data () { data () {
return { return {
dialogVisible: false,
dialogType: '',
input: '',
flagShow: false, flagShow: false,
// processVisible: true, // processVisible: true,
visible: false, visible: false,
@ -135,6 +151,22 @@ export default {
} }
}) })
}, },
showDialog (title) {
this.dialogVisible = true
this.dialogType = title
},
handleClose (done) {
this.$confirm('确认关闭?')
.then(_ => {
this.input = ''
done()
})
.catch(_ => {})
},
handleClose2 () {
this.dialogVisible = false
this.input = ''
},
methodsThree () { methodsThree () {
this.$http.get('/category/getCategoryTree').then((res) => { this.$http.get('/category/getCategoryTree').then((res) => {
this.insertList = res.data.data this.insertList = res.data.data
@ -152,73 +184,62 @@ export default {
// } // }
}) })
}, },
agreeOrNot: debounce( // 退
function (data) { agreeOrNot: debounce(function () {
console.log(data) if (this.dialogType === '同意') {
if (this.agreeOrList === '同意') { console.log('this.dataForm', this.dataForm)
console.log('this.dataForm.taskId', this.taskId) const params = qs.stringify({
const params = qs.stringify({ taskId: this.dataForm.taskId,
taskId: this.taskId, comment: this.input
comment: this.inputAgree })
}) console.log(params)
console.log(params) this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
this.$http if (res.code !== 0) {
.post('/act/task/complete?' + params) this.$message.error(res.msg)
.then(({ data: res }) => { if (this.callbacks.taskHandleErrorCallback) {
if (res.code !== 0) { this.callbacks.taskHandleErrorCallback(res)
this.$message.error(res.msg) }
if (this.callbacks.taskHandleErrorCallback) { return
this.callbacks.taskHandleErrorCallback(res) }
} this.$message({
return message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
} }
this.$message({ }
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
.catch(() => {})
} else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputNo
}) })
this.$http }).catch(() => {})
.post('/act/task/backToFirst?', params) } else if (this.dialogType === '拒绝') {
.then(({ data: res }) => { const params = qs.stringify({
if (res.code !== 0) { taskId: this.dataForm.taskId,
this.$message.error(res.msg) comment: this.input
if (this.callbacks.taskHandleErrorCallback) { })
this.callbacks.taskHandleErrorCallback(res) this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
} if (res.code !== 0) {
return this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
} }
this.$message({ }
message: this.$t('prompt.success'), })
type: 'success', })
duration: 500, }
onClose: () => { }, 1000, { leading: true, trailing: false }),
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
this.tabRemoveHandle(data)
},
1000,
{ leading: true, trailing: false }
),
tabRemoveHandle (tabName) { tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') { if (tabName === 'home') {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-29 15:59:51 * @Date: 2022-06-29 15:59:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-04 16:17:22 * @LastEditTime: 2022-07-21 09:39:13
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!-- 流程业务表单 --> <!-- 流程业务表单 -->
@ -61,18 +61,31 @@
<div class="agreeOr"> <div class="agreeOr">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-radio-group v-model="agreeOrList" style="width:230px;"> <!-- <el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button> <el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button> <el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
</el-radio-group> </el-radio-group> -->
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')">拒绝</el-button>
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input> <el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule"@click.native="agreeOrNot($store.state.contentTabsActiveName)">提交</el-button> <el-button class="inputBule" @click="agreeOrNot">提交</el-button> -->
</div> </div>
</div> </div>
<!-- 流程详情 --> <!-- 流程详情 -->
<ren-process-detail></ren-process-detail> <ren-process-detail></ren-process-detail>
<el-dialog
title="审批意见"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click="agreeOrNot()"> </el-button>
</span>
</el-dialog>
</el-card> </el-card>
</template> </template>
@ -88,13 +101,9 @@ export default {
mixins: [mixinViewModule, processModule], mixins: [mixinViewModule, processModule],
data () { data () {
return { return {
// mixinViewModuleOptions: { dialogVisible: false,
// getDataListURL: '/act/task/myToDoTaskPage', dialogType: '',
// getDataListIsPage: true, input: '',
// activatedIsNeed: true,
// deleteIsBatch: true,
// deleteIsBatchKey: 'deploymentId'
// },
visible: true, visible: true,
showKey: 0, showKey: 0,
// //
@ -164,6 +173,22 @@ export default {
} }
}) })
}, },
showDialog (title) {
this.dialogVisible = true
this.dialogType = title
},
handleClose (done) {
this.$confirm('确认关闭?')
.then(_ => {
this.input = ''
done()
})
.catch(_ => {})
},
handleClose2 () {
this.dialogVisible = false
this.input = ''
},
downloadFile2 (url) { downloadFile2 (url) {
console.log(window.SITE_CONFIG.previewUrl) console.log(window.SITE_CONFIG.previewUrl)
window.open( window.open(
@ -235,13 +260,12 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
// 退 // 退
agreeOrNot: debounce(function (data) { agreeOrNot: debounce(function () {
console.log(data) if (this.dialogType === '同意') {
if (this.agreeOrList === '同意') {
console.log('this.dataForm', this.dataForm) console.log('this.dataForm', this.dataForm)
const params = qs.stringify({ const params = qs.stringify({
taskId: this.dataForm.taskId, taskId: this.dataForm.taskId,
comment: this.inputAgree comment: this.input
}) })
console.log(params) console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => { this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
@ -264,10 +288,10 @@ export default {
} }
}) })
}).catch(() => {}) }).catch(() => {})
} else if (this.agreeOrList === '退回') { } else if (this.dialogType === '拒绝') {
const params = qs.stringify({ const params = qs.stringify({
taskId: this.dataForm.taskId, taskId: this.dataForm.taskId,
comment: this.inputNo comment: this.input
}) })
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {

View File

@ -24,6 +24,7 @@
<div class="vue-box"> <div class="vue-box">
<put-on-the-shelf <put-on-the-shelf
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:videoList="videoList" :videoList="videoList"
@ -38,15 +39,21 @@
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="gnjs" :configure="gnjs"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '关联组件'" v-else-if="showView === '关联组件'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="glzj" :configure="glzj"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与应用'" v-else-if="showView === '部署与应用'"
@ -54,6 +61,8 @@
:dataFrom="dataFrom" :dataFrom="dataFrom"
:externalField="['共享条件', '共享类型']" :externalField="['共享条件', '共享类型']"
:configure="bs" :configure="bs"
@submit="submit()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<!-- <application-essential-information <!-- <application-essential-information
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
@ -82,12 +91,72 @@
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button> <button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<a-popconfirm
v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button v-else-if="showView == '功能介绍'" @click="changeGnjs('上一步')">
上一步
</button>
<!-- 分割线 -->
<button
v-show="showView !== '基本信息' && showView === '部署与应用'"
@click="back()"
>
上一步
</button>
<button v-show="showView === '部署与应用'" @click="preview()"> <button v-show="showView === '部署与应用'" @click="preview()">
预览 预览
</button> </button>
<button v-show="showView !== '部署与应用'" @click="next()">下一步</button> <button v-show="showView === '基本信息'" @click="next()">下一步</button>
<button v-show="showView === '部署与应用'" @click="submit()">提交</button> <a-popconfirm
v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button v-else-if="showView == '功能介绍'" @click="changeGnjs('下一步')">
下一步
</button>
<a-popconfirm
v-if="
showView === '部署与应用' &&
bs[0].list.filter(
(val) => val.note1 !== '' && val.name !== '常见问题'
).length > 0
"
title="如果常见问题未填写完整将会被丢弃,是否进行提交?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('提交')"
@cancel="cancel"
>
<button>提交</button>
</a-popconfirm>
<button v-else-if="showView === '部署与应用'" @click="submit()">
提交
</button>
</div> </div>
</div> </div>
</template> </template>
@ -291,6 +360,16 @@
console.log('所有编目结构==============>', res.data.data) console.log('所有编目结构==============>', res.data.data)
}) })
} }
//
const refPutOnTheShelf = ref(null)
const changeGnjs = (type) => {
refPutOnTheShelf.value.add('功能介绍', true, type)
console.log(refPutOnTheShelf.value)
}
const changeBs = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('常见问题', true, type)
}
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {

View File

@ -24,6 +24,7 @@
<div class="vue-box"> <div class="vue-box">
<put-on-the-shelf <put-on-the-shelf
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:videoList="videoList" :videoList="videoList"
@ -39,34 +40,163 @@
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="gnjs" :configure="gnjs"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="yycj" :configure="yycj"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:fileList2="fileList2" :fileList2="fileList2"
:imgList="imgList" :imgList="imgList"
:configure="bs" :configure="bs"
@submit="submit()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button> <button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <a-popconfirm
v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length ==
gnjs[0].list.length
"
@click="changeSfys('上一步')"
>
上一步
</button>
<a-popconfirm
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('上一步')"
>
上一步
</button>
<button v-else-if="showView !== '基本信息'" @click="back()">
上一步
</button>
<button v-show="showView === '部署与使用'" @click="preview()"> <button v-show="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<button v-show="showView !== '部署与使用'" @click="next()">下一步</button> <a-popconfirm
<button v-show="showView === '部署与使用'" @click="submit()">提交</button> v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length ==
gnjs[0].list.length
"
@click="changeGnjs('下一步')"
>
下一步
</button>
<a-popconfirm
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('下一步')"
>
下一步
</button>
<button v-else-if="showView !== '部署与使用'" @click="next()">
下一步
</button>
<a-popconfirm
v-if="
showView === '部署与使用' &&
(bs[0].list.filter((val) => val.note1 !== '').length > 0 ||
bs[1].list.filter((val) => val.note1 !== '').length > 0)
"
title="如果常见问题未填写完整将会被丢弃,是否进行提交?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('提交')"
@cancel="cancel"
>
<button>提交</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="submit()">
提交
</button>
</div> </div>
</div> </div>
</template> </template>
@ -279,6 +409,19 @@
}) })
} }
} }
//
const refPutOnTheShelf = ref(null)
const changeGnjs = (type) => {
refPutOnTheShelf.value.add('功能介绍', true, type)
}
const changeYycj = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('应用场景', true, type)
}
const changeBs = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('常见问题', true, type)
}
const init = () => { const init = () => {
getCategoryTree().then((res) => { getCategoryTree().then((res) => {
// console.clear() // console.clear()

View File

@ -40,33 +40,162 @@
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="gnjs" :configure="gnjs"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="yycj" :configure="yycj"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:fileList2="fileList2" :fileList2="fileList2"
:configure="bs" :configure="bs"
@submit="submit()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button> <button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <a-popconfirm
v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length ==
gnjs[0].list.length
"
@click="changeSfys('上一步')"
>
上一步
</button>
<a-popconfirm
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('上一步')"
>
上一步
</button>
<button v-else-if="showView !== '基本信息'" @click="back()">
上一步
</button>
<button v-show="showView === '部署与使用'" @click="preview()"> <button v-show="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<button v-show="showView !== '部署与使用'" @click="next()">下一步</button> <a-popconfirm
<button v-show="showView === '部署与使用'" @click="submit()">提交</button> v-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length > 0 &&
gnjs[0].list.filter((val) => val.note1 !== '').length !==
gnjs[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeGnjs('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '功能介绍' &&
gnjs[0].list.filter((val) => val.note1 !== '').length ==
gnjs[0].list.length
"
@click="changeGnjs('下一步')"
>
下一步
</button>
<a-popconfirm
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('下一步')"
>
下一步
</button>
<button v-else-if="showView !== '部署与使用'" @click="next()">
下一步
</button>
<a-popconfirm
v-if="
showView === '部署与使用' &&
(bs[0].list.filter((val) => val.note1 !== '').length > 0 ||
bs[1].list.filter((val) => val.note1 !== '').length > 0)
"
title="如果常见问题未填写完整将会被丢弃,是否进行提交?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('提交')"
@cancel="cancel"
>
<button>提交</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="submit()">
提交
</button>
</div> </div>
</div> </div>
</template> </template>
@ -242,6 +371,19 @@
}) })
window.open(newpage.href, '_blank') window.open(newpage.href, '_blank')
} }
//
const refPutOnTheShelf = ref(null)
const changeGnjs = (type) => {
refPutOnTheShelf.value.add('功能介绍', true, type)
}
const changeYycj = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('应用场景', true, type)
}
const changeBs = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('常见问题', true, type)
}
const submit = () => { const submit = () => {
console.log('提交数据=============>', dataFrom.value) console.log('提交数据=============>', dataFrom.value)
if (submitFlag.value) { if (submitFlag.value) {

View File

@ -24,6 +24,7 @@
<div class="vue-box"> <div class="vue-box">
<put-on-the-shelf <put-on-the-shelf
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:imgList="imgList" :imgList="imgList"
@ -39,32 +40,108 @@
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '图层信息'" v-else-if="showView === '图层信息'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="yycj" :configure="yycj"
@next="next()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:fileList2="fileList2" :fileList2="fileList2"
:configure="bs" :configure="bs"
@submit="submit()"
@back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button> <button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <a-popconfirm
v-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否返回上一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('上一步')"
@cancel="cancel"
>
<button>上一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('上一步')"
>
上一步
</button>
<button v-else-if="showView !== '基本信息'" @click="back()">
上一步
</button>
<button v-show="showView === '部署与使用'" @click="preview()"> <button v-show="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<button v-show="showView !== '部署与使用'" @click="next()">下一步</button> <a-popconfirm
<button v-show="showView === '部署与使用'" @click="submit()">提交</button> v-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length > 0 &&
yycj[0].list.filter((val) => val.note1 !== '').length !==
yycj[0].list.length
"
title="如果信息未填写完整将会被丢弃,是否进行下一步?"
ok-text="是"
cancel-text="否"
@confirm="changeYycj('下一步')"
@cancel="cancel"
>
<button>下一步</button>
</a-popconfirm>
<button
v-else-if="
showView == '应用场景' &&
yycj[0].list.filter((val) => val.note1 !== '').length ==
yycj[0].list.length
"
@click="changeYycj('下一步')"
>
下一步
</button>
<button v-else-if="showView !== '部署与使用'" @click="next()">
下一步
</button>
<a-popconfirm
v-if="
showView === '部署与使用' &&
bs[0].list.filter((val) => val.note1 !== '').length > 0
"
title="如果常见问题未填写完整将会被丢弃,是否进行提交?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('提交')"
@cancel="cancel"
>
<button>提交</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="submit()">
提交
</button>
</div> </div>
</div> </div>
</template> </template>
@ -190,6 +267,16 @@
}) })
window.open(newpage.href, '_blank') window.open(newpage.href, '_blank')
} }
//
const refPutOnTheShelf = ref(null)
const changeYycj = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('应用场景', true, type)
}
const changeBs = (type) => {
console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('常见问题', true, type)
}
const submit = () => { const submit = () => {
console.log('提交数据=============>', dataFrom.value) console.log('提交数据=============>', dataFrom.value)
if (submitFlag.value) { if (submitFlag.value) {

View File

@ -162,11 +162,14 @@
const logout = async () => { const logout = async () => {
await store.dispatch('user/logout') await store.dispatch('user/logout')
window.sessionStorage.setItem('visits', JSON.stringify([])) window.sessionStorage.setItem('visits', JSON.stringify([]))
if (recordRoute) { // 西
const fullPath = route.fullPath if (!whoShow1.itShowXiHaiAn) {
router.push(`/login?redirect=${fullPath}`) if (recordRoute) {
} else { const fullPath = route.fullPath
router.push('/login') router.push(`/login?redirect=${fullPath}`)
} else {
router.push('/login')
}
} }
} }
// //