From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/pages/ai/index/App.vue | 3173 ++++++++++++++++++++++++++--------------------------------- 1 files changed, 1,402 insertions(+), 1,771 deletions(-) diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue index c01d1f3..e466408 100644 --- a/src/pages/ai/index/App.vue +++ b/src/pages/ai/index/App.vue @@ -1,1174 +1,1012 @@ <template> <div class="s-task-manage"> - <div style="height:100%;"> + <div style="height: 100%"> <div class="flex-box task-manage"> <div class="installModel" v-if="isInstall"> <div class="progress-bar"> <div class="inner-bar"></div> </div> </div> - <!-- 瓒呯骇绠$悊鍛樺彲瑙� --> - <div class="super" v-if="isSuperUser"> - <div class="left-box"> - <!-- <div class="title"> - <label>绠楁硶搴�</label> - </div>--> - <el-tabs - v-model="activeName" - type="border-card" - @tab-click="handleTabClick" - style="height: calc(100% - 20px);" - > - <el-tab-pane label="宸插畨瑁�" name="myAlgorithm"> - <div class="width-new-line task-list" v-show="activeName === 'myAlgorithm'"> - <p class="src-title">绠楁硶杞欢</p> - <div class="flex-list"> - <div class="wrap-box" v-for="item in ungradeList" :key="item.id"> - <div class="list-choose-item-left"> - <div class="mask"> - <el-button type="primary" class="bot-btn" @click="donwload(item)">鍗囩骇</el-button> - </div> - - <div class="list-complete-item-handle"> - <div class="svg-wrap"> - <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;"> - <use :xlink:href="`#${item.icon}`" /> - </svg> --> - <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt=""> - </div> - <div class="alg-name"> - <div style="padding:0px 10px 0px 10px;"> - <span>{{ item.sdk_name }}</span> - </div> - </div> - </div> - </div> - </div> - <div class="wrap-box" v-for="(item) in installedList" :key="item.id"> - <div class="list-choose-item-left"> - <div class="mask" v-if="!item.isEdit"> - <el-button - @click="commandAlgLib(item)" - type="primary" - class="bot-btn" - >缂栬緫鍚嶇О</el-button> - </div> - <div class="list-complete-item-handle"> - <!-- <span :class="`iconfont ${item.icon}`" style="font-size:3rem;"></span> --> - <div class="svg-wrap"> - <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;"> - <use :xlink:href="`#${item.icon}`" /> - </svg>--> - <img - class="baseImg" - :src="`data:image/png;base64,${item.iconBlob}`" - alt - /> - </div> - <div class="alg-name"> - <div style="padding:0px 10px 0px 10px;"> - <span v-if="!item.isEdit">{{ item.sdk_name }}</span> - - <el-input - size="small" - v-model="item.sdk_name" - v-if="item.isEdit" - v-focus - :maxlength="15" - @blur="inputBlur(item)" - ></el-input> - </div> - </div> - </div> - </div> - </div> - <!-- </draggable> --> - <div class="wrap-box" v-for="(item) in notInstalledList" :key="item.id"> - <div - class="list-choose-item-left list-choose-item-left-uninstal" - v-loading="downloading && downloadItem == item.id" - > - <div class="mask"> - <el-button type="primary" class="bot-btn" @click="donwload(item)">瀹夎</el-button> - </div> - <div class="click-download" title="涓嬭浇"> - <span class="iconfont iconxiazai1"></span> - </div> - <div class="list-complete-item-handle"> - <!-- <span :class="`iconfont ${item.icon}`" style="font-size:3rem;"></span> --> - <div class="svg-wrap"> - <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;"> - <use :xlink:href="`#${item.icon}`" /> - </svg> --> - <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt=""> - </div> - <div class="alg-name"> - <div style="padding:0px 10px 0px 10px;"> - <span class="list-choose-item-left-uninstal">{{ item.sdk_name }}</span> - </div> - </div> - </div> - </div> - </div> - </div> - <p class="src-title">搴旂敤杞欢</p> + <div class="super"> + <div class="left-box" v-if="!inDetail"> + <div class="nav-box"> + <div class="nav-box-menu"> + <div + v-for="(name, index) in menuArr" + :key="index" + class="menu-item" + :class="activeName == name ? 'menu-item-actiove' : ''" + @click="pickMenu(name)" + > + {{ name }} + <sup v-if="index == 3 && updateNum != 0">{{ updateNum }}</sup> </div> - </el-tab-pane> + </div> + <div class="nav-box-search"> + <span class="icon iconfont all-scene"></span> + <el-input + placeholder="鎼滅储" + v-model="inputText" + @change="searchAll" + class="input-with-select" + > + <i class="el-icon-search" slot="prepend"></i> + <el-select + v-model="select" + slot="append" + placeholder="閫夋嫨鍦烘櫙" + :popper-append-to-body="false" + > + <el-option label="閾佽矾鍦烘櫙" value="1"> + <span class="icon iconfont"></span> + <span>閾佽矾鍦烘櫙</span> + </el-option> + <el-option label="瀹夊叏鍦烘櫙" value="2"> + <span class="icon iconfont"></span> + <span>瀹夊叏鍦烘櫙</span> + </el-option> + <el-option label="閫氱敤鍦烘櫙" value="3"> + <span class="icon iconfont"></span> + <span>閫氱敤鍦烘櫙</span> + </el-option> + <el-option label="鏍″洯鍥尯" value="4"> + <span class="icon iconfont"></span> + <span>鏍″洯鍥尯</span> + </el-option> + </el-select> + </el-input> + </div> - <el-tab-pane - label="绂荤嚎鍗囩骇/瀹夎" - name="upgradeOrInstallation" - v-show="activeName==='upgradeOrInstallation'" - > - <div class="tab-content"> - <div class="action-bar"> - <file-uploader - single - tip - tipWords="涓婁紶绠楁硶" - uploadPlaceholder="涓婁紶瀹夎杞欢" - url="/data/api-v/sdk/upload" - @complete="onFileUpload" - @file-added="onFileAdded" + <div class="bg-img-wrap"> + <img src="/images/appCenter/Group-112.png" alt="" /> + </div> + </div> + <div class="quick-path" v-if="showQuickPath"> + <div class="left-items"> + <div + class="quick-item" + v-for="(item, index) in recomandUpdateList" + :key="index" + @click="checkDetail(item, 'inactive', item.sdk_name)" + > + <div class="icon-img"> + <span class="icon iconfont" v-if="item.isUpgrade" + ></span + > + <img + v-if="item.iconBlob" + :src=" + item.iconBlob.indexOf(',') > 0 + ? item.iconBlob + : `data:image/png;base64,${item.iconBlob}` + " + alt /> + <img v-else :src="item.icon" alt /> + </div> + <div class="desc"> + <el-tooltip + :content="item.sdk_name || item.name" + effect="light" + > + <div class="desc-1">{{ item.sdk_name || item.name }}</div> + </el-tooltip> + <div class="desc-2">鐗堟湰 {{ item.version }}</div> + </div> + <div class="right-icon"> + <el-tooltip effect="dark" content="涓嬭浇" placement="bottom"> + <span class="icon iconfont"></span> + </el-tooltip> </div> </div> - </el-tab-pane> - <el-tab-pane label="搴旂敤涓績" name="algorithmMall" v-show="activeName==='algorithmMall'"> - <div class="tab-content"> - <p class="src-title">绠楁硶杞欢</p> - <div class="store-list"> - <div class="wrap-box"> - <div class="inner"> - <div class="mask" @click="actDrawerShow=true"> - <svg class="icon" aria-hidden="true" style="font-size:2rem;"> - <use xlink:href="#iconyunxiazai" /> - </svg> - </div> - <div class="alg-icon"> - <svg class="icon" aria-hidden="true" style="font-size:7rem;"> - <use xlink:href="#iconrenyuanyidong" /> - </svg> - </div> - <div class="alg-name">name</div> - </div> - </div> - </div> - <p class="src-title">搴旂敤杞欢</p> - <div class="app-list"></div> - </div> - <el-drawer title="涓嬭浇" :visible.sync="actDrawerShow" :direction="direction"> - <div class="drawer-content"> - <div class="current-step"> - <el-steps align-center :active="actStep" finish-status="success"> - <el-step title="娣诲姞婵�娲荤爜"></el-step> - <el-step title="婵�娲绘垚鍔�"></el-step> - </el-steps> - </div> + </div> - <div v-if="actStep==0"> - <div class="act-code"> - <p>浣跨敤婵�娲荤爜灏嗘柊鐨勭畻娉曟坊鍔犲埌鎮ㄧ殑璐︽埛</p> - <el-input - v-model="activeCode" - placeholder="00000-00000-00000-00000-00000" - @blur="getCodeDetail" - ></el-input> - </div> - <div class="text-right"> - <el-button type="primary" @click="actived">婵�娲�</el-button> - </div> - </div> - <div v-else-if="actStep==1"> - <ul class="desc"> - <li> - <label>婵�娲荤爜:</label> - <span>YUAAA-AAAEU-QJQE3-ZRRXD-K9MWR</span> - </li> - <li> - <label>浜у搧鍚嶇О:</label> - <span>浜哄憳璺熻釜SDK</span> - </li> - <li> - <label>閰嶇疆璇︽儏:</label> - <span>鏃�</span> - </li> - <li> - <label>鏈嶅姟鍒版湡鏃�:</label> - <span>2021-03-04</span> - </li> - <li> - <label>璁稿彲璇�:</label> - <span>鏈澶�</span> - </li> - <li> - <label>璁惧ID:</label> - <span>3342-235f-ret55-fdsg</span> - </li> - </ul> - <div class="text-right"> - <el-button type="primary" @click="checkMyAlgorith">纭畾</el-button> - <p class="tip">鎻愮ず锛氳鍦ㄢ�滄垜鐨勭畻娉曗�濅腑鏌ョ湅骞跺畨瑁呯畻娉�</p> - </div> + <!-- <div class="down-all-btn"> + <el-button plain size="small" @click="batchUpdate('both')" round + >鍏ㄩ儴鏇存柊</el-button + > + </div> --> + </div> + + <div class="main-content"> + <!-- <div class="main-title">搴旂敤涓績</div> --> + <div class="tab-btns" v-if="activeName != '绂荤嚎鍗囩骇/瀹夎'"> + <div class="group-left"> + <div + class="tab" + @click="pickTab('sdk')" + :class="activeTab == 'sdk' ? 'tab-active' : ''" + > + 绠楁硶杞欢 + </div> + <div + class="tab" + @click="pickTab('app')" + :class="activeTab == 'app' ? 'tab-active' : ''" + > + 搴旂敤杞欢 + </div> + </div> + + <div + class="batch-update" + v-if="activeName == '鏇存柊' && tempList.length" + > + <el-button + size="small" + type="primary" + round + @click="batchUpdate" + >鍏ㄩ儴鏇存柊</el-button + > + </div> + </div> + <div + class="front-page-items" + v-if="activeName != '绂荤嚎鍗囩骇/瀹夎'" + > + <div + class="front-page-item" + v-for="(item, index) in tempList" + :key="index" + @click="checkDetail(item, null, item.sdk_name)" + :class="{ + disabled: activeName == '搴旂敤涓績' && !item.canUpOrIns, + }" + > + <div class="icon-img"> + <span class="icon iconfont" v-if="item.isUpgrade" + ></span + > + <img + v-if="item.iconBlob" + :src=" + item.iconBlob.indexOf(',') > 0 + ? item.iconBlob + : `data:image/png;base64,${item.iconBlob}` + " + alt + /> + <img v-else :src="item.icon" alt /> + </div> + <div class="desc"> + <el-tooltip + :content="item.sdk_name || item.name" + effect="light" + > + <div class="desc-1">{{ item.sdk_name || item.name }}</div> + </el-tooltip> + <div class="desc-2">鐗堟湰 {{ item.version }}</div> + </div> + <div class="right-btn"> + <el-button + size="small" + type="primary" + class="other-btn" + round + @click="checkDetail(item, null, item.sdk_name)" + v-if="activeName == '搴旂敤涓績' && item.price > 0" + >婵�娲�</el-button + > + <el-button + size="small" + type="primary" + class="update-btn" + round + @click.stop="actived(item)" + v-if="activeName == '搴旂敤涓績' && item.price == 0" + >瀹夎</el-button + > + <el-button + size="small" + type="primary" + class="check-btn" + round + v-if=" + activeName == '宸叉縺娲�' && + ((activeTab == 'sdk' && !item.isUpgrade) || + (activeTab == 'app' && + !item.isUpgrade && + !item.isDefault)) + " + >鏌ョ湅</el-button + > + <el-button + size="small" + type="primary" + class="check-btn" + round + v-if=" + activeName == '宸叉縺娲�' && + activeTab == 'app' && + item.isDefault && + !item.isUpgrade + " + >鏌ョ湅</el-button + > + <el-button + size="small" + type="primary" + class="other-btn" + round + v-if=" + activeName == '宸叉縺娲�' && + activeTab == 'app' && + item.isDefault && + item.isUpgrade + " + >鍗囩骇</el-button + > + <el-button + size="small" + type="primary" + class="update-btn" + round + @click.stop="donwloadSDK(item)" + v-if=" + (activeName == '鏇存柊' || activeName == '宸叉縺娲�') && + activeTab == 'sdk' && + item.isUpgrade && + !item.upgradeLoading + " + >鏇存柊</el-button + > + <span + class="icon iconfont rocket-icon" + v-if=" + activeName == '鏇存柊' && + item.isUpgrade && + item.upgradeLoading && + rocketIf + " + ></span + > + <span + class="icon iconfont rocket-icon" + v-if=" + activeName == '鏇存柊' && + item.isUpgrade && + item.upgradeLoading && + !rocketIf + " + ></span + > + <el-button + size="small" + type="primary" + class="update-btn" + round + @click.stop="downloadApp(item, 'upgrade')" + v-if=" + (activeName == '鏇存柊' || activeName == '宸叉縺娲�') && + activeTab == 'app' && + item.isUpgrade && + !item.upgradeLoading + " + >鏇存柊</el-button + > + + <div class="status"> + {{ item.progressMsg }} </div> </div> - </el-drawer> - </el-tab-pane> - </el-tabs> + </div> + + <div + class="front-page-item item-dimmed" + v-for="(item, index) in tempDarkList" + :key="index" + @click="checkDetail(item, 'activeNotInstall', item.sdk_name)" + > + <div class="icon-img"> + <img + v-if="item.iconBlob" + :src=" + item.iconBlob.indexOf(',') > 0 + ? item.iconBlob + : `data:image/png;base64,${item.iconBlob}` + " + alt + /> + <img v-else :src="item.icon" alt /> + </div> + <div class="desc"> + <el-tooltip + :content="item.sdk_name || item.name" + effect="light" + > + <div class="desc-1">{{ item.sdk_name || item.name }}</div> + </el-tooltip> + <div class="desc-2">鐗堟湰 {{ item.version }}</div> + </div> + <div class="right-btn"> + <el-button + size="small" + type="primary" + class="other-btn" + round + v-if="activeTab == 'sdk' && !item.upgradeLoading" + @click.stop="donwloadSDK(item)" + >瀹夎</el-button + > + <el-button + size="small" + type="primary" + class="other-btn" + round + v-if="activeTab == 'app' && !item.upgradeLoading" + @click.stop="downloadApp(item)" + >瀹夎</el-button + > + <div class="spin-icon"> + <span + class="icon iconfont anz-font" + v-if="item.upgradeLoading" + ></span + > + </div> + <div class="status"> + {{ item.progressMsg }} + </div> + </div> + </div> + </div> + + <div class="upload-pkg" v-if="activeName == '绂荤嚎鍗囩骇/瀹夎'"> + <div class="upload-head"> + <div class="left"> + <span class="icon iconfont"></span> + <span class="txt">涓婁紶瀹夎杞欢</span> + </div> + </div> + + <FileUploader + class="upload-demo" + single + tip + :sourceType="3" + :isDrag="true" + :attrs="{ accept: '.zip,.tar,.gz,.tar.gz' }" + tipWords="鐐瑰嚮涓婁紶" + uploadPlaceholder="绠楁硶杞欢" + url="/data/api-v/sdk/upload" + @complete="onFileUpload" + @file-added="onFileAdded" + /> + </div> + </div> </div> + + <detailPage + :detailProductID="detailProductID" + :detailType="detailType" + :detailPrice="detailPrice" + :isSdk="isSdk" + v-if="inDetail" + @flushSdk="getAllSdk" + @flushApp="getAllApps" + @goback="goback" + ></detailPage> </div> </div> </div> + + <el-dialog + title="瀹夎鍖呬俊鎭�" + :visible.sync="installDialogVisible" + width="40%" + :close-on-click-modal="false" + > + <div class="installInfo"> + <template v-if="installAppPackage != null"> + <div> + <div> + <span>瀹夎鍖呭悕绉帮細</span> + <span>{{ installAppPackage.productName }}</span> + </div> + <div> + <span>瀹夎鐗堟湰锛�</span> + <span>{{ installAppPackage.version }}</span> + </div> + <div> + <span>鏇存柊鍐呭锛�</span> + <span>{{ installAppPackage.installContent }}</span> + </div> + </div> + </template> + <template v-if="installSdkPackage != null"> + <div> + <div> + <span>瀹夎鍖呭悕绉帮細</span> + <span>{{ installSdkPackage.productName }}</span> + </div> + <div> + <span>瀹夎鐗堟湰锛�</span> + <span>{{ installSdkPackage.version }}</span> + </div> + <div> + <span>鏇存柊鍐呭锛�</span> + <span>{{ installSdkPackage.installContent }}</span> + </div> + </div> + </template> + <p>纭畾瀹夎锛�</p> + </div> + <div slot="footer" class="dialog-footer"> + <el-button @click="installDialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="offlineInstall">瀹� 瑁�</el-button> + </div> + </el-dialog> </div> </template> <script> - import { findAllSdk, - findAll, - addTaskSdk, - delTaskSdk, - deleteTask, - updateTaskStatus, - updateTaskName, - getSdkArgs, - saveTaskSdkRule, - addTask, - getRulesByTaskSdk, - deleteTaskSdkRule, - findByType, - getTagList, downloadSdk, - installSdk + installSdk, + getInstallInfo, + removeSdk, + uploadSDK, } from "./api"; -import FileUploader from "@/components/subComponents/FileUpload/index"; -import TaskManage from "@/Pool/TaskMange"; -import VideoManageData from "@/Pool/VideoManageData"; +import { + getApps, + installApp, + getAppDetail, + removeApp, + getUnActivedSdk, + actPageAlg, + getUnActivedApp, + actApp, +} from "@/api/app"; +import { getUrlKey } from "@/api/utils"; +import FileUploader from "../FileUpload/index"; +import detailPage from "./detail"; export default { name: "algorithmManage", - props: {}, components: { - FileUploader + FileUploader, + detailPage, }, computed: { - notInstalledList() { - return this.TaskMange.list1.filter(sdk => { - return sdk.installed === false; - }); + updateNum() { + return this.hasNewVersionApp.length + this.hasNewVersionSdk.length; }, - installedList() { - return this.TaskMange.list1.filter(sdk => { - return sdk.installed === true; - }); + isAdmin() { + if ( + sessionStorage.getItem("userInfo") && + sessionStorage.getItem("userInfo") !== "" + ) { + let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; + return loginName === "superadmin" || loginName === "basic"; + } + return false; }, - ungradeList() { - // 鍗囩骇澶勭悊浼氬鑷撮噸澶嶇殑key,闇�瑕佷慨鏀� - return []; - return this.TaskMange.list1.filter(sdk => { - return sdk.isUpgrade === true; - }); - } }, data() { return { - TaskMange: new TaskManage, - VideoManageData: new VideoManageData, - activeName: "myAlgorithm", + installedList: [], + recomandUpdateList: [], + hasNewVersionSdk: [], + activeTab: "sdk", + hasNewVersionApp: [], + tempDarkList: [], + notInstalledList: [], + showUpload: false, + detailType: "", + detailProductID: "", + detailPrice: "", + buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [], + activeName: "搴旂敤涓績", patchUpdateStatus: "", - dragging: false, - list1: [ - { - sdk_name: "浜鸿劯鎻愬彇" - } - ], - list2: [ - { - id: "001", - name: "浠诲姟1", - child: [ - { - id: "1", - sdk_name: "浜鸿劯妫�娴�", - isSelect: false - }, - { - id: "2", - sdk_name: "浜鸿劯瀵规瘮", - isSelect: false - } - ], - isSetting: false, - isShowSetAlgo: false - } - ], - argsList: [], - baseObject: { - id: "", - algoId: "", - options1: [], - options2: [], - options3: [], - value1: "", - value2: "", - value3: "", - unit: "" - }, - currentAlgoId: "", - currentTaskId: "", - isSuperUser: false, downloadItem: "", downloading: false, - sceneDialogVisible: false, - dialogTitle: '', - direction: "rtl", - actDrawerShow: false, actStep: 0, + showQuickPath: true, + showActivateSuccess: false, activeCode: "", - sceneTemplates: [], - appSceneForm: { - id: "", - name: "", - desc: "", - rules: "", - txt: "" - }, - sceneSdks: [], - sceneRuleList: "", isInstall: false, - installPercentage: 0 - } - }, - watch: { - list2: { - handler(newVal, oldVal) { - // window.console.log(newVal, oldVal, '鐩戝惉list2') - if (newVal !== oldVal) { - // window.console.log(newVal, '鐩戝惉list2') - newVal.map((i, index) => { - i.child.map(j => { - this.$set(j, "parentId", i.id); - }); - }); - } + installDialogVisible: false, + installAppPackage: null, + installSdkPackage: null, + isActive: true, + isDefaultApp: false, + unActivedSDKList: [], + unActivedAppList: [], + inDetail: false, + isSDKDialog: true, + actType: "", + actId: "", + inputText: "", + tempList: [], + select: "", + activedSdkOrApp: { + activateCode: "", + productName: "", + setting: "", + expireTime: "", + licence: "", + devIds: "", }, - deep: true - } + installedApps: [], + storeApps: [], + installFile: {}, + appUpgreading: false, + sdkUpgreading: false, + autoRefresh: true, + productDetailVisible: false, + isUpgrading: false, + productDetail: {}, + otherProducts: [], + backStack: [], + toUpdateArr1: [], + forwardStack: [], + rocketIf: false, + backDisable: true, + forwardDisable: true, + showInputCode: false, + needToUpgradeInWin: false, + showInstallNotActive: false, + menuArr: ["搴旂敤涓績", "宸叉縺娲�", "绂荤嚎鍗囩骇/瀹夎", "鏇存柊"], + }; }, directives: { focus: { inserted: function (el) { el.querySelector("input").focus(); - } - } + }, + }, }, mounted() { - this.findAllSdk(); - this.findByType(); - this.getBaseList(); - this.findAll(); - this.getUser(); - // this.TaskMange.findAllSdk(); - // this.TaskMange.findByType(); - this.VideoManageData.init(); + var name = getUrlKey("activeName"); + if (name) { + this.pickMenu(name); + } + this.autoRefreshAppAndSdkState(); + this.getUnActivedList(1); + this.getUnActivedAppList(); + }, + beforeDestroy() { + this.autoRefresh = false; }, methods: { - installFormat(percentage) { - return percentage === 100 ? '瀹夎鎴愬姛' : `${percentage}%`; + searchAll() { + this.getAllApps(); + this.getAllSdk(); + this.getUnActivedList(1); + this.getUnActivedAppList(); }, - actived() { - //this.activeCode - this.actStep++ + goback() { + this.inDetail = false; }, - getCodeDetail() { }, - checkMyAlgorith() { - this.actDrawerShow = false; - this.activeName = "myAlgorithm"; + batchUpdate(s) { + if (s == "both") { + this.batchUpdateSDK(); + this.batchUpdateApp(); + } else if (this.activeTab == "sdk") { + this.batchUpdateSDK(); + } else { + this.batchUpdateApp(); + } + }, + batchUpdateSDK() { + this.hasNewVersionSdk.forEach((sdk) => { + this.donwloadSDK(sdk); + }); + }, + batchUpdateApp() { + this.hasNewVersionApp.forEach((app) => { + this.downloadApp(app, "upgrade"); + }); + }, + pickMenu(name) { + this.activeName = name; + this.activeTab = "sdk"; + this.showQuickPath = true; + switch (name) { + case "搴旂敤涓績": + this.tempList = this.unActivedSDKList; + this.tempDarkList = []; + break; + case "宸叉縺娲�": + this.tempList = this.installedList; + this.tempDarkList = this.notInstalledList; + break; + case "鏇存柊": + this.showQuickPath = false; + this.tempList = this.hasNewVersionSdk; + this.tempDarkList = []; + break; + default: + this.tempList = []; + this.tempDarkList = []; + break; + } + }, + pickTab(val) { + if (val) { + this.activeTab = val; + } + if (this.activeName == "搴旂敤涓績") { + this.tempList = + this.activeTab == "sdk" + ? this.unActivedSDKList + : this.unActivedAppList; + this.tempDarkList = []; + } else if (this.activeName == "宸叉縺娲�") { + this.tempList = + this.activeTab == "sdk" ? this.installedList : this.installedApps; + this.tempDarkList = + this.activeTab == "sdk" ? this.notInstalledList : this.storeApps; + } else if (this.activeName == "鏇存柊") { + this.tempList = + this.activeTab == "sdk" + ? this.hasNewVersionSdk + : this.hasNewVersionApp; + + this.tempDarkList = []; + } + }, + checkDetail(item, typ, sdkName) { + /* if (!item.canUpOrIns && typ == "Appcenter") { + return false; + } */ + this.isSdk = Boolean(sdkName); + this.inDetail = true; + this.detailProductID = item.id; + this.detailPrice = item.price; + if (typ) { + this.detailType = typ; + } else { + this.detailType = this.activeName == "搴旂敤涓績" ? "inactive" : "active"; + } + }, + checkIsDefOrNot(id) { + this.isDefaultApp = id.length <= 10; + }, + forwards() { + if (this.forwardStack.length == 0) { + this.forwardDisable = true; + return; + } + + this.backStack.push([this.productDetail, this.otherProducts]); + this.backDisable = false; + let item = this.forwardStack.pop(); + + this.productDetail = item[0]; + this.otherProducts = item[1]; + if (this.forwardStack.length == 0) { + this.forwardDisable = true; + } + }, + offlineInstall() { + this.installDialogVisible = false; + this.isInstall = true; + installSdk(this.installFile) + .then((res) => { + if (res.success) { + this.isInstall = false; + this.$message.success('瀹夎鎴愬姛,灏嗚烦杞嚦"宸叉縺娲�"涓煡鐪�'); + setTimeout(() => { + this.getAllSdk(); + window.parent.postMessage({ msg: "AppUpdate" }, "*"); + this.activeName = "宸叉縺娲�"; + }, 3000); + } + }) + .catch((e) => { + this.isInstall = false; + this.$message.error(e.msg); + }); + }, + downloadApp(app, action) { + let timer = null; + app.upgradeLoading = true; + timer = setInterval(() => { + this.rocketIf = !this.rocketIf; + }, 350); + + let _this = this; + installApp({ path: app.id }) + .then((res) => { + if (res && res.success) { + _this.$notify.success("瀹夎搴旂敤鎴愬姛"); + clearInterval(timer); + app.upgradeLoading = false; + setTimeout(() => { + window.parent.postMessage({ msg: "AppUpdate" }, "*"); + }, 3000); + } else { + } + }) + .catch((e) => { + _this.$notify.warning(e.msg); + clearInterval(timer); + app.upgradeLoading = false; + }); + // 寮�鍚嚜鍔ㄥ埛鏂� + this.appUpgreading = true; + }, + async getAllApps() { + let iArry = []; + let sArry = []; + let nArry = []; + let rsp = await getApps({ appName: this.inputText }); + if (rsp && rsp.success) { + // 閬嶅巻app鐨勮繃绋嬮噸缃� + this.appUpgreading = false; + + rsp.data.forEach((item) => { + let obj = Object.assign( + { unloadLoading: false, upgradeLoading: false }, + item + ); + if ( + obj.progressMsg !== "" && + obj.progressMsg !== "宸插畨瑁�" && + obj.progressMsg != "100%" + ) { + obj.upgradeLoading = true; + this.appUpgreading = true; + } + + if (obj.upgradeDone) { + this.$notify.success(1 ? "绠楁硶瀹夎鎴愬姛" : "绠楁硶鍗囩骇鎴愬姛"); + } + + item.installed ? iArry.push(obj) : sArry.push(obj); + item.isUpgrade && nArry.push(obj); + }); + } + this.installedApps = iArry; + this.storeApps = sArry; + this.hasNewVersionApp = nArry; + }, + unloadApp(app) { + let _this = this; + this.$confirm("纭畾瑕佸嵏杞借搴旂敤鍚�?", "鎻愮ず") + .then(() => { + _this.productDetailVisible = false; + + app.unloadLoading = true; + removeApp({ appId: app.id }) + .then((res) => { + if (res && res.success) { + app.unloadLoading = false; + _this.getAllApps(); + window.parent.postMessage({ msg: "AppUpdate" }, "*"); + _this.$notify.success("鍗歌浇搴旂敤鎴愬姛"); + } + }) + .catch((e) => { + app.unloadLoading = false; + }); + }) + .catch((e) => {}); + }, + newActInfo() { + return { + activateCode: "", + productName: "", + setting: "", + expireTime: "", + licence: "", + devIds: "", + }; + }, + getUnActivedList(v) { + getUnActivedSdk({ sdkName: this.inputText }).then((res) => { + if (res.code == 200) { + this.unActivedSDKList = res.data; + const len = this.unActivedSDKList.length; + const set = new Set(); + if (len <= 3) { + this.recomandUpdateList = [...this.unActivedSDKList]; + } else { + for (let i = 0; i < 3; i++) { + const pickI = Math.floor(Math.random() * len); + if (set.has(pickI)) { + i--; + continue; + } + set.add(pickI); + this.recomandUpdateList.push(this.unActivedSDKList[pickI]); + } + } + v == 1 ? (this.tempList = res.data) : null; + } + }); + }, + getUnActivedAppList() { + getUnActivedApp({ appName: this.inputText }).then((res) => { + if (res.code == 200) { + this.unActivedAppList = res.data; + this.pickTab(); + } + }); + }, + actived(item) { + if (!item.canUpOrIns) { + return false; + } + + let _this = this; + if (this.activeTab == "sdk") { + actPageAlg(item.id, "") + .then((res) => { + if (res.data.isSuccess) { + this.productDetailVisible = false; + _this.activedSdkOrApp = res.data.successMsg; + this.showActivateSuccess = true; + _this.actStep++; + _this.getUnActivedList(1); + _this.getAllSdk(); + } else { + _this.$notify.error(res.data.failMsg.failMsg); + } + }) + .catch((e) => {}); + } else if (this.activeTab == "app") { + //婵�娲诲簲鐢� + actApp(item.id, "") + .then((res) => { + if (res.data.isSuccess) { + this.productDetailVisible = false; + _this.activedSdkOrApp = res.data.successMsg; + this.showActivateSuccess = true; + _this.actStep++; + _this.getUnActivedAppList(); + _this.getAllApps(); + } else { + _this.$notify.error(res.data.failMsg.failMsg); + } + }) + .catch((e) => {}); + } }, onFileUpload(file) { - //this.patchUpdateStatus = `<span style="color:green">涓婁紶鎴愬姛, 鐐瑰嚮鍗囩骇鎸夐挳寮�濮嬪畨瑁�</span>`; this.patchFile = { ...file }; this.fileAdded = true; const h = this.$createElement; - // this.$msgbox({ - // title: '绠楁硶淇℃伅', - // message: h('div', null, [ - // h('span', null, '绠楁硶鍚嶇О锛� '), - // h('i', { style: 'color: teal' }, file.filename) - // ]), - // showCancelButton: true, - // confirmButtonText: '纭畾', - // cancelButtonText: '鍙栨秷', - // beforeClose: (action, instance, done) => { - // if (action === 'confirm') { - // instance.confirmButtonLoading = true; - // instance.confirmButtonText = '鎵ц涓�...'; - // setTimeout(() => { - // done(); - // setTimeout(() => { - // instance.confirmButtonLoading = false; - // }, 300); - // }, 3000); - // } else { - // done(); - // } - // } - // }).then(action => { - // this.$message({ - // type: 'info', - // message: 'action: ' + action - // }); - // }); - - this.$confirm('', '绠楁硶淇℃伅', { - message: `<div class="installInfo"> - <div><span>绠楁硶鍚嶇О锛�</span><span>${file.filename}</span></div> - <div><span>瀹夎鐗堟湰锛�</span><span></span></div> - <div><span>鏇存柊鍐呭锛�</span><span></span></div> - <p>纭畾瀹夎姝ょ畻娉曪紵</p> - </div>`, - confirmButtonText: '瀹夎', - cancelButtonText: '鍙栨秷', - dangerouslyUseHTMLString: true, - type: '' - }).then(() => { - this.isInstall = true; - //瀹夎 - installSdk(file).then(res => { + //涓婁紶瀹屾垚鑾峰彇瀹夎淇℃伅 + let _this = this; + getInstallInfo(file) + .then((res) => { + _this.installFile = file; if (res.success) { - debugger - this.isInstall = false; - //this.$refs['progressBar'].style.width = 100% - //this.installPercentage = 100% - this.$message({ - type: 'success', - message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�' - }); - setTimeout(() => { - this.findAllSdk(); - this.activeName = 'myAlgorithm'; - }, 3000) + _this.installDialogVisible = true; + if (res.data.apps.length > 0) { + _this.installAppPackage = { + appId: res.data.apps[0].appId, + version: res.data.apps[0].version, + productName: res.data.productName, + installContent: res.data.apps[0].installContent, + }; + } + if (res.data.sdks.length > 0) { + _this.installSdkPackage = { + appId: res.data.sdks[0].sdkId, + version: res.data.sdks[0].version, + productName: res.data.productName, + installContent: res.data.sdks[0].installContent, + }; + } + } else { + this.$message.error(res.msg); } + }) + .catch((e) => { + this.$message.error(e.msg); }); - }).catch(() => { - console.log('鍙栨秷瀹夎') - }) - }, - onFileAdded(f) { - debugger; this.patchUpdateStatus = ""; }, - // 鏍¢獙杈撳叆鐨勬槸鍚︽槸鏁板瓧 - valiNum(value) { - if (value) { - let re = /[^\-?\d.]*$/; - if (!re.test(value)) { - // this.$toast({ - // type: "warning", - // message: "璇疯緭鍏ユ暟瀛楋紒" - // }); - this.$notify({ - title: "鎻愮ず", - message: "璇疯緭鍏ユ暟瀛楋紒", - type: "warning" - }); - } + async getAllSdk() { + let installedList = []; + let unInstalledList = []; + let hasNewVersionList = []; + let res = await findAllSdk({ sdkName: this.inputText }); + if (res && res.success) { + this.sdkUpgreading = false; + + res.data.forEach((item) => { + let obj = Object.assign( + { unloadLoading: false, upgradeLoading: false }, + item + ); + if ( + obj.progressMsg !== "" && + obj.progressMsg !== "宸插畨瑁�" && + obj.progressMsg !== "100%" + ) { + obj.upgradeLoading = true; + this.sdkUpgreading = true; + } + + //绠楁硶杞欢 宸插畨瑁呭叾涓寘鍚緟鍗囩骇 鏈畨瑁� + item.installed ? installedList.push(obj) : unInstalledList.push(obj); + item.isUpgrade ? hasNewVersionList.push(obj) : null; + }); } + this.installedList = installedList; + this.notInstalledList = unInstalledList; + this.toUpdateArr1 = this.installedList.slice(0, 10); + this.hasNewVersionSdk = hasNewVersionList; + this.pickTab(); }, - // 宸﹁竟鎷栧姩妯″潡寰楁嫋鍔ㄧ粨鏉熷悗鐨勮Е鍙戝嚱鏁� - endLeft(env) { - this.dragging = false; - let taskId = env.to.id; - let sdkId = this.TaskMange.list1[env.oldIndex].id; - if (!taskId.length || !sdkId.length) { + unloadSdk(sdk) { + let _this = this; + this.$confirm("纭畾瑕佸嵏杞借绠楁硶鍚�?", "鎻愮ず") + .then(() => { + _this.productDetailVisible = false; + sdk.unloadLoading = true; + removeSdk({ sdkId: sdk.id }) + .then((res) => { + if (res && res.success) { + sdk.unloadLoading = false; + this.$notify.success("鍗歌浇瀹屾垚"); + _this.getAllSdk(); + window.parent.postMessage({ msg: "AppUpdate" }, "*"); + } + }) + .catch((e) => { + sdk.unloadLoading = false; + }); + }) + .catch((e) => {}); + }, + donwloadSDK(item) { + let timer = null; + item.upgradeLoading = true; + timer = setInterval(() => { + this.rocketIf = !this.rocketIf; + }, 350); + this.downloadItem = item.id; + downloadSdk({ path: item.id }) + .then((rsp) => { + clearInterval(timer); + item.upgradeLoading = false; + this.downloadItem = ""; + + window.parent.postMessage({ msg: "AppUpdate" }, "*"); + }) + .catch((err) => { + this.$notify.warning(err.data); + item.upgradeLoading = false; + this.downloadItem = ""; + }); + // 寮�鍚嚜鍔ㄥ埛鏂� + this.sdkUpgreading = true; + }, + autoRefreshAppAndSdkState() { + this.getAllApps(); + this.getAllSdk(); + if (!this.autoRefresh) { return; } - // 鑾峰彇鍒拌浠诲姟鎵�鍦ㄧ殑鍏冪礌 - let task = this.TaskMange.list2.find(i => { - return i.id === taskId; - }); - let arr = task.child.filter(i => { - return i.id === sdkId; - }); - // window.console.log(task, "鎷栬繘鏉ョ殑浠诲姟淇℃伅", sdkId, arr); - if (arr && arr.length >= 2) { - // this.$toast({ - // type: "warning", - // message: "璇ョ畻娉曞凡瀛樺湪锛�" - // }); - this.$notify({ - title: "鎻愮ず", - message: "璇ョ畻娉曞凡瀛樺湪锛�", - type: "warning" - }); - task.child.splice(env.newIndex, 1); - return true; - } - let list = task.child.map((i, index) => { - let obj = {}; - obj.sdkId = i.id; - obj.sort = index + 1; - return obj; - }); - let json = { - taskId: taskId, - sdks: list - }; - this.addTaskSdk(json); - }, - // 鍙宠竟鎷栧姩妯″潡寮�濮嬫嫋鍔ㄨЕ鍙戝嚱鏁� - startRight(env) { - this.$nextTick(() => { - this.dragging = true; - }); - // window.window.console.log(env, "right start"); - }, - // 鍙宠竟鎷栧姩妯″潡鎷栧姩缁撴潫瑙﹀彂鍑芥暟 - endRight(env) { - // window.window.console.log(env, "right end"); - }, - clickSet(data) { - if (data.isSetting) { - data.isSetting = false; - } else { - data.isSetting = true; - } - }, - clickDel(data, Index) { - this.$confirm("鎻愮ず锛氬垹闄ゅ悗锛屾浠诲姟鍦ㄦ憚鍍忔満涓殑搴旂敤澶辨晥锛屾槸鍚﹀垹闄わ紵", { - center: true, - showConfirmButton: true, - showCancelButton: true, - confirmButtonClass: "comfirm-class-sure", - cancelButtonClass: "comfirm-class-cancle" - }) - .then(() => { - this.deleteTask(data); - }) - .catch(err => { }); - }, - clickSetAlgo(row, data) { - // window.console.log(row, data, "缂栬緫浠诲姟涓煇涓�涓畻娉�"); - if (row.isShowSetAlgo && data.id === this.TaskMange.currentAlgoId) { - row.isShowSetAlgo = false; - data.isSelect = false; - return false; - } - if (data.id !== this.TaskMange.currentAlgoId) { - let isEdit = false; - if (this.argsList && this.argsList.length !== 0) { - this.TaskMange.argsList.map((i, index) => { - if (i.value2 !== this.argsList[index].value2) { - isEdit = true; - } - if (i.value3 !== this.argsList[index].value3) { - isEdit = true; - } - }); + setTimeout(() => { + if (this.appUpgreading) { + this.getAllApps(); } - if (isEdit) { - this.$notify({ - title: "鎻愮ず", - message: "璇峰厛淇濆瓨鏈繚瀛樼殑閰嶇疆锛�", - type: "warning" - }); - return false; - } else { - let task = this.TaskMange.list2.find(element => { - return element.isShowSetAlgo; - }); - // console.log(task, '鏄惁鏈夊凡缁忔墦寮�缂栬緫鐨�') - if (task !== undefined) { - this.$set(task, "isShowSetAlgo", false); - task.child.map(i => { - this.$set(i, "isSelect", false); - }); - } + if (this.sdkUpgreading) { + this.getAllSdk(); } - } - this.TaskMange.currentAlgoId = data.id; - this.TaskMange.currentTaskId = row.id; - let task = this.TaskMange.list2.find(element => { - return element.isShowSetAlgo; - }); - if (task === undefined) { - this.getSdkArgs(data).then(() => { - this.getRulesByTaskSdk(row.id, data.id); - }); - if (row.isShowSetAlgo) { - row.isShowSetAlgo = false; - } else { - row.isShowSetAlgo = true; - data.isSelect = true; - } - } else { - // this.$toast({ - // type: "warning", - // message: "璇峰厛淇濆瓨鏈繚瀛樼殑閰嶇疆锛�" - // }); - // this.$notify({ - // title: "鎻愮ず", - // message: "璇峰厛淇濆瓨鏈繚瀛樼殑閰嶇疆锛�", - // type: "warning" - // }); - } + }, 1000); }, - async getRulesByTaskSdk(taskId, sdkId) { - let res = await getRulesByTaskSdk({ - taskId: taskId, - sdkId: sdkId - }); - if (res && res.success) { - if (res.data.rules && res.data.rules.length !== 0) { - this.TaskMange.argsList = res.data.rules.map((i, index) => { - let sdk = res.data.argList.find(j => { - return j.alias === i.sdk_arg_alias; - }); - let obj = JSON.parse(JSON.stringify(this.TaskMange.baseObject)); - obj.value1 = i.sdk_arg_alias ? i.sdk_arg_alias : ""; - obj.value2 = i.operator ? i.operator : ""; - obj.value3 = i.sdk_arg_value ? i.sdk_arg_value : ""; - obj.unit = sdk.unit ? sdk.unit : ""; - obj.id = i.Id ? i.Id : ""; - obj.algoId = sdkId; - return obj; - }); - } else { - this.TaskMange.argsList = res.data.argList.map(i => { - let obj = JSON.parse(JSON.stringify(this.TaskMange.baseObject)); - obj.value1 = i.alias ? i.alias : ""; - obj.value2 = i.default_operator ? i.default_operator : ""; - obj.value3 = i.default_value ? i.default_value : ""; - obj.unit = i.unit ? i.unit : ""; - obj.id = ""; - obj.algoId = sdkId; - return obj; - }); - } - // window.console.log(res, '鏌ユ壘绠楁硶瑙勫垯', this.argsList) - this.argsList = JSON.parse(JSON.stringify(this.TaskMange.argsList)); - } - }, - async findAllSdk() { - let res = await findAllSdk(); - if (res && res.success) { - // debugger - this.TaskMange.list1 = res.data.map((i, index) => { - this.$set(i, "isEdit", false); - //mock 鏈畨瑁�/寰呭崌绾� - // if (index == 1 || index == 2) { - // this.$set(i, "isUpgrade", true); - // } - // if (index == 3 || index == 4) { - // this.$set(i, "installed", false); - // } - //mock end - return i; - }); - } - }, - addTask() { - let obj = { - id: "", - name: "浠诲姟" + this.TaskMange.list2.length, - child: [], - isSetting: false, - isShowSetAlgo: false - }; - // window.console.log(this.TaskMange.list2, "addTask"); - this.TaskMange.list2.push(obj); - this.addTaskAsync(obj.name); - this.$nextTick(() => { - let taskArea = document.getElementById("taskArea"); - taskArea.scrollTop = taskArea.scrollHeight; - }); - }, - async findAll() { - let res = await findAll(); - if (res && res.success) { - if (res.data && res.data.length !== 0) { - let list = res.data.map(i => { - let obj = {}; - obj.id = i.task.taskid; - obj.name = i.task.taskname; - obj.enable = i.task.enable; - obj.is_alarm = i.task.is_alarm; - obj.child = []; - if (i.sdks && i.sdks.length !== 0) { - obj.child = i.sdks.map(j => { - let t = {}; - t.id = j.id; - t.ipc_id = j.ipc_id; - if (i.sdks.length == 1) { - t.sdk_name = i.task.taskname; - // console.log("鍗曚釜sdk绠楁硶锛�",t.sdk_name) - } else { - t.sdk_name = j.sdk_name; - // console.log("澶氫釜sdk绠楁硶锛�",t.sdk_name) - } - t.icon = j.icon; - t.enable = j.enable; - t.isSelect = false; - return t; - }); - } - obj.isSetting = false; - obj.isShowSetAlgo = false; - return obj; - }); - this.TaskMange.list2 = list; - } - } - }, - clickDelSdk(task, sdk) { - this.$confirm( - "鎻愮ず锛氬垹闄ゅ悗锛屾绠楁硶鍦ㄦ湰浠诲姟涓Щ闄わ紝鍚屾椂鍦ㄦ憚鍍忔満涓殑搴旂敤澶辨晥锛屾槸鍚﹀垹闄わ紵", - { - center: true, - showConfirmButton: true, - showCancelButton: true, - confirmButtonClass: "comfirm-class-sure", - cancelButtonClass: "comfirm-class-cancle" - } - ) - .then(() => { - this.delTaskSdk(task, sdk); - }) - .catch(err => { }); - }, - selectChange(event, type, data) { - if (type === "options1") { - // window.window.console.log(type, data, "閫夋嫨涓嬫媺妗�"); - data.options1.map(i => { - if (i.value === data.value1) { - this.$set(data, "unit", i.unit ? i.unit : ""); - } - }); - } - }, - // 鍒犻櫎浠诲姟绠楁硶 - async delTaskSdk(task, sdk) { - let json = { - taskId: task.id, - sdkId: sdk.id - }; - let res = await delTaskSdk(json); - if (res && res.success) { - // this.$toast({ - // type: "success", - // message: "鍒犻櫎浠诲姟绠楁硶鎴愬姛!" - // }); - this.$notify({ - title: "鎴愬姛", - message: "鍒犻櫎浠诲姟绠楁硶鎴愬姛!", - type: "success" - }); - this.findAll(); - } - }, - // 鍒犻櫎浠诲姟 - async deleteTask(data, index) { - // window.console.log(data, "deleteTask"); - let res = await deleteTask({ taskId: data.id }); - // this.$toast({ - // type: res.success ? "success" : "error", - // message: res.msg - // }); - this.$notify({ - title: res.success ? "鎴愬姛" : "澶辫触", - message: res.msg, - type: res.success ? "success" : "error" - }); - if (data.id && res.success) { - this.findAll(); - } - }, - // 鏇存柊浠诲姟鐘舵�� - async updateTaskStatus(data) { - // window.console.log(data, '鏇存柊浠诲姟鐘舵��') - let json = { - taskId: data.id, - enable: data.enable - }; - let res = await updateTaskStatus(json); - // this.$toast({ - // type: res.success ? "success" : "error", - // message: res.msg - // }); - this.$notify({ - title: res.success ? "鎴愬姛" : "澶辫触", - message: res.msg, - type: res.success ? "success" : "error" - }); - }, - // 鏇存柊浠诲姟鍚嶇О - async updateTaskName(data) { - let json = { - taskId: data.id, - taskName: data.name - }; - let res = await updateTaskName(json); - // this.$toast({ - // type: res.success ? "success" : "error", - // message: res.msg - // }); - this.$notify({ - title: res.success ? "鎴愬姛" : "澶辫触", - message: res.msg, - type: res.success ? "success" : "error" - }); - if (res && res.success) { - this.$set(data, "isSetting", false); - } - }, - // 鑾峰彇搴曞簱鏁版嵁 - async getBaseList() { - // let res = await getTagList(); - // if (res && res.success) { - // let filter = res.data.filter(i => { - // return i.status === 0; - // }); - // let list = filter.map(i => { - // let obj = {}; - // obj.id = i.key; - // obj.name = i.title; - // obj.value = i.value; - // return obj; - // }); - // list.unshift({ - // id: "", - // name: "鍏ㄩ儴搴曞簱", - // value: "" - // }) - - // // this.TaskMange.baseObject.options3 = [...all, ...list]; - // this.TaskMange.baseObject.options3 = [...list]; - // } - - this.TaskMange.baseObject.options3 = [ - { id: true, name: true, value: true }, - { id: false, name: false, value: false } - ]; - }, - // 鑾峰彇绠楁硶鍙傛暟 - async getSdkArgs(data) { - let res = await getSdkArgs({ - sdkId: data.id, - scope: "TASKRULE" - }); - if (res && res.success) { - // window.console.log(res, "鏌ヨ绠楁硶鍙傛暟"); - let list = res.data.map(i => { - let obj = {}; - obj.name = i.name; - obj.id = i.alias; - obj.value = i.alias; - obj.unit = i.unit; - obj.must = i.must; - obj.range = i.range; - obj.sort = i.sort; - return obj; - }); - this.TaskMange.baseObject.options1 = [...list]; - } - }, - // 鏌ヨ瀛楀吀 - async findByType() { - let res = await findByType(); - if (res && res.success) { - let list = res.data.RULECOMPUTEBETWEEN.map(i => { - let obj = {}; - obj.name = i.name; - obj.value = i.value; - return obj; - }); - this.TaskMange.baseObject.options2 = [...list]; - } - }, - // 绠楁硶閰嶇疆锛屾柊寤� - add() { - this.TaskMange.argsList.push( - JSON.parse(JSON.stringify(this.TaskMange.baseObject)) - ); - }, - // 绠楁硶閰嶇疆 鍒犻櫎 - delRule(index) { - this.TaskMange.argsList.splice(index, 1); - }, - // 绠楁硶鍙傛暟淇濆瓨 - async save() { - let list = this.TaskMange.argsList.map(i => { - let obj = {}; - obj.id = i.id; - obj.operator = i.value2; - obj.sdk_arg_alias = i.value1; - obj.sdk_arg_value = i.value3; - return obj; - }); - let json = { - rules: list, - sdkId: this.TaskMange.currentAlgoId, - taskId: this.TaskMange.currentTaskId - }; - let res = await saveTaskSdkRule(json); - this.$notify({ - title: "鎻愮ず", - type: res.success ? "success" : "error", - message: res.msg - }); - if (res && res.success) { - let task = this.TaskMange.list2.find(i => { - return i.id === this.TaskMange.currentTaskId; - }); - if (task) { - this.$set(task, "isShowSetAlgo", false); - this.TaskMange.argsList = []; - task.child.map(i => { - this.$set(i, "isSelect", false); - }); - } - } - }, - getDefault() { - this.deleteTaskSdkRule( - this.TaskMange.currentTaskId, - this.TaskMange.currentAlgoId - ).then(() => { - this.getRulesByTaskSdk( - this.TaskMange.currentTaskId, - this.TaskMange.currentAlgoId - ); - }); - }, - async deleteTaskSdkRule(taskId, sdkId) { - let json = { - taskId: taskId, - sdkId: sdkId - }; - let res = await deleteTaskSdkRule(json); - // this.$toast({ - // type: res.success ? "success" : "error", - // message: res.msg - // }); - this.$notify({ - title: res.success ? "鎴愬姛" : "澶辫触", - message: res.msg, - type: res.success ? "success" : "error" - }); - if (res && res.success) { - // window.console.log(res, "鎭㈠榛樿鍊�"); - } - }, - // 缁欎换鍔℃坊鍔犵畻娉� - async addTaskSdk(data) { - let res = await addTaskSdk(data); - if (res && res.success) { - // window.console.log(res, 'res') - this.findAll(); - } - }, - // 鏂版坊鍔犱换鍔� - async addTaskAsync(name) { - let res = await addTask({ taskname: name }); - // this.$toast({ - // type: res.success ? "success" : "error", - // message: res.msg - // }); - // window.console.log(res, "addTaskAsync"); - this.$notify({ - title: res.success ? "鎴愬姛" : "澶辫触", - message: res.msg, - type: res.success ? "success" : "error" - }); - if (res && res.success) { - this.findAll(); - } - }, - cancle(row) { - if (row.isShowSetAlgo) { - row.isShowSetAlgo = false; - } - this.TaskMange.argsList = []; - this.TaskMange.currentAlgoId = ""; - row.child.map(i => { - this.$set(i, "isSelect", false); - }); - }, - cancleTask(row) { - if (row.isSetting) { - row.isSetting = false; - } - }, - commandAlgo(command, row, item) { - if (command === 1) { - // console.log('璁剧疆绠楁硶') - this.clickSetAlgo(row, item); - } - if (command === 2) { - // console.log('鍒犻櫎绠楁硶') - this.clickDelSdk(row, item); - } - }, - commandTask(command, row) { - if (command === 1) { - //缂栬緫浠诲姟 - this.clickSet(row); - } - }, - getUser() { - // console.log("鐧诲綍鐢ㄦ埛",JSON.parse(sessionStorage.getItem("userInfo")).username) - if ( - sessionStorage.getItem("userInfo") && - (JSON.parse(sessionStorage.getItem("userInfo")).username == - "superadmin" || - JSON.parse(sessionStorage.getItem("userInfo")).username == "basic") - ) { - this.isSuperUser = true; - } else { - this.isSuperUser = false; - } - }, - donwload(item) { - this.downloading = true; - this.downloadItem = item.id; - - downloadSdk({ path: item.id }) - .then(rsp => { - this.$notify({ - type: "success", - message: "绠楁硶宸插畨瑁�" - }); - this.downloading = false; - this.downloadItem = ""; - this.findAllSdk(); - }) - .catch(err => { - this.$notify({ - type: "warning", - message: err.data - }); - - this.downloading = false; - this.downloadItem = ""; - }); - }, - commandAlgLib(item) { - this.$set(item, "isEdit", true); - }, - inputBlur(item) { - // console.log(item, '淇敼鍚嶇О') - this.$set(item, "isEdit", false); - }, - - cleanTemplateForm() { - this.appSceneForm.name = ""; - this.appSceneForm.desc = ""; - this.appSceneForm.rules = ""; - this.appSceneForm.txt = ""; - - this.$refs.ruleEditor.cleanRule(); - }, - handleTabClick() { - - }, - handleCreateScene() { - this.sceneDialogVisible = true; - this.dialogTitle = '鍒涘缓鍦烘櫙妯℃澘'; - - this.sceneSdks = this.TaskMange.list1.filter(sdk => { - return sdk.installed === true; - }); - this.sceneRuleList = ""; - - this.$nextTick(() => { - this.cleanTemplateForm(); - }); - }, - handleDialogClose() { - this.sceneDialogVisible = false; - }, - handleEditScene(item) { - this.appSceneForm.name = item.name; - this.appSceneForm.desc = item.desc; - - this.sceneSdks = item.sdks; - this.sceneRuleList = item.rules; - this.sceneDialogVisible = true; - this.dialogTitle = '缂栬緫鍦烘櫙妯℃澘'; - }, - - - } + }, }; </script> <style lang="scss"> .s-task-manage { width: 100% !important; + min-width: 754px !important; height: 100%; box-sizing: border-box; text-align: left; - min-width: 1106px; - // background-color: #f2f6fc; - .s-video-manage-breadcrumb { - height: 5%; - box-sizing: border-box; - border: 1px solid #e4e7ed; - background-color: rgb(255, 255, 255); - -webkit-box-shadow: #e4e7ed 0px 0px 9px inset; - box-shadow: #e4e7ed 0px 0px 9px inset; - border-radius: 5px; - } - .el-tabs { - height: calc(100% - 50px); - // margin-top: 5px !important; - } - .el-tabs--border-card > .el-tabs__header { - border: none; - } - .el-tabs__item.is-top { - height: 50px; - padding: 5px 50px !important; - font-size: 15px; - border: none !important; - } - .el-tabs__item.is-top.is-active { - font-weight: bold; - } - .el-tabs__content { - width: 100%; - height: calc(100% - 34px); - box-sizing: border-box; - } - .el-tab-pane { - width: 100%; - height: 100%; - } -} -.el-breadcrumb__inner { - font-weight: bold; - color: #606266; - cursor: pointer; + background-color: #fff; } -.installInfo { - text-indent: 2em; - font-size: 14px; - color: #777; - p { - text-align: center; - color: #666; - } -} -.src-title{ - color: #333; - font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC'; - font-weight: 650; - font-style: normal; - height: 36px; - font-size: 15px; - padding-left: 25px; -} .task-manage { height: 100%; .installModel { @@ -1182,7 +1020,7 @@ .progress-bar { width: 70%; height: 17px; - border-radius: 3px; + border-radius: 3pxd; background-color: rgb(227, 229, 231); position: absolute; top: 50%; @@ -1201,35 +1039,11 @@ } } } - .el-tab-pane { - height: auto !important; - } - .el-tabs--border-card > .el-tabs__content { - padding: 0 !important; - overflow: auto !important; - } - .el-tabs__content { - padding: 0 !important; - overflow: auto !important; - } - //height: calc(100% - 10px); - // .super { - // .right-box { - // width: 58% !important; - // } - // } - .edit-rules-box { - padding: 0 2px 0 13px; - } - .common { - .rigth-box { - width: 90% !important; - } - } - .super, - .common { + + .super { width: 100%; height: 100%; + // caret-color: rgba(0, 0, 0, 0); .title { margin-bottom: 10px; line-height: 30px; @@ -1238,353 +1052,477 @@ color: #222222; } .left-box { - // width: 41%; height: 100%; box-sizing: border-box; - // float: left; - - .action-bar { - margin-bottom: 30px; - .el-input { - width: 100%; - } - } - .task-list { - background: #fff; - padding: 20px; - box-sizing: border-box; - - .flex-list { - display: flex; - flex-direction: row; - flex-wrap: wrap; - // justify-content: space-around; - // align-content: space-around; - // &:after { - // content: ""; - // flex: auto; - // } - .wrap-box { - width: 16.66%; - } - .list-choose-item-left { - // width: 220px; - // height: 214px; - width: 80%; - height: auto; - margin: auto; - margin-bottom: 30px; - // @media screen and(min-width: 1895px) { - // //margin: 20px 25px 20px 20px; - // width: 230px; - // height: 224px; - // } - // @media screen and(min-width: 1695px) and(max-width:1895px ) { - // margin: 20px 10px 20px 15px; - // } - // @media screen and(min-width: 1460px) and(max-width: 1695px) { - // margin: 20px 25px 20px 20px; - // } - // @media screen and(max-width: 1460px) { - // margin: 20px 15px 20px 10px; - // } - } - } - } - .appScenarios-list { + .nav-box { + height: 200px; display: flex; - flex-wrap: wrap; - .wrap-box { - width: 16.6%; - margin-bottom: 30px; - .inner { - width: 80%; - - box-sizing: border-box; - position: relative; + justify-content: space-between; + padding: 35px 60px; + position: relative; + .nav-box-menu { + width: 200px; + height: 200px; + z-index: 99; + .menu-item { font-size: 14px; - padding: 20px 0 50px; - transition: all 1s; - background: #ffffff; - border: 1px solid #e2e2e2; - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - border-radius: 4px; - margin: auto; - &:hover { - .mask { - display: block; + line-height: 50px; + height: 50px; + letter-spacing: 0.5px; + color: #828282; + padding-left: 20px; + border-left: 3px solid #f3f6fc; + cursor: pointer; + caret-color: transparent; + sup { + background-color: #f52323; + font-size: 12px; + color: #fff; + height: 18px; + line-height: 18px; + padding: 0 3.5px; + border-radius: 50%; + } + } + .menu-item:hover { + font-weight: 600; + color: #333; + transition: all 0.15s; + } + .menu-item-actiove { + border-left: 3px solid #23d7ee; + font-weight: 700; + font-size: 16px; + color: #333; + } + } + .nav-box-search { + z-index: 99; + position: relative; + .all-scene { + position: absolute; + z-index: 100; + right: 64px; + + top: 10px; + font-size: 12px; + } + .el-input { + position: relative; + font-size: 12px; + border: 2px solid #f2f2f7; + border-radius: 20px; + .el-input__inner { + border: none; + height: 30px; + line-height: 30px; + padding: 0 12px; + } + .el-input-group__prepend { + border-right: 0; + border: none; + border-radius: 20px; + background: #fff; + padding: 0 0 0 15px; + + i { + font-weight: 600; + color: #333; + font-size: 16px; } } - .mask { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.65); - backdrop-filter: blur(1px) brightness(100%); - text-align: center; - z-index: 1; - border-radius: 3px; - display: none; - .tool { - position: absolute; - top: 49%; - left: 50%; - transform: translate(-50%, -50%); - i { - font-size: 50px; + .el-input-group--append .el-input__inner, + .el-input-group__prepend { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border: none; + } + .el-input-group__append { + border-left: 0; + border: none; + border-radius: 20px; + width: 52px; + background: linear-gradient( + 180deg, + #ecfcfe 0%, + #ebf4fd 47.92%, + #f4f4fe 100% + ); + .el-input--suffix { + border: none; + .el-input__icon { + line-height: 30px; } - i:nth-of-type(1) { - margin-right: 30px; + .el-input__inner { + font-size: 12px; + font-weight: bold; + letter-spacing: 0.5px; + padding: 0 0px 0 30px; + color: #474747; } - i:nth-of-type(2) { - color: red; + .el-input__suffix { + display: none; } } - } - .scenario-icon { - display: flex; - width: 100%; - height: 100%; - margin: auto; - justify-content: center; - align-content: center; - align-items: center; - .single, - .double, - .third, - .four { - width: 80%; - padding-top: 80%; - position: relative; - margin: auto; - display: flex; - flex-wrap: wrap; - justify-content: center; - .svg-wrap { - width: 50%; - position: absolute; - height: 0; - padding-top: 50%; - text-align: center; - box-shadow: 0 0 3px 2px rgb(247, 247, 247) inset; - svg { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - .baseImg { - position: absolute !important; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); + .el-input__inner::placeholder { + color: rgb(71, 71, 71); + } + .el-select-dropdown { + min-width: 120px !important; + left: -26px !important; + background: rgba(236, 245, 253, 0.6); + border-radius: 2px; + border: none; + .el-select-dropdown__item { + height: 22px; + line-height: 22px; + font-size: 12px; + letter-spacing: 0.4px; + color: #333333; + .icon { + margin-right: 5px; + font-size: 15px; } } - } - .single { - margin: auto; - .svg-wrap { - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - box-shadow: none; - } - } - .double { - .svg-wrap:nth-of-type(1) { - top: 50%; - transform: translateY(-50%); - left: 0; - } - .svg-wrap:nth-of-type(2) { - top: 50%; - transform: translateY(-50%); - right: 0; - } - } - .third { - .svg-wrap:nth-of-type(1) { - top: 0; - left: 0; - } - .svg-wrap:nth-of-type(2) { - top: 0; - right: 0; - } - .svg-wrap:nth-of-type(3) { - top: 50%; - left: 50%; - transform: translateX(-50%); - } - } - .four { - .svg-wrap:nth-of-type(1) { - top: 0; - left: 0; - } - .svg-wrap:nth-of-type(2) { - top: 0; - right: 0; - } - .svg-wrap:nth-of-type(3) { - top: 50%; - left: 0; - } - .svg-wrap:nth-of-type(4) { - top: 50%; - right: 0; + .el-select-dropdown__item.hover, + .el-select-dropdown__item:hover { + background-color: #ebf4fd; + font-weight: 600; } } } - .scenario-name { - width: 100%; - height: 36px; - line-height: 36px; - text-align: center; - position: absolute; - bottom: 10px; - left: 0; - } - } - } - } - .store-list { - display: flex; - flex-wrap: wrap; - .wrap-box { - width: 16.6%; - margin-bottom: 30px; - .inner { - width: 80%; - box-sizing: border-box; - position: relative; - font-size: 14px; - padding-bottom: 10px; - transition: all 1s; - background: #ffffff; - border: 1px solid #e2e2e2; - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - border-radius: 4px; - margin: auto; - .alg-icon { - position: relative; - width: 80%; - margin: auto; - padding-top: 80%; - svg { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } - .alg-name { - height: 36px; - text-align: center; - line-height: 36px; - } - .mask { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.65); - backdrop-filter: blur(1px) brightness(100%); - text-align: center; - z-index: 1; - border-radius: 3px; - display: none; - svg { - position: absolute; - top: 49%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 33; - } - } - &:hover { - .mask { - display: block; - } - } - } - } - } - .drawer-content { - font-family: "PingFangSC-Regular"; - .el-step__title.is-process { - border-color: #3d68e1 !important; - color: #3d68e1 !important; - font-family: Tahoma, Helvetica, Arial, "\5B8B\4F53", sans-serif; - } - .el-step__head.is-process { - border-color: #3d68e1 !important; - color: #3d68e1 !important; - font-family: Tahoma, Helvetica, Arial, "\5B8B\4F53", sans-serif; - } - .el-input { - width: 100%; - margin-bottom: 30px; - } - .current-step { - margin: 40px 30px 30px; - } - .act-code { - padding: 0 30px; - p { - font-size: 15px; - margin-bottom: 16px; - } - } - .desc { - padding: 0 30px; - margin-bottom: 30px; - li { - border-bottom: 1px solid #eee; - height: 45px; - line-height: 45px; - font-size: 14px; - &:last-child { - border-bottom: none; - } - label { + .el-input-group__prepend .el-select { display: inline-block; - width: 90px; - padding-left: 14px; + margin: -10px -20px; + border: none; + border-radius: 20px; + background: linear-gradient( + 180deg, + #ecfcfe 0%, + #ebf4fd 47.92%, + #f4f4fe 100% + ); + } + } + } + .bg-img-wrap { + position: absolute; + z-index: 1; + right: 0; + top: 41px; + height: 229px; + img { + height: 100%; + } + } + } + .quick-path { + position: relative; + height: 200px; + margin: 0 60px; + z-index: 99; + background: linear-gradient( + 180deg, + #ecfcfe 0%, + #ebf4fd 47.92%, + #f4f4fe 100% + ); + border-radius: 4px; + height: 75px; + display: flex; + align-items: center; + .left-items { + display: flex; + } + .quick-item { + display: flex; + cursor: pointer; + padding: 2px 20px; + height: 52px; + box-sizing: border-box; + + .icon-img { + width: 48px; + height: 48px; + position: relative; + .icon { + position: absolute; + right: -7px; + top: -7px; + font-size: 13px; + } + img { + width: 48px; + height: 48px; + } + } + .desc { + box-sizing: border-box; + padding: 0 12px; + color: #828282; + width: 140px; + .desc-1 { + font-size: 14px; + font-weight: bold; + line-height: 26px; + height: 26px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .desc-2 { + font-size: 12px; + } + } + .right-icon { + padding: 2px 0; + + .icon { + font-size: 21px; + } + } + } + .quick-item:not(:last-child) { + border-right: 1px solid #e0e0e0; + } + .down-all-btn { + position: absolute; + right: 30px; + .el-button { + width: 78px; + font-size: 12px; + font-weight: 600; + padding: 3px 10px; + border: 1px solid #eef0f7; + } + } + } + .main-content { + padding: 35px 82px; + z-index: 99; + .main-title { + line-height: 25px; + font-size: 16px; + font-weight: 600; + margin-bottom: 10px; + } + .tab-btns { + display: flex; + justify-content: space-between; + .group-left { + display: flex; + .tab { + font-size: 14px; + margin-right: 25px; + line-height: 28px; + cursor: pointer; + color: #828282; + } + .tab-active { + border-bottom: 2px solid #23d7ee; + color: #333333; font-weight: bold; } } + + .batch-update { + display: flex; + align-items: center; + .el-button { + padding: 3px 12px; + background-color: #1dd4ec !important; + border-color: #1dd4ec !important; + border-radius: 22px; + } + .el-button--primary:hover { + background: #089fb3 !important; + border-color: #089fb3 !important; + } + } } - .text-right { - padding-right: 30px; - .tip { - color: #999; - line-height: 38px; + .front-page-items { + padding-top: 25px; + .front-page-item { + float: left; + display: flex; + margin: 0 5px; + margin-bottom: 15px; + box-sizing: border-box; + width: 274px; + + justify-content: center; + cursor: pointer; + + padding: 10px 0; + height: 76px; + border-radius: 4px; + + /* &.disabled { + cursor: default; + } */ + + .icon-img { + width: 58px; + height: 58px; + position: relative; + .icon { + position: absolute; + right: -9px; + top: -9px; + font-size: 16px; + } + img { + width: 58px; + height: 58px; + border-radius: 10px; + } + } + .desc { + box-sizing: border-box; + padding: 0 12px; + width: 147px; + + .desc-1 { + font-size: 14px; + font-weight: bold; + color: #4f4f4f; + line-height: 28px; + height: 28px; + letter-spacing: 0.1px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .desc-2 { + color: #828282; + font-size: 12px; + } + } + .right-btn { + padding: 2px 0; + width: 50px; + text-align: center; + position: relative; + .check-btn { + background-color: #ffffff !important; + border-color: #bdbdbd !important; + color: #333333; + } + .update-btn { + border-color: #23d7ee !important; + background-color: rgba(29, 212, 236, 0.1) !important; + color: #4f4f4f; + } + .other-btn { + background-color: #1dd4ec !important; + border-color: #1dd4ec !important; + color: #ffffff; + } + @keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } + } + .anz-font { + font-size: 28px; + color: #333; + } + + .spin-icon { + animation: spin 0.8s linear infinite; + } + .status { + font-size: 12px; + color: #828282; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + min-width: 100px; + text-align: end; + position: absolute; + right: 0; + width: 120px; + margin-top: 2px; + } + .rocket-icon { + font-size: 20px; + } + .el-button { + padding: 3px 12px; + border-radius: 22px; + font-weight: bold; + letter-spacing: 0.5px; + } + } + } + .front-page-item:hover { + background-color: #f2f2f7; + } + .item-dimmed { + color: gray; + filter: grayscale(100%); + } + } + .front-page-items:after { + content: ""; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + .upload-pkg { + .upload-head { + display: flex; + justify-content: space-between; + align-items: center; + .left { + display: flex; + align-items: center; + .iconfont { + font-size: 18px; + margin-right: 6px; + } + .txt { + font-size: 16px; + } + } + .right { + .icon { + margin-right: 11px; + font-size: 17px; + cursor: pointer; + } + } + } + } + .upload-demo { + margin: 30px 0px; + .drag-txt { + width: 340px; + height: 45px; + border: 1px dashed #bdbdbd; + display: flex; + margin-top: 30px; + align-items: center; + justify-content: center; + color: #828282; + font-size: 14px; + } + .txt-btn { + width: 78px; + margin-top: 18px; + height: 19px; + background: #23d7ee; + border-radius: 22px; + color: #ffffff; + font-weight: bold; + font-size: 12px; } } } - .tab-content { - padding: 30px 20px; - } - } - - .right-box { - height: 100%; - padding: 10px 10px; - box-sizing: border-box; - float: left; - .task-manage-table { - height: calc(100% - 30px); - margin-top: 5px; - overflow-x: hidden; - overflow-y: auto; - } - // .task-manage-table::-webkit-scrollbar { - // width: 0 !important ; - // } } .mask { position: absolute; @@ -1596,7 +1534,20 @@ z-index: 1; border-radius: 3px; display: none; - + .info-onmask { + color: #fff; + } + .left-top { + position: absolute; + left: 5px; + top: 5px; + font-size: 12px; + color: #90d6ff; + } + .mask-btn { + width: 100%; + display: flex; + } i { color: #fff; position: relative; @@ -1608,298 +1559,13 @@ } } - .text-css { - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - } - .move-hear { - margin: 10px 0 0 0; - font-size: 5rem; - } - .list-choose-item { - cursor: pointer; - position: relative; - font-size: 14px; - display: inline-block; - @media screen and(min-width: 1640px) { - margin: 30px 20px 20px 20px; - } - @media screen and(min-width: 1460px) and(max-width: 1640px) { - margin: 30px 20px 20px 10px; - } - @media screen and(max-width: 1460px) { - margin: 30px 10px 20px 10px; - } - min-width: 126px; - height: 120px; - transition: all 1s; - background: #fff; - border: 1px solid #e2e2e2; - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - border-radius: 4px; - } - .list-choose-item:hover { - .mask { - display: block; - } - } - - .alg-shadow { - -webkit-box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.3); - box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.3); - } - .select-color { - margin-top: 16px; - text-align: center; - line-height: 28px; - // background-color: #3498DB; - } - .list-choose-item-left { - cursor: pointer; - position: relative; - font-size: 14px; - // display: inline-block; - // @media screen and(min-width: 1895px) { - // //margin: 20px 25px 20px 20px; - // margin: 20px 30px 20px 20px; - // } - // @media screen and(min-width: 1695px) and(max-width:1895px ) { - // margin: 20px 10px 20px 15px; - // } - // @media screen and(min-width: 1460px) and(max-width: 1695px) { - // margin: 20px 25px 20px 20px; - // } - // @media screen and(max-width: 1460px) { - // margin: 20px 15px 20px 10px; - // } - // width: 126px; - // height: 120px; - // width: 220px; - // height: 214px; - transition: all 1s; - background: #ffffff; - border: 1px solid #e2e2e2; - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - border-radius: 4px; - p { - display: none; - text-align: right; - width: 100%; - position: absolute; - right: 10px; - top: 5px; - } - .click-download { - position: absolute; - left: 80%; - top: 5%; - } - } - .list-choose-item-left:hover { - .mask { - display: flex; - align-items: flex-end; - .bot-btn { - flex: 1; - } - } - } - .list-choose-item-left-uninstal { - color: darkgray; - background-color: #ddd; - } - .list-complete-item.sortable-chosen { - background: #4ab7bd; - } - .list-choose-item.sortable-ghost { - background: #30b08f; - } - .width-new-line { - word-wrap: break-word; - word-break: break-all; - } - .dndList-list { - max-width: 40%; - } - .dic-border { - width: 98%; - min-height: 170px; - background: #fff; - padding: 10px 10px 10px 20px; - } - .min-h { - min-height: 130px; - } - .parent-div { - border-right: 1px solid rgba(24, 28, 33, 0.5); - max-width: 140px; - position: relative; - } - .list-choose-header { - position: relative; - width: 74px; - height: 74px; - background-image: linear-gradient(-137deg, #7076f2 0%, #3d63e1 100%); - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - border-radius: 37px; - margin: 10px 25px; - } - - .task-name-div { - font-family: PingFangSC-Medium; - font-size: 15px; - color: #4b68e6; - text-align: center; - margin-top: 6px; - max-width: 120px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .border-dash { - height: 30px; - width: 96%; - margin-bottom: 10px; - border: 1px dashed rgba(24, 28, 33, 0.5); - } - .i-setting { - position: absolute; - font-size: 28px; - margin-top: -25px; - margin-left: -30px; - } - .i-delete { - position: absolute; - font-size: 28px; - margin-top: -25px; - margin-left: -8px; - color: red; - } - .i-bell { - float: left; - position: relative; - left: 10px; - top: 10px; - font-size: 24px; - color: red; - } - .task-msg { - padding-left: 10px; - } - .b-top { - width: 100%; - padding-top: 10px; - } - .b-bottom { - width: 100%; - border-bottom: 1px solid rgba(24, 28, 33, 0.5); - } - .i-set-right { - position: absolute; - left: 80px; - top: -11px; - font-size: 24px; - } - .i-remove-right { - position: absolute; - right: -1px; - top: -11px; - font-size: 24px; - color: red; - } - .alg-t { - line-height: 31px; - font-family: PingFangSC-Medium; - font-size: 14px; - color: #222222; - } - .alg-name { - margin-top: 12px; - line-height: 36px; - font-family: PingFangSC-Regular; - font-size: 15px; - color: #222222; - // background-color: #ecf5ff; - .el-input { - position: relative; - font-size: 14px; - display: inline-block; - width: 100%; - } - } - .task-name { - text-align: center; - margin-top: 16px; - line-height: 28px; - font-family: PingFangSC-Regular; - font-size: 13px; - color: #222222; - text-align: center; - // background-color: #ecf5ff; - } - .unit-class { - margin-left: 10px; - text-align: center; - line-height: 38px; - } .el-input { position: relative; font-size: 14px; - display: inline-block; - width: 80%; + // display: inline-block; + // width: 80%; } - .list-complete-item-handle { - height: 100%; - padding-bottom: 10px; - text-align: center; - .svg-wrap { - width: 80%; - margin: auto; - padding-top: 80%; - position: relative; - svg { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - .baseImg { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } - } - .dragAreaR { - height: 100%; - } - .drag-info { - min-width: 126px; - height: 120px; - border: 1px dashed #3d68e1; - box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); - // box-shadow: 0px 0px 10px 3px rgba(0,0,0,0.3); - border-radius: 4px; - margin: 30px 10px 20px 10px; - } - .drag-info-text { - letter-spacing: 3px; - line-height: 20px; - width: 80px; - height: 42px; - font-family: PingFangSC-Regular; - font-size: 13px; - color: #3d68e1; - text-align: center; - } - .task-edit { - font-size: 26px; - position: relative; - bottom: -6px; - } + .el-button--cancle { background: #eaeaea; border-radius: 2px; @@ -1909,50 +1575,15 @@ color: #222222; margin-right: 12px; } - .click-changeImg { - cursor: pointer; - display: none; - background: rgba(0, 0, 0, 0.35); - width: 74px; - line-height: 20px; - color: rgb(255, 255, 255); - font-size: 14px; - opacity: 1; - border-radius: 6px; - } + } +} - .task-name-google { - position: relative; - top: 30px; - width: 126px; - height: 120px; - border: 1px solid #fff; - background: #fff; - border-radius: 4px; - cursor: pointer; - .set-task { - display: none; - cursor: pointer; - } - - .el-switch__core { - width: 27px !important; - height: 14px; - } - .el-switch__core:after { - width: 10px; - height: 10px; - } - .el-switch.is-checked .el-switch__core::after { - left: 100%; - margin-left: -11px; - } - } - .task-name-google:hover { - .mask { - display: block; - } - } +@media screen and (max-width: 800px) { + .quick-path .left-items .quick-item:last-child { + display: none !important; + } + .quick-path .left-items .quick-item:nth-child(2) { + border: none !important; } } </style> -- Gitblit v1.8.0