|
@@ -49,9 +49,11 @@ function refreshEBDList(){
|
|
|
const showActionPop=ref(false)
|
|
|
function handleSelectActionOpt(e){
|
|
|
console.log(e);
|
|
|
+ showToast('敬请期待')
|
|
|
}
|
|
|
|
|
|
// 分类弹窗
|
|
|
+const classifyPopIns=ref(null)
|
|
|
const showClassifyPop=ref(false)
|
|
|
watch(
|
|
|
()=>showClassifyPop.value,
|
|
@@ -118,6 +120,10 @@ function handleEDBOpt(type,data){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ // 移动至
|
|
|
+ if(type==='move'){
|
|
|
+ handleShowEDBMove(data)
|
|
|
+ }
|
|
|
|
|
|
edbOptState.show=false
|
|
|
}
|
|
@@ -131,6 +137,44 @@ function handleEditBaseEdbSuccess(e){
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 移动指标
|
|
|
+const edbMoveState=reactive({
|
|
|
+ show:false,
|
|
|
+ selectValue:'',
|
|
|
+ options:[],
|
|
|
+ edbInfoId:0,//要移动的分类id
|
|
|
+ tabIndex:2,
|
|
|
+})
|
|
|
+async function handleShowEDBMove(data){
|
|
|
+ edbMoveState.options=classifyPopIns.value.classifyList
|
|
|
+ edbMoveState.selectValue=data.ClassifyId
|
|
|
+ edbMoveState.edbInfoId=data.EdbInfoId
|
|
|
+ edbMoveState.tabIndex=2
|
|
|
+ edbMoveState.show=true
|
|
|
+}
|
|
|
+function handleEdbMoveSelectValueChange({value,selectedOptions,tabIndex}){
|
|
|
+ console.log(value,selectedOptions,tabIndex);
|
|
|
+ edbMoveState.tabIndex=tabIndex
|
|
|
+}
|
|
|
+async function handleConfirmEDBMove(){
|
|
|
+ if(edbMoveState.tabIndex!==2){
|
|
|
+ showToast('请选择第三级目录')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ apiDataEDB.edbMove({
|
|
|
+ ClassifyId:edbMoveState.selectValue,
|
|
|
+ EdbInfoId:edbMoveState.edbInfoId,
|
|
|
+ PrevEdbInfoId:0,
|
|
|
+ NextEdbInfoId:0
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ showToast('移动成功!')
|
|
|
+ refreshEBDList()
|
|
|
+ edbMoveState.show=false
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -224,7 +268,7 @@ function handleEditBaseEdbSuccess(e){
|
|
|
</van-action-sheet>
|
|
|
|
|
|
<!-- 分类弹窗 -->
|
|
|
- <EDBClassify v-model="showClassifyPop" @change="handleSelectClassifyChange"/>
|
|
|
+ <EDBClassify ref="classifyPopIns" v-model="showClassifyPop" @change="handleSelectClassifyChange"/>
|
|
|
|
|
|
<!-- 指标的操作 -->
|
|
|
<van-action-sheet
|
|
@@ -237,11 +281,11 @@ function handleEditBaseEdbSuccess(e){
|
|
|
<ul class="edb-opt-list">
|
|
|
<!-- 计算指标查看 -->
|
|
|
<!-- <li class="item" v-if="seeComputeEDBInfo(edbOptState.data)">查看</li> -->
|
|
|
- <li class="item color-blue" v-if="edbOptState.data?.Button.OpButton" @click="handleEDBOpt('edit',edbOptState.data)">编辑</li>
|
|
|
- <li class="item color-red" v-if="edbOptState.data?.Button.DeleteButton" @click="handleEDBOpt('delete',edbOptState.data)">删除</li>
|
|
|
- <li class="item" v-if="edbOptState.data?.Button.MoveButton">移动至</li>
|
|
|
+ <!-- <li class="item color-blue" v-if="edbOptState.data?.Button.OpButton" @click="handleEDBOpt('edit',edbOptState.data)">编辑</li>
|
|
|
+ <li class="item color-red" v-if="edbOptState.data?.Button.DeleteButton" @click="handleEDBOpt('delete',edbOptState.data)">删除</li> -->
|
|
|
<li class="item" v-if="edbOptState.data?.Button.ShowEdbRelation">关联指标</li>
|
|
|
<li class="item" v-if="edbOptState.data?.Button.ShowChartRelation">关联图表</li>
|
|
|
+ <li class="item" v-if="edbOptState.data?.Button.MoveButton" @click="handleEDBOpt('move',edbOptState.data)">移动至</li>
|
|
|
</ul>
|
|
|
</template>
|
|
|
</van-action-sheet>
|
|
@@ -252,6 +296,25 @@ function handleEditBaseEdbSuccess(e){
|
|
|
:edbInfoId="activeEditEDBData?.EdbInfoId"
|
|
|
@success="handleEditBaseEdbSuccess"
|
|
|
/>
|
|
|
+
|
|
|
+ <!-- 指标移动 -->
|
|
|
+ <van-popup
|
|
|
+ v-model:show="edbMoveState.show"
|
|
|
+ round
|
|
|
+ position="bottom"
|
|
|
+ >
|
|
|
+ <van-cascader
|
|
|
+ v-model="edbMoveState.selectValue"
|
|
|
+ title="移动至"
|
|
|
+ :options="edbMoveState.options"
|
|
|
+ :field-names="{text:'ClassifyName',value:'ClassifyId',children:'Children'}"
|
|
|
+ @close="edbMoveState.show = false"
|
|
|
+ @change="handleEdbMoveSelectValueChange"
|
|
|
+ />
|
|
|
+ <div style="width:300px;margin:0 auto;padding:20px 0">
|
|
|
+ <van-button type="primary" round block @click="handleConfirmEDBMove">确定</van-button>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|