|
@@ -189,9 +189,43 @@
|
|
|
:select_classify="chartClassify"
|
|
|
:chart_code="chartCode"
|
|
|
:allChart="chartArr"
|
|
|
- :classifyUserId="roleId"
|
|
|
+ :classifyUserId="classifyUserId"
|
|
|
@close="myETADetailDialogShow=false"
|
|
|
+ @remove="removeChart"
|
|
|
/>
|
|
|
+ <!-- my eta图表复制到弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ title="复制到我的图库"
|
|
|
+ :visible.sync="isCopyDialogShow"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ @close="isCopyDialogShow=false"
|
|
|
+ width="589px"
|
|
|
+ v-dialogDrag
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <div class="dialog-container" v-loading="copyDialogLoading">
|
|
|
+ <div>
|
|
|
+ <span style="margin-right:5px;">复制到</span>
|
|
|
+ <el-select
|
|
|
+ v-model="copyToClassify"
|
|
|
+ placeholder="请选择目录"
|
|
|
+ style="width: 80%;"
|
|
|
+ multiple clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in myETAClassArr"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="isCopyDialogShow=false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="copyToClass">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -269,17 +303,15 @@ export default {
|
|
|
frameType:'my',
|
|
|
myETADetailDialogShow:false,
|
|
|
chartClassify:0,
|
|
|
+ classifyUserId:0,
|
|
|
chartCode:'',
|
|
|
chartArr:[],
|
|
|
+ isCopyDialogShow:false,
|
|
|
+ myETAClassArr:[],
|
|
|
+ copyToClassify:[],
|
|
|
+ modeId:0,
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- /* 登录角色id */
|
|
|
- roleId() {
|
|
|
- let id = Number(localStorage.getItem('AdminId'));
|
|
|
- return id;
|
|
|
- },
|
|
|
- },
|
|
|
methods: {
|
|
|
slideHandle(){
|
|
|
this.isSlideLeft = !this.isSlideLeft;
|
|
@@ -356,7 +388,7 @@ export default {
|
|
|
this.getPublicList()
|
|
|
this.getMyList()
|
|
|
},
|
|
|
- handleShowDialog(id){
|
|
|
+ handleShowDialog({id,userId}){
|
|
|
//请求接口看有没有数据
|
|
|
mychartInterface.myList({
|
|
|
PageSize:1200,
|
|
@@ -367,6 +399,7 @@ export default {
|
|
|
if(res.Data&&res.Data.List){
|
|
|
if(res.Data.List.length){
|
|
|
this.chartClassify = id
|
|
|
+ this.classifyUserId = userId||0
|
|
|
this.chartCode = res.Data.List[0].UniqueCode
|
|
|
this.chartArr = res.Data.List.map(item => item.UniqueCode)
|
|
|
this.myETADetailDialogShow = true
|
|
@@ -375,6 +408,44 @@ export default {
|
|
|
this.$message.warning('该节点链接的图库没有图表')
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ //打开复制到弹窗
|
|
|
+ async moveMychart(id) {
|
|
|
+ this.isCopyDialogShow = true
|
|
|
+ this.copyDialogLoading = true
|
|
|
+ this.modeId = id
|
|
|
+ //获取当前图表所属分类
|
|
|
+ const { Data : chartClassifyList=[]} = await mychartInterface.getChartInClassify({ChartInfoId: id })
|
|
|
+ //获取myETA全部分类
|
|
|
+ const {Data} = await mychartInterface.classifyList()
|
|
|
+ const classifyListData = Data?Data.List.map(item=>{
|
|
|
+ return {...item,fromPublic: 0}
|
|
|
+ }):[]
|
|
|
+ //过滤掉所属分类
|
|
|
+ this.myETAClassArr = classifyListData
|
|
|
+ .map((item) => ({
|
|
|
+ name: item.MyChartClassifyName,
|
|
|
+ value: item.MyChartClassifyId,
|
|
|
+ }))
|
|
|
+ .filter((x) => !chartClassifyList.includes(x.value))
|
|
|
+ this.copyDialogLoading = false
|
|
|
+ },
|
|
|
+ //将图表复制到其他目录
|
|
|
+ copyToClass(){
|
|
|
+ mychartInterface.copyMyChart({
|
|
|
+ ChartInfoId: this.modeId,
|
|
|
+ MyChartClassifyId: this.copyToClassify,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
+ this.$message.success('复制成功');
|
|
|
+ this.isCopyDialogShow = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //弹窗中移除了图表,对chartArr做对应改动
|
|
|
+ removeChart(UniqueCode){
|
|
|
+ console.log('?',UniqueCode)
|
|
|
+ this.chartArr.splice(this.chartArr.findIndex(item => item === UniqueCode), 1)
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|