<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ### 1. tree中當點擊節點時改變節點顏色 ~~~ 1. 在控制點點擊發現,被點擊的子節點會多一個類icon-check,通過這個改變 .dir-container { /deep/ .el-tree { min-width: 100%; display: inline-block; font-size: 14px; .is-current{ i{ color: #1890FF; } } ~~~ ### 2. tree中添加文件夾 ~~~ <el-tree ref="modelTree" node-key="id" :default-expanded-keys="[111111]" highlight-current :data="allDataSourceType" :props="defaultProps" :default-expand-all="false" :render-after-expand="false" @node-click="onClickNodes" > <span class="custom-tree-node" slot-scope="{ node }"> <span> <i :class="node.icon">&#xe622;</i> {{ node.label }} </span> </span> </el-tree> ~~~ ### 3. 下載數據 ~~~ 1. 方式一 window.location.assign('http://52.83.182.209:7321/dme/api/datasources/v1/download/0c7810724874442486467e8af8224d31'); 2. 方式二 const anchor = document.createElement('a') anchor.href = 'http://52.83.182.209:7321/dme/api/datasources/v1/download/0c7810724874442486467e8af8224d31' anchor.download = `${+new Date()}.xlsx` anchor.click() 3. 方式三 //表格中的下載按鈕 <template slot-scope="scope"> <span @click="download(scope.$index, scope.row)"> <i class="iconfont icon-download2"></i><span>下載</span> </span> </template> download (index,row) { const fileName = downLoadDtata.name const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' }) // ie 下載方式 if (window.navigator && window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveOrOpenBlob(blob, fileName) } else { const downloadUrl = window.URL.createObjectURL(blob) const anchor = document.createElement('a') anchor.href = downloadUrl anchor.download = fileName anchor.click() } window.URL.revokeObjectURL(blob) this.$message({ message: '下載數據源成功', type: 'success' }) } 4 . 方式四 // 通用下載方法 async commonDownloadFunction(sysCode, name) { // 獲取資源提示 const loading = this.$loading({ lock: true, text: '正在獲取資源中,請稍等。。。', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }) try { await downloadAlgorithms(sysCode) window.location.assign(`${this.$store.getters.appConfig.serverUrlCommon}algorithms/download/v1/${sysCode}`) loading.close() } catch (error) { loading.close() this.$message.error(`‘${name}’算法不存在或已刪除!`) } 5. 方法5 // 通用下載方法 async commonDownloadFunction(sysCode, name) { try { await dowloadDataSource(sysCode) window.location.assign(`${this.$store.getters.appConfig.serverUrlCommon}datasources/v1/download/${sysCode}`) } catch (error) { this.$message.error(`下載數據源‘${name}’失敗`) } ~~~ 4. 通用的圖片下載方法(得到的圖片不是二進制是圖片,不能使用a標簽下載,通過axios將數據轉換成二進制,然后再用a標簽) ~~~ // 異步下載方法 commonDownload(url, name) { this.imgLoading = true axios.get(url, { responseType: 'blob' }).then( res => { this.imgLoading = false let fileName = null if (res.data.type === 'image/jpeg') { fileName = `${name}.jpg` } if (res.status === 200) { if (typeof window.chrome !== 'undefined') { // Chrome const link = document.createElement('a') link.href = window.URL.createObjectURL(res.data) link.download = fileName link.click() } else if (typeof window.navigator.msSaveBlob !== 'undefined') { // IE const blob = new Blob([res.data], { type: 'application/force-download' }) window.navigator.msSaveBlob(blob, fileName) } else { // Firefox const file = new File([res.data], fileName, { type: 'application/force-download' }) window.open(URL.createObjectURL(file)) } } }, error => { console.error('error', error) } ) }, ~~~ ### 5. 操作dom時靈活運用循環中的index以及插槽中 ~~~ <el-table-column prop label="操作" min-width="19%"> <div slot-scope="scope" class="operation"> <span class="icon-container" @click="handleEdit(scope.$index, scope.row)"> <i class="iconfont icon-edit1"></i> <span>編輯</span> </span> <span class="icon-container" @click="handleDelete(scope.$index, scope.row)"> <i class="iconfont icon-delete"></i> <span>刪除</span> </span> <span class="icon-container" @click="handleDownload(scope.$index, scope.row)"> <!-- <span v-if="scope.row.typeName === 'Excel'> --> <i class="iconfont icon-download2"></i> <span>下載</span> </span> </div> </el-table-column> ~~~ ### 6. 插槽 ~~~ 1. 基本: <el-scrollbar :class="wrapClass"> <!-- 通過slot插槽插入需要滾動的內容 --> <slot name="content"></slot> </el-scrollbar> <dme-scrollbar wrapClass="left-scrollbar"> <div class="dir-container" slot="content"> 內容 </div> </dme-scrollbar> 表格中的插槽(在列中) <template slot-scope="scope"> <span @click="download(scope.$index, scope.row)"> <i class="iconfont icon-download2"></i><span>下載</span> </span> </template> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看