123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- (() => {
- Vue.component('uploadPointclound', {
- props: [],
- name: 'uploadPointclound',
- template: `<div id="uploadBox" >
- <h4>添加数据集 </h4>
- <div class="selectBox">
- <el-select v-model="value" filterable :filter-method="searchScene" placeholder="请选择">
- <el-option v-for="item in options" :key="item.code" :label="item.code" :value="item.code">
- <div class="sceneName">
- <p class="code">{{item.code}}</p>
- <span class="name">来自场景:{{item.name}}</span>
- </div>
- </el-option>
- </el-select>
- </div>
- <div class="uploadBtn" @click="openUpload" :class="{disabled:value==''}">
- <i class="fa fa-plus ng-scope"></i> 添加到场景
- </div>
- <p class="itemTitle">已添加的数据集 </p>
- <div class="listBox">
- <ul class="sceneList">
- <li class="sceneItem" v-for="i in 10">
- <div class="sceneName">
- <p class="code">t-iksBApb</p>
- <span class="name">来自场景:港2</span>
- </div>
- <div class="scene_control">
-
- <el-popconfirm placement="top" title="是否要删除该数据集?" :hide-icon="true" @confirm="delConfirm">
- <el-button class="delBtn" title="删除" slot="reference"></el-button>
- </el-popconfirm>
- <!-- <div class="delBtn" title="删除"></div> -->
- </div>
- </li>
- </ul>
- </div>
- </div>`,
- data() {
- return {
- options: [{
- id: 1,
- name: "港2",
- code: 't-iksBApb'
- }, {
- id: 2,
- name: "港2",
- code: 't-iksBA2pb'
- }, {
- id: 3,
- name: "港2",
- code: 't-iksBA3pb'
- }, {
- id: 4,
- name: "港2",
- code: 't-iksBA4pb'
- }, {
- id: 5,
- name: "港2",
- code: 't-iksBA5pb'
- }, {
- id: 6,
- name: "港2",
- code: 't-iksBA6pb'
- }],
- value: '',
- }
- },
- methods: {
- searchScene() {
- let t = setTimeout(() => {
- console.log(1)
- clearTimeout(t)
- }, 3000);
- },
- openUpload() {
- this.$parent.showLoading()
- setTimeout(() => {
- this.value = ''
- this.$parent.hideLoading()
- this.$message({
- message: '数据集添加成功',
- type: 'success',
- duration: 2000,
- });
- IV.api.AuthenticationService.sendAuthenticationChanged()
- // IV.SidebarMenuService.goToItem(IV.SidebarMenuService.items[1])
- }, 2000);
- // this.$confirm('此操作将永久删除该文件, 是否继续?', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // center: true
- // }).then(() => {
- // // this.$message({
- // // type: 'success',
- // // message: '删除成功!'
- // // });
- // }).catch(() => {
- // // this.$message({
- // // type: 'info',
- // // message: '已取消删除'
- // // });
- // });
- },
- delConfirm() {
- console.log(1)
- }
- },
- computed: {
- },
- destroyed() {
- },
- mounted() {
- },
- })
- })();
|