From 769275515cf9ed5a31a742b455b0a0690b3f5f99 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 14 十二月 2021 11:41:44 +0800
Subject: [PATCH] 删除ai_c 应用中新修改
---
src/pages/ai/index/App.vue | 132 -----
/dev/null | 12
src/pages/library/components/carList.vue | 905 ++++++++++++++++++++------------------
src/pages/library/index/App.vue | 11
src/pages/library/index/main.ts | 2
src/pages/library/components/baseList.vue | 111 ---
src/pages/library/components/addBase.vue | 2
src/pages/library/components/personList.vue | 152 ++----
public/apps.json | 23 -
9 files changed, 575 insertions(+), 775 deletions(-)
diff --git a/public/apps.json b/public/apps.json
index 0cf49bf..f882d26 100644
--- a/public/apps.json
+++ b/public/apps.json
@@ -71,29 +71,6 @@
"progressMsg": ""
},
{
- "id": "7dea48a4-8294-4914-85d8-c2bbd4caf550",
- "name": "搴旂敤涓績-鏃�",
- "package": "algorithmManage_old",
- "type": "2",
- "url": "/view/ai_c/",
- "title": "搴旂敤涓績-鏃�",
- "width": 1243,
- "height": 750,
- "iconBlob": "",
- "icon": "../../images/app-mid/algorithm-store.png",
- "version": "1.0.0",
- "create_time": "2020-10-09 14:00:02",
- "create_by": "",
- "update_time": "",
- "update_by": "",
- "isDelete": 0,
- "isDefault": true,
- "remoteVersion": "",
- "installed": true,
- "isUpgrade": false,
- "progressMsg": ""
- },
- {
"id": "2224a376-5436-4323-ad65-c26d95efaa54",
"name": "鎽勫儚鏈洪厤缃�",
"package": "cameraAccess",
diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 704b524..0c04f9f 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -169,7 +169,7 @@
class="other-btn"
round
@click="checkDetail(item)"
- v-if="activeName == '搴旂敤涓績'&&item.price>0"
+ v-if="activeName == '搴旂敤涓績' && item.price > 0"
>婵�娲�</el-button
>
<el-button
@@ -178,7 +178,7 @@
class="update-btn"
round
@click.stop="actived(item)"
- v-if="activeName == '搴旂敤涓績'&&item.price==0"
+ v-if="activeName == '搴旂敤涓績' && item.price == 0"
>瀹夎</el-button
>
<el-button
@@ -546,11 +546,6 @@
goback() {
this.inDetail = false;
},
- // isShow(authority) {
- // return (
- // this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
- // );
- // },
batchUpdate(s) {
if (s == "both") {
this.batchUpdateSDK();
@@ -584,7 +579,6 @@
this.tempList = this.installedList;
this.tempDarkList = this.notInstalledList;
break;
-
case "鏇存柊":
this.showQuickPath = false;
this.tempList = this.hasNewVersionSdk;
@@ -620,11 +614,6 @@
this.tempDarkList = [];
}
},
- // closeDial() {
- // this.productDetailVisible = false;
- // this.productDetail = {};
- // this.otherProducts = [];
- // },
checkDetail(item, typ) {
this.inDetail = true;
this.detailProductID = item.id;
@@ -634,55 +623,9 @@
this.detailType = this.activeName == "搴旂敤涓績" ? "inactive" : "active";
}
},
- // checkInWindow(item) {
- // this.backStack.push([this.productDetail, this.otherProducts]);
- // this.backDisable = false;
- // this.checkIsDefOrNot(item.id);
-
- // let _this = this;
- // getAppDetail({ id: item.id }).then((res) => {
- // _this.productDetail = res.data.detail;
- // _this.productDetail.iconBlob = item.iconBlob;
- // this.actId = _this.productDetail.productBaseId;
- // let flag = false;
- // const allNeedToNew = [
- // ...this.hasNewVersionSdk,
- // ...this.hasNewVersionApp,
- // ];
- // for (let i = 0; i < allNeedToNew.length; i++) {
- // const item = allNeedToNew[i];
- // if (item.id == _this.productDetail.productBaseId) {
- // flag = true;
- // }
- // }
- // this.needToUpgradeInWin = flag;
- // _this.productDetail.isUpgrade = flag;
-
- // _this.otherProducts = res.data.randoms;
- // });
- // },
checkIsDefOrNot(id) {
- if (id.length > 10) {
- this.isDefaultApp = false;
- } else {
- this.isDefaultApp = true;
- }
+ this.isDefaultApp = id.length <= 10;
},
- // backwards() {
- // if (this.backStack.length == 0) {
- // this.backDisable = true;
- // return;
- // }
- // this.forwardStack.push([this.productDetail, this.otherProducts]);
- // let item = this.backStack.pop();
- // this.productDetail = item[0];
- // this.checkIsDefOrNot(this.productDetail.productBaseId);
- // this.otherProducts = item[1];
- // this.forwardDisable = false;
- // if (this.backStack.length == 0) {
- // this.backDisable = true;
- // }
- // },
forwards() {
if (this.forwardStack.length == 0) {
this.forwardDisable = true;
@@ -804,18 +747,6 @@
})
.catch((e) => {});
},
- // toActivatePage(item) {
- // this.checkDetail(item, "inactive");
- // this.actType = this.activeTab;
- // this.actId = item.id;
- // this.actStep = 0;
- // this.activeCode = "";
- // this.activedSdkOrApp = this.newActInfo();
- // },
- // cancelActivate() {
- // this.showInputCode = false;
- // this.activeCode = "";
- // },
newActInfo() {
return {
activateCode: "",
@@ -853,7 +784,7 @@
getUnActivedApp().then((res) => {
if (res.code == 200) {
this.unActivedAppList = res.data;
- this.pickTab()
+ this.pickTab();
}
});
},
@@ -896,10 +827,6 @@
});
}
},
- // checkMyAlgorith() {
- // this.showActivateSuccess = false;
- // this.activeName = "宸叉縺娲�";
- // },
onFileUpload(file) {
this.patchFile = { ...file };
this.fileAdded = true;
@@ -917,6 +844,7 @@
version: res.data.apps[0].version,
productName: res.data.productName,
installContent: res.data.apps[0].installContent,
+
};
}
if (res.data.sdks.length > 0) {
@@ -935,12 +863,6 @@
this.$message.error(e.msg);
});
},
- // openApp() {
- // window.parent.postMessage(
- // { msg: "toOpenApp?" + this.productDetail.productBaseId },
- // "*"
- // );
- // },
onFileAdded(f) {
this.patchUpdateStatus = "";
},
@@ -975,26 +897,8 @@
this.notInstalledList = unInstalledList;
this.toUpdateArr1 = this.installedList.slice(0, 10);
this.hasNewVersionSdk = hasNewVersionList;
- this.pickTab()
+ this.pickTab();
},
- // unloadSDKinWin() {
- // let appToUnload;
- // let sdkToUnload;
- // if (this.productDetail.productTypeName == "搴旂敤") {
- // appToUnload = this.installedApps.find((item) => {
- // return item.id == this.productDetail.productBaseId;
- // });
- // this.unloadApp(appToUnload);
- // } else {
- // sdkToUnload = this.installedList.find((item) => {
- // return item.id == this.productDetail.productBaseId;
- // });
- // this.unloadSdk(sdkToUnload);
- // }
- // },
- // unLoadSdkOrApp(item) {
- // this.activeTab == "sdk" ? this.unloadSdk(item) : this.unloadApp(item);
- // },
unloadSdk(sdk) {
let _this = this;
this.$confirm("纭畾瑕佸嵏杞借绠楁硶鍚�?", "鎻愮ず")
@@ -1016,7 +920,6 @@
})
.catch((e) => {});
},
-
donwloadSDK(item) {
let timer = null;
item.upgradeLoading = true;
@@ -1029,7 +932,7 @@
clearInterval(timer);
item.upgradeLoading = false;
this.downloadItem = "";
-
+
window.parent.postMessage({ msg: "AppUpdate" }, "*");
})
.catch((err) => {
@@ -1041,19 +944,18 @@
this.sdkUpgreading = true;
},
autoRefreshAppAndSdkState() {
- // 鍏抽棴鍚庨��鍑�
+ this.getAllApps();
+ this.getAllSdk();
if (!this.autoRefresh) {
return;
}
- if (this.appUpgreading) {
- this.getAllApps();
- }
- if (this.sdkUpgreading) {
- this.getAllSdk();
- }
- let _this = this;
setTimeout(() => {
- _this.autoRefreshAppAndSdkState();
+ if (this.appUpgreading) {
+ this.getAllApps();
+ }
+ if (this.sdkUpgreading) {
+ this.getAllSdk();
+ }
}, 1000);
},
},
@@ -1461,8 +1363,8 @@
text-align: center;
position: relative;
.check-btn {
- background-color:#FFFFFF !important;
- border-color: #BDBDBD !important;
+ background-color: #ffffff !important;
+ border-color: #bdbdbd !important;
color: #333333;
}
.update-btn {
diff --git a/src/pages/ai_c/index/App.vue b/src/pages/ai_c/index/App.vue
deleted file mode 100644
index e0a36c1..0000000
--- a/src/pages/ai_c/index/App.vue
+++ /dev/null
@@ -1,2775 +0,0 @@
-<template>
- <div class="s-task-manage">
- <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">
- <div class="left-box">
- <el-tabs
- v-model="activeName"
- type="border-card"
- 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 installedList"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div
- class="svg-wrap"
- :class="{ willUpGrade: item.isUpgrade }"
- v-loading="item.upgradeLoading"
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <img
- class="update-icon"
- v-if="item.isUpgrade"
- src="../../../assets/img/鏇存柊鎻愮ず.png"
- alt=""
- />
- <div
- class="mask"
- v-if="!item.isDefault || item.isUpgrade"
- >
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'active')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="unLoadSdk(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >鍗歌浇</el-button
- >
- <el-button
- v-if="item.isUpgrade"
- @click="donwload(item, 0)"
- type="warning"
- size="small"
- class="bot-btn"
- >鍗囩骇</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" 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>
- <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">
- <div class="left-top">
- <div v-if="item.installed">
- 褰撳墠鐗堟湰:{{ item.version }}
- </div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'activeNotInstall')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="donwload(item, 1)"
- type="primary"
- class="bot-btn"
- >瀹夎</el-button
- >
- </div>
- </div>
- <div class="click-download" title="涓嬭浇">
- <span class="iconfont iconxiazai1"></span>
- </div>
- <div class="list-complete-item-handle">
- <div
- class="svg-wrap"
- v-loading="
- item.installLoading || item.upgradeLoading
- "
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" 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="flex-list">
- <div
- class="wrap-box"
- v-for="item in installedApps"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div
- class="svg-wrap"
- :class="{ willUpGrade: item.isUpgrade }"
- v-loading="
- item.unloadLoading || item.upgradeLoading
- "
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <img
- class="update-icon"
- v-if="item.isUpgrade"
- src="../../../assets/img/鏇存柊鎻愮ず.png"
- alt=""
- />
-
- <div class="mask">
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'active')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- v-show="!item.isDefault"
- @click="unLoad(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >鍗歌浇</el-button
- >
- <el-button
- v-if="item.isUpgrade"
- @click="downloadApp(item, 'upgrade')"
- type="warning"
- size="small"
- class="bot-btn"
- >鍗囩骇</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" alt />
- </div>
- <div class="alg-name" style="color: grey">
- <div style="padding: 0px 10px 0px 10px">
- <span v-if="!item.isEdit">{{ item.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>
- <div
- class="wrap-box"
- v-for="item in storeApps"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle uninstall">
- <div
- class="svg-wrap"
- v-loading="
- item.installLoading || item.upgradeLoading
- "
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <div class="mask">
- <div class="left-top">
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'activeNotInstall')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="downloadApp(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >瀹夎</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" alt />
- </div>
- <div class="alg-name">
- <div style="padding: 0px 10px 0px 10px">
- <span v-if="!item.isEdit">{{ item.name }}</span>
- <el-input
- size="small"
- v-model="item.name"
- v-if="item.isEdit"
- v-focus
- :maxlength="15"
- @blur="inputBlur(item)"
- ></el-input>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-tab-pane>
-
- <el-tab-pane
- label="绂荤嚎鍗囩骇/瀹夎"
- name="upgradeOrInstallation"
- v-if="isShow('algorithmManage:insOffLine')"
- >
- <div class="tab-content">
- <div class="action-bar">
- <FileUploader
- single
- tip
- tipWords="涓婁紶绠楁硶"
- uploadPlaceholder="涓婁紶瀹夎杞欢"
- url="/data/api-v/sdk/upload"
- @complete="onFileUpload"
- @file-added="onFileAdded"
- />
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- label="搴旂敤涓績"
- name="algorithmMall"
- v-if="isShow('algorithmManage:buy')"
- >
- <div class="tab-content">
- <div class="flex-title">
- <p class="src-title">绠楁硶杞欢</p>
- </div>
- <div class="store-list flex-list">
- <div v-if="!unActivedSDKList.length" class="empty-tip">
- 鏆傛棤鏁版嵁
- </div>
-
- <div
- class="wrap-box"
- v-for="item in unActivedSDKList"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div class="alg-icon svg-wrap">
- <div
- class="mask"
- v-if="!item.isDefault || item.isUpgrade"
- >
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="actSdkOrApp(item)"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="actSdkOrApp(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >婵�娲�</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" 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>
- </div>
- <p class="src-title">搴旂敤杞欢</p>
- <div class="app-list flex-list">
- <div v-if="!unActivedAppList.length" class="empty-tip">
- 鏆傛棤鏁版嵁
- </div>
- <div
- class="wrap-box"
- v-for="item in unActivedAppList"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div class="alg-icon svg-wrap">
- <div
- class="mask"
- v-if="!item.isDefault || item.isUpgrade"
- >
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="actSdkOrApp(item, 'app')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="actSdkOrApp(item, 'app')"
- type="primary"
- size="small"
- class="bot-btn"
- >婵�娲�</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" alt />
- </div>
- <div class="alg-name">
- <div style="padding: 0px 10px 0px 10px">
- <span v-if="!item.isEdit">{{ item.name }}</span>
- <el-input
- size="small"
- v-model="item.name"
- v-if="item.isEdit"
- v-focus
- :maxlength="15"
- @blur="inputBlur(item)"
- ></el-input>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane name="update" label="鏇存柊">
- <span slot="label">
- <el-badge
- class="update-badge"
- :value="updateNum"
- :hidden="updateNum == 0"
- >鏇存柊</el-badge
- >
- </span>
- <div class="task-list">
- <div class="flex-title">
- <p class="src-title">绠楁硶杞欢</p>
- <el-button
- @click="batchUpdate('sdk')"
- v-if="hasNewVersionSdk.length != 0"
- size="mini"
- type="primary"
- >鏇存柊鍏ㄩ儴</el-button
- >
- </div>
- <div class="flex-list">
- <div v-if="hasNewVersionSdk.length == 0" class="empty-tip">
- 鏆傛棤鏁版嵁
- </div>
- <div
- class="wrap-box"
- v-for="item in hasNewVersionSdk"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div
- class="svg-wrap"
- :class="{ willUpGrade: item.isUpgrade }"
- v-loading="item.upgradeLoading"
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <img
- class="update-icon"
- v-if="item.isUpgrade"
- src="../../../assets/img/鏇存柊鎻愮ず.png"
- alt=""
- />
-
- <div
- class="mask"
- v-if="!item.isDefault || item.isUpgrade"
- >
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'active')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- @click="unLoadSdk(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >鍗歌浇</el-button
- >
- <el-button
- v-if="item.isUpgrade"
- @click="donwload(item, 0)"
- type="warning"
- size="small"
- class="bot-btn"
- >鍗囩骇</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" alt />
- </div>
- <div class="alg-name">
- <div style="padding: 0px 10px 0px 10px">
- <span v-if="!item.isEdit">
- {{ item.sdk_name }}
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="flex-title">
- <p class="src-title">搴旂敤杞欢</p>
- <el-button
- @click="batchUpdate('app')"
- v-if="hasNewVersionApp.length"
- type="primary"
- size="mini"
- >鏇存柊鍏ㄩ儴</el-button
- >
- </div>
- <div class="flex-list">
- <div v-if="!hasNewVersionApp.length" class="empty-tip">
- 鏆傛棤鏁版嵁
- </div>
- <div
- class="wrap-box"
- v-for="item in hasNewVersionApp"
- :key="item.id"
- >
- <div class="list-choose-item-left">
- <div class="list-complete-item-handle">
- <div
- class="svg-wrap"
- :class="{ willUpGrade: item.isUpgrade }"
- v-loading="
- item.unloadLoading || item.upgradeLoading
- "
- :element-loading-text="item.progressMsg"
- element-loading-background="rgba(0,0,0,.8)"
- >
- <img
- class="update-icon"
- v-if="item.isUpgrade"
- src="../../../assets/img/鏇存柊鎻愮ず.png"
- alt=""
- />
-
- <div class="mask">
- <div class="left-top">
- <div>褰撳墠鐗堟湰:{{ item.version }}</div>
- <div v-if="item.remoteVersion">
- 鏈�鏂扮増鏈�:{{ item.remoteVersion }}
- </div>
- </div>
- <div
- class="info-onmask"
- @click="checkDetail(item, 'active')"
- >
- 鏌ョ湅璇︽儏
- </div>
- <div class="mask-btn">
- <el-button
- v-if="!item.isDefault"
- @click="unLoad(item)"
- type="primary"
- size="small"
- class="bot-btn"
- >鍗歌浇</el-button
- >
- <el-button
- v-if="item.isUpgrade"
- @click="downloadApp(item, 'upgrade')"
- type="warning"
- size="small"
- class="bot-btn"
- >鍗囩骇</el-button
- >
- </div>
- </div>
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <img v-else class="baseImg" :src="item.icon" alt />
- </div>
- <div class="alg-name">
- <div style="padding: 0px 10px 0px 10px">
- <span v-if="!item.isEdit">{{ item.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>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </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>
- <el-dialog
- class="product-detail-dialog"
- :visible="productDetailVisible"
- @close="closeDial"
- >
- <div class="button-group" v-show="!backDisable || !forwardDisable">
- <el-button size="small" @click="backwards" :disabled="backDisable">
- <span><</span>
- </el-button>
- <el-button size="small" @click="forwards" :disabled="forwardDisable"
- >></el-button
- >
- </div>
- <div class="dialog-title" slot="title">
- {{ isSDKDialog ? "绠楁硶璇︽儏" : "搴旂敤璇︽儏" }}
- </div>
- <div class="dialog-content">
- <div class="box-top">
- <div class="top-left">
- <div class="banner">
- <el-carousel
- ref="carousel"
- :autoplay="false"
- indicator-position="none"
- :arrow="
- productDetail.pics !== undefined
- ? productDetail.pics.length > 1
- ? 'always'
- : 'never'
- : 'never'
- "
- @change="changeHandle"
- >
- <el-carousel-item
- v-for="(item, index) in productDetail.pics"
- :key="index"
- >
- <div class="imgwrap">
- <img
- v-if="item.type != 'video'"
- :src="'/httpImage/' + item.url"
- class="cursor-pointer"
- preview
- />
- <video
- v-if="item.type == 'video'"
- :src="'/httpImage/' + item.url"
- controls
- ></video>
- </div>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- <div class="top-right">
- <div class="summary">
- <div class="icon">
- <img
- v-if="productDetail.iconBlob"
- class="baseImg"
- :src="
- productDetail.iconBlob.indexOf(',') > 0
- ? productDetail.iconBlob
- : `data:image/png;base64,${productDetail.iconBlob}`
- "
- alt
- />
- </div>
- <div class="right-desc">
- <div class="name">
- <el-tooltip
- class
- effect="dark"
- :content="productDetail.productName"
- placement="right-start"
- >
- <span>{{ productDetail.productName }}</span>
- </el-tooltip>
- </div>
- <div class="tags">
- <el-tag
- type="info"
- size="small"
- color="#fff"
- v-if="!isSDKDialog"
- >搴旂敤</el-tag
- >
- <el-tag
- type="info"
- size="small"
- color="#fff"
- v-if="isSDKDialog"
- >绠楁硶</el-tag
- >
- </div>
- <div class="btns">
- <el-button
- size="small"
- type="warning"
- v-if="needToUpgradeInWin || productDetail.isUpgrade"
- @click="upgradeSDKinWin"
- >
- {{ isUpgrading ? "鍗囩骇涓�.." : "鍗囩骇" }}
- </el-button>
- <el-button
- size="small"
- type="primary"
- v-if="isActive && !isDefaultApp"
- @click="unloadSDKinWin"
- >鍗歌浇</el-button
- >
- <el-button
- size="small"
- type="primary"
- v-if="!isActive && !showInstallNotActive"
- @click="showInputCode = !showInputCode"
- >婵�娲�</el-button
- >
- <el-button
- size="small"
- type="primary"
- v-if="!isActive && showInstallNotActive"
- @click="downloadSdkInSide"
- >{{ isUpgrading ? "瀹夎涓�.." : "瀹夎" }}</el-button
- >
- <el-button
- size="small"
- type="success"
- v-if="!isSDKDialog && isActive"
- @click="openApp"
- >鎵撳紑</el-button
- >
- </div>
- </div>
- </div>
- <div class="jihuo-input" v-if="showInputCode">
- <el-input
- size="small"
- v-model="activeCode"
- placeholder="00000-00000-00000-00000-00000"
- ></el-input>
- <el-button type="primary" size="small" @click="actived"
- >婵�娲�</el-button
- >
- <el-button type="primary" size="small" @click="cancelActivate"
- >鍙栨秷</el-button
- >
- </div>
- <div class="product-intruduction">
- <div class="part-title" v-if="!showInputCode">绠�浠�</div>
- <div class="text">
- <div class="single-desc">
- <div>鐗堟湰锛�</div>
- <div>
- {{
- productDetail.productVersion === ""
- ? "鏆傛棤"
- : productDetail.productVersion
- }}
- </div>
- </div>
- <div class="single-desc">
- <div>姒傝堪锛�</div>
- <div>
- {{
- productDetail.description === ""
- ? "鏆傛棤"
- : productDetail.description
- }}
- </div>
- </div>
- <div class="single-desc">
- <div>璇﹁堪锛�</div>
- <div>
- {{
- productDetail.summary === ""
- ? "鏆傛棤"
- : productDetail.summary
- }}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="box-bottom">
- <div class="bot-left">
- <div class="part-title">
- {{ isSDKDialog ? "搴旂敤鍦烘櫙" : "鍔熻兘鐗圭偣" }}
- </div>
- <div class="list-zone">
- <div
- class="list-item"
- v-for="(item, index) in productDetail.funcInfo"
- :key="index"
- >
- <el-tag type size="small" effect="dark">{{
- item.title === "" ? "鏆傛棤鏁版嵁" : item.title
- }}</el-tag>
- <div class="desc">
- {{ item.desc === "" ? "鏆傛棤鏁版嵁" : item.desc }}
- </div>
- </div>
- </div>
- </div>
- <div class="bot-right">
- <div class="part-title">鎺ㄨ崘绠楁硶</div>
- <div class="item-zone">
- <div
- class="item"
- v-for="(item, index) in otherProducts"
- :key="index"
- >
- <el-tag type="info" color="inherit" size="small">
- {{
- item.productTypeName === ""
- ? "鏆傛棤鏁版嵁"
- : item.productTypeName
- }}
- </el-tag>
- <div class="icon">
- <img
- v-if="item.iconBlob"
- class="baseImg"
- :src="
- item.iconBlob.indexOf(',') > 0
- ? item.iconBlob
- : `data:image/png;base64,${item.iconBlob}`
- "
- alt
- />
- <div class="icon-name">
- <el-tooltip
- class
- effect="dark"
- :content="item.name === '' ? '鏆傛棤鏁版嵁' : item.name"
- placement="top-start"
- >
- <span>{{
- item.name === "" ? "鏆傛棤鏁版嵁" : item.name
- }}</span>
- </el-tooltip>
- </div>
- </div>
- <div class="look-button">
- <el-button
- type="primary"
- size="mini"
- @click="checkInWindow(item)"
- >鏌ョ湅</el-button
- >
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-dialog>
- <el-dialog
- :visible.sync="showActivateSuccess"
- title="婵�娲绘垚鍔燂紒"
- width="30%"
- class="active-Dial"
- :before-close="handleClose"
- >
- <div class="dialog-active">
- <ul class="desc">
- <li>
- <label>婵�娲荤爜:</label>
- <span>{{ activedSdkOrApp.activateCode }}</span>
- </li>
- <li>
- <label>浜у搧鍚嶇О:</label>
- <span>{{ activedSdkOrApp.productName }}</span>
- </li>
- <li>
- <label>閰嶇疆璇︽儏:</label>
- <span>{{ activedSdkOrApp.setting }}</span>
- </li>
- <li>
- <label>鏈嶅姟鍒版湡鏃�:</label>
- <span>{{ activedSdkOrApp.expireTime }}</span>
- </li>
- <li>
- <label>璁稿彲璇�:</label>
- <span>{{ activedSdkOrApp.licence }}</span>
- </li>
- </ul>
- <div class="text-right">
- <el-button type="primary" @click="checkMyAlgorith">纭畾</el-button>
- <p class="tip">鎻愮ず锛氳鍦ㄢ�滃凡婵�娲烩�濅腑鏌ョ湅骞跺畨瑁呯畻娉�</p>
- </div>
- </div>
- </el-dialog>
- </div>
-</template>
-<script>
-import {
- findAllSdk,
- downloadSdk,
- installSdk,
- getInstallInfo,
- removeSdk,
-} from "./api";
-import {
- getApps,
- installApp,
- getAppDetail,
- removeApp,
- getUnActivedSdk,
- actPageAlg,
- getUnActivedApp,
- actApp,
-} from "@/api/app";
-import { getUrlKey } from "@/api/utils";
-import FileUploader from "@/components/subComponents/FileUpload/index";
-export default {
- name: "algorithmManage_old",
- components: {
- FileUploader,
- },
- computed: {
- updateNum() {
- return this.hasNewVersionApp.length + this.hasNewVersionSdk.length;
- },
- isAdmin() {
- if (
- sessionStorage.getItem("userInfo") &&
- sessionStorage.getItem("userInfo") !== ""
- ) {
- let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
- return loginName === "superadmin" || loginName === "basic";
- }
-
- return false;
- },
- },
- data() {
- return {
- installedList: [],
- hasNewVersionSdk: [],
- hasNewVersionApp: [],
- notInstalledList: [],
- buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
- activeName: "myAlgorithm",
- patchUpdateStatus: "",
- downloadItem: "",
- downloading: false,
- actStep: 0,
- showActivateSuccess: false,
- activeCode: "",
- isInstall: false,
- installDialogVisible: false,
- installAppPackage: null,
- installSdkPackage: null,
- isActive: true,
- isDefaultApp: false,
- unActivedSDKList: [],
- unActivedAppList: [],
- isSDKDialog: true,
- actType: "",
- actId: "",
- activedSdkOrApp: {
- activateCode: "",
- productName: "",
- setting: "",
- expireTime: "",
- licence: "",
- devIds: "",
- },
- installedApps: [],
- storeApps: [],
- installFile: {},
- appUpgreading: true,
- sdkUpgreading: true,
- autoRefresh: true,
- productDetailVisible: false,
- isUpgrading: false,
- productDetail: {},
- otherProducts: [],
- backStack: [],
- forwardStack: [],
- backDisable: true,
- forwardDisable: true,
- showInputCode: false,
- needToUpgradeInWin: false,
- showInstallNotActive: false,
- };
- },
- directives: {
- focus: {
- inserted: function (el) {
- el.querySelector("input").focus();
- },
- },
- },
- mounted() {
- const name = getUrlKey("activeName");
- if (name) {
- this.activeName = name;
- }
- this.autoRefreshAppAndSdkState();
- this.getUnActivedList();
- this.getUnActivedAppList();
- },
- beforeDestroy() {
- this.autoRefresh = false;
- },
- methods: {
- isShow(authority) {
- return (
- this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
- );
- },
- batchUpdate(type) {
- if (type == "sdk") {
- this.hasNewVersionSdk.forEach((sdk) => {
- this.donwload(sdk, 0);
- });
- } else {
- this.hasNewVersionApp.forEach((app) => {
- this.downloadApp(app, "upgrade");
- });
- }
- },
- closeDial() {
- this.productDetailVisible = false;
- this.productDetail = {};
- this.otherProducts = [];
- },
- checkDetail(item, type) {
- if (type == "inactive") {
- this.isActive = false;
- this.showInstallNotActive = false;
- this.showInputCode = false;
- } else if (type == "active") {
- this.showInputCode = false;
- this.showInstallNotActive = false;
- this.isActive = true;
- } else if (type == "activeNotInstall") {
- debugger;
- this.showInputCode = false;
- this.isActive = false;
- this.showInstallNotActive = true;
- }
- this.checkIsDefOrNot(item.id);
- this.needToUpgradeInWin = item.isUpgrade ? true : false;
- this.resetStack();
- if (item.sdk_type === undefined) {
- this.isSDKDialog = false;
- } else {
- this.isSDKDialog = true;
- }
- this.productDetailVisible = true;
- let _this = this;
- getAppDetail({ id: item.id }).then((res) => {
- _this.productDetail = res.data.detail;
- _this.productDetail.isUpgrade = item.isUpgrade;
- _this.productDetail.iconBlob = item.iconBlob;
-
- _this.otherProducts = res.data.randoms;
- });
- },
- resetStack() {
- this.forwardStack = [];
- this.backStack = [];
- this.backDisable = true;
- this.forwardDisable = true;
- },
- checkInWindow(item) {
- this.backStack.push([this.productDetail, this.otherProducts]);
- this.backDisable = false;
- this.checkIsDefOrNot(item.id);
-
- let _this = this;
- getAppDetail({ id: item.id }).then((res) => {
- _this.productDetail = res.data.detail;
- _this.productDetail.iconBlob = item.iconBlob;
- this.actId = _this.productDetail.productBaseId;
- let flag = false;
- const allNeedToNew = [
- ...this.hasNewVersionSdk,
- ...this.hasNewVersionApp,
- ];
- for (let i = 0; i < allNeedToNew.length; i++) {
- const item = allNeedToNew[i];
- if (item.id == _this.productDetail.productBaseId) {
- flag = true;
- }
- }
- this.needToUpgradeInWin = flag;
- _this.productDetail.isUpgrade = flag;
-
- _this.otherProducts = res.data.randoms;
- });
- },
- checkIsDefOrNot(id) {
- if (id.length > 10) {
- this.isDefaultApp = false;
- } else {
- this.isDefaultApp = true;
- }
- },
- backwards() {
- if (this.backStack.length == 0) {
- this.backDisable = true;
- return;
- }
- this.forwardStack.push([this.productDetail, this.otherProducts]);
- let item = this.backStack.pop();
- this.productDetail = item[0];
- this.checkIsDefOrNot(this.productDetail.productBaseId);
- this.otherProducts = item[1];
- this.forwardDisable = false;
- if (this.backStack.length == 0) {
- this.backDisable = true;
- }
- },
- 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({
- type: "success",
- message: "瀹夎鎴愬姛,灏嗚烦杞嚦鈥滃凡婵�娲烩�濅腑鏌ョ湅",
- });
- setTimeout(() => {
- this.getAllSdk();
- window.parent.postMessage(
- {
- msg: "AppUpdate",
- },
- "*"
- );
- this.activeName = "myAlgorithm";
- }, 3000);
- }
- })
- .catch((e) => {
- this.isInstall = false;
- this.$message({
- type: "error",
- message: e.data,
- });
- });
- },
- downloadApp(app, action) {
- if (action == "upgrade") {
- app.upgradeLoading = true;
- } else {
- app.installLoading = true;
- }
- let _this = this;
-
- installApp({ path: app.id })
- .then((res) => {
- if (res && res.success) {
- _this.$notify({
- title: "鎴愬姛",
- message: "瀹夎搴旂敤鎴愬姛",
- type: "success",
- });
- setTimeout(() => {
- if (action == "upgrade") {
- app.upgradeLoading = false;
- } else {
- app.installLoading = false;
- }
- window.parent.postMessage(
- {
- msg: "AppUpdate",
- },
- "*"
- );
- }, 3000);
- } else {
- }
- })
- .catch((e) => {
- _this.$notify({
- title: "瀹夎澶辫触",
- message: e.data,
- type: "warning",
- });
- if (action == "upgrade") {
- app.upgradeLoading = false;
- } else {
- app.installLoading = false;
- }
- });
-
- // 寮�鍚嚜鍔ㄥ埛鏂�
- this.appUpgreading = true;
- },
- async getAllApps() {
- let iArry = [];
- let sArry = [];
- let nArry = [];
- let rsp = await getApps();
- 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.upgradeLoading = true;
-
- this.appUpgreading = true;
- }
-
- if (obj.upgradeDone) {
- this.$notify({
- type: "success",
- message: 1 ? "绠楁硶瀹夎鎴愬姛" : "绠楁硶鍗囩骇鎴愬姛",
- });
- }
-
- item.installed ? iArry.push(obj) : sArry.push(obj);
- item.isUpgrade && nArry.push(obj);
- });
- }
- this.installedApps = iArry;
- this.storeApps = sArry;
- this.hasNewVersionApp = nArry;
- },
- unLoad(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({
- title: "鎴愬姛",
- message: "鍗歌浇搴旂敤鎴愬姛",
- type: "success",
- });
- }
- })
- .catch((e) => {
- app.unloadLoading = false;
- });
- })
- .catch((e) => {});
- },
-
- actSdkOrApp(item, type = "sdk") {
- this.checkDetail(item, "inactive");
- this.actType = type;
- this.actId = item.id;
- this.actStep = 0;
- this.activeCode = "";
- this.activedSdkOrApp = this.newActInfo();
- },
- cancelActivate() {
- this.showInputCode = false;
- this.activeCode = "";
- },
- newActInfo() {
- return {
- activateCode: "",
- productName: "",
- setting: "",
- expireTime: "",
- licence: "",
- devIds: "",
- };
- },
- getUnActivedList() {
- getUnActivedSdk().then((res) => {
- if (res.code == 200) {
- this.unActivedSDKList = res.data;
- }
- });
- },
- getUnActivedAppList() {
- getUnActivedApp().then((res) => {
- if (res.code == 200) {
- this.unActivedAppList = res.data;
- }
- });
- },
- actived() {
- let _this = this;
- if (this.activeCode.trim() == "") {
- this.$notify({
- type: "error",
- message: "婵�娲荤爜涓嶈兘涓虹┖",
- });
- return;
- }
- if (this.actType == "sdk") {
- //婵�娲荤畻娉�
- actPageAlg(this.actId, this.activeCode)
- .then((res) => {
- if (res.data.isSuccess) {
- this.productDetailVisible = false;
- _this.activedSdkOrApp = res.data.successMsg;
- this.showActivateSuccess = true;
- _this.actStep++;
- _this.getUnActivedList();
- _this.getAllSdk();
- } else {
- _this.$notify({
- type: "error",
- message: res.data.failMsg.failMsg,
- });
- }
- })
- .catch((e) => {
- console.log(e);
- });
- } else if (this.actType == "app") {
- //婵�娲诲簲鐢�
- actApp(this.actId, this.activeCode)
- .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({
- type: "error",
- message: res.data.failMsg.failMsg,
- });
- }
- })
- .catch((e) => {
- console.log(e);
- });
- }
- },
- checkMyAlgorith() {
- this.showActivateSuccess = false;
- this.activeName = "myAlgorithm";
- },
- onFileUpload(file) {
- this.patchFile = { ...file };
- this.fileAdded = true;
- const h = this.$createElement;
- //涓婁紶瀹屾垚鑾峰彇瀹夎淇℃伅
- let _this = this;
- getInstallInfo(file)
- .then((res) => {
- _this.installFile = file;
- if (res.success) {
- _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({
- type: "error",
- message: res.msg,
- });
- }
- })
- .catch((e) => {
- this.$message({
- type: "error",
- message: e.msg,
- });
- });
- },
- openApp() {
- let message = "toOpenApp?" + this.productDetail.productBaseId;
- window.parent.postMessage(
- {
- msg: message,
- },
- "*"
- );
- },
- onFileAdded(f) {
- this.patchUpdateStatus = "";
- },
- async getAllSdk() {
- let installedList = [];
- let unInstalledList = [];
- let hasNewVersionList = [];
- let res = await findAllSdk();
- 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.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.hasNewVersionSdk = hasNewVersionList;
- },
- unloadSDKinWin() {
- let appToUnload;
- let sdkToUnload;
- if (this.productDetail.productTypeName == "搴旂敤") {
- appToUnload = this.installedApps.find((item) => {
- return item.id == this.productDetail.productBaseId;
- });
- this.unLoad(appToUnload);
- } else {
- sdkToUnload = this.installedList.find((item) => {
- return item.id == this.productDetail.productBaseId;
- });
- this.unLoadSdk(sdkToUnload);
- }
- },
- //鍗歌浇绠楁硶
- 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({
- title: "鎴愬姛",
- message: "鍗歌浇瀹屾垚",
- type: "success",
- });
- _this.getAllSdk();
- window.parent.postMessage(
- {
- msg: "AppUpdate",
- },
- "*"
- );
- }
- })
- .catch((e) => {
- sdk.unloadLoading = false;
- });
- })
- .catch((e) => {});
- },
- upgradeSDKinWin() {
- this.isUpgrading = !this.isUpgrading;
- let _this = this;
- if (this.productDetail.productTypeName == "搴旂敤") {
- debugger;
- installApp({ path: this.productDetail.productBaseId })
- .then((res) => {
- if (res && res.success) {
- this.$notify({
- title: "鎴愬姛",
- message: "鍗囩骇瀹屾垚",
- type: "success",
- });
- this.needToUpgradeInWin = false;
- this.productDetail.isUpgrade = false;
- this.isUpgrading = !this.isUpgrading;
- }
- })
- .catch((e) => {
- _this.$notify({
- title: "鍗囩骇澶辫触",
- message: e.data,
- type: "warning",
- });
- this.isUpgrading = !this.isUpgrading;
- });
-
- // 寮�鍚嚜鍔ㄥ埛鏂�
- this.appUpgreading = true;
- } else {
- debugger;
- downloadSdk({ path: this.productDetail.productBaseId })
- .then((res) => {
- this.needToUpgradeInWin = false;
- this.productDetail.isUpgrade = false;
- this.isUpgrading = !this.isUpgrading;
- this.$notify({
- title: "鎴愬姛",
- message: "鍗囩骇瀹屾垚",
- type: "success",
- });
- })
- .catch((err) => {
- this.$notify({
- title: "鍗囩骇澶辫触",
- message: err.data,
- type: "warning",
- });
- this.isUpgrading = !this.isUpgrading;
- });
- this.sdkUpgreading = true;
- }
- },
- downloadSdkInSide() {
- this.downloadItem = this.productDetail.productBaseId;
- this.isUpgrading = true;
- downloadSdk({ path: this.productDetail.productBaseId })
- .then((rsp) => {
- this.productDetailVisible = false;
- this.downloadItem = "";
- this.$notify({
- type: "success",
- message: "绠楁硶宸插畨瑁�",
- });
- this.isUpgrading = false;
- })
- .catch((err) => {
- this.$notify({
- type: "warning",
- message: err.data,
- });
- this.downloadItem = "";
- this.isUpgrading = false;
- });
- // 寮�鍚嚜鍔ㄥ埛鏂�
- this.sdkUpgreading = true;
- },
- donwload(item, typ) {
- item.upgradeLoading = true;
- this.downloadItem = item.id;
- downloadSdk({ path: item.id })
- .then((rsp) => {
- item.upgradeLoading = false;
- this.downloadItem = "";
- window.parent.postMessage(
- {
- msg: "AppUpdate",
- },
- "*"
- );
- })
- .catch((err) => {
- this.$notify({
- type: "warning",
- message: err.data,
- });
- item.upgradeLoading = false;
- this.downloadItem = "";
- });
- // 寮�鍚嚜鍔ㄥ埛鏂�
- this.sdkUpgreading = true;
- },
- inputBlur(item) {
- this.$set(item, "isEdit", false);
- },
- autoRefreshAppAndSdkState() {
- // 鍏抽棴鍚庨��鍑�
- if (!this.autoRefresh) {
- return;
- }
- if (this.appUpgreading) {
- this.getAllApps();
- }
- if (this.sdkUpgreading) {
- this.getAllSdk();
- }
- let _this = this;
- setTimeout(() => {
- _this.autoRefreshAppAndSdkState();
- }, 500);
- },
- },
-};
-</script>
-<style lang="scss">
-.s-task-manage {
- width: 100% !important;
- height: 100%;
- box-sizing: border-box;
- text-align: left;
- min-width: 1106px;
-background-color: #fff;
- .el-tabs {
- height: calc(100% - 50px);
- }
- .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%;
- }
- .product-detail-dialog {
- .dialog-title {
- font-size: 13px;
- }
- .el-dialog {
- width: 50%;
- min-width: 920px;
- position: relative;
- }
- .el-dialog__header {
- text-align: center;
- padding: 6px;
-
- .el-dialog__headerbtn {
- position: absolute;
- top: 5px;
-
- right: 20px;
- padding: 0;
- background: transparent;
- outline: none;
- cursor: pointer;
- font-size: 20px;
- }
- }
- .el-dialog__body {
- background-color: rgba(222, 225, 230, 1);
- padding: 8px 3px;
- .button-group {
- position: absolute;
- top: 3px;
-
- left: 6px;
- left: 10px;
- .el-button--small {
- padding: 5px 12px;
- }
- button {
- font-size: 18px;
- line-height: 12px;
- }
- }
- }
-
- .dialog-content {
- .box-top {
- height: 330px;
- .top-left {
- float: left;
- width: 55%;
- background-color: rgba(253, 253, 253, 1);
- margin: 0 0.5%;
- height: 330px;
- border-radius: 2px;
- .banner {
- text-align: center;
- margin-top: 3px;
- video {
- margin: 0px auto;
- margin-top: 23px;
-
- width: 443px;
- height: 277px;
- }
- img {
- max-width: 90%;
- margin-top: 28px;
- }
- }
- }
- .top-right {
- float: left;
- width: 43%;
- margin: 0 0.5%;
- height: 330px;
- background-color: rgba(253, 253, 253, 1);
- position: relative;
- border-radius: 2px;
- overflow: hidden;
- .summary {
- height: 120px;
- margin: 5px 5px 0 5px;
- .icon {
- margin: 0 10px;
- margin-top: 8px;
- float: left;
- .baseImg {
- max-width: 106px;
- max-height: 106px;
- }
- }
-
- .right-desc {
- float: left;
- position: absolute;
- left: 140px;
- .name {
- font-size: 28px;
-
- margin-bottom: 5px;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- width: 250px;
- }
- .tags {
- margin-bottom: 10px;
- .el-tag {
- margin-right: 10px;
- }
- }
- }
- }
- .jihuo-input {
- margin-left: 10px;
- margin-bottom: 10px;
- .el-input {
- float: left;
- width: 63%;
- margin-bottom: 8px;
- margin-right: 10px;
- }
- el-button {
- float: left;
- }
- }
- .product-intruduction {
- height: 200px;
- margin-top: 3px;
-
- .part-title {
- display: block;
- line-height: 20px;
-
- font-size: 16px;
- margin-left: 24px;
- border-bottom: 3px solid #3d68e1;
- width: fit-content;
- height: 26px;
- margin-bottom: 8px;
- }
- .text {
- height: 156px;
- overflow: auto;
- padding: 0 15px 0px 15px;
-
- .single-desc {
- margin-bottom: 10px;
- font-size: 13px;
- }
- }
- }
- }
- }
- .box-bottom {
- margin-top: 8px;
-
- height: 240px;
- .bot-left {
- width: 49%;
- height: 240px;
- background-color: rgba(253, 253, 253, 1);
- margin: 0 0.5%;
- border-radius: 2px;
- float: left;
- .part-title {
- display: block;
- line-height: 35px;
- font-size: 16px;
- margin-left: 24px;
- border-bottom: 3px solid #3d68e1;
- width: fit-content;
- margin-bottom: 10px;
-
- height: 33px;
- }
- .list-zone {
- overflow: auto;
- height: 190px;
- padding: 0 20px;
- .list-item {
- .desc {
- background-color: rgba(242, 242, 242, 1.3);
- margin: 5px 12px 0 12px;
- font-size: 12px;
- line-height: 18px;
- }
- margin-bottom: 12px;
- }
- }
- }
- .bot-right {
- height: 240px;
- float: left;
- background-color: rgba(253, 253, 253, 1);
- width: 49%;
- margin: 0 0.5%;
- border-radius: 2px;
-
- .part-title {
- display: block;
- line-height: 35px;
- font-size: 16px;
- margin-left: 24px;
- border-bottom: 3px solid #3d68e1;
- width: fit-content;
- margin-bottom: 5px;
- height: 33px;
- }
- .item-zone {
- overflow: auto;
- height: 225px;
- padding: 0px 12px;
-
- .item {
- height: 165px;
- width: 130px;
- float: left;
- border-radius: 10px;
- box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.0666666666666667);
- position: relative;
-
- .el-tag {
- float: right;
- margin: 8px;
- }
- .icon {
- margin: 0 auto;
- img {
- max-width: 60px;
- max-height: 60px;
- position: absolute;
- top: 20%;
- left: 26%;
- }
- .icon-name {
- text-align: center;
- position: absolute;
- top: 61%;
- left: 12%;
- width: 100px;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- font-size: 13px;
- }
- }
- .look-button {
- position: absolute;
- left: 30%;
-
- top: 76%;
- }
- }
- }
- }
- }
- }
- }
-}
-.flex-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-
-.el-loading-mask .el-loading-spinner {
- top: 40px !important;
-}
-.el-loading-mask .el-loading-spinner svg {
- transform: none !important;
- top: 20px !important;
- left: 40% !important;
-}
-.el-loading-mask .el-loading-spinner p.el-loading-text {
- display: block !important;
- text-align: center !important;
- bottom: 10px !important;
- top: 80px !important;
- right: 0 !important;
- color: #78adf7;
-}
-.el-loading-mask .el-loading-spinner .path {
- stroke: #78adf7;
-}
-.installInfo {
- text-indent: 2em;
- font-size: 14px;
- line-height: 26px;
- p {
- text-align: center;
- }
-}
-.src-title {
- color: #bbcee8;
- font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC";
- font-weight: 650;
- font-style: normal;
- height: 36px;
- font-size: 15px;
- padding-left: 25px;
-}
-.update-badge .el-badge__content.is-fixed {
- top: 10px;
- right: 4px;
-}
-.empty-tip {
- padding-left: 25px;
- color: #ccc;
- margin-bottom: 18%;
-}
-.task-manage {
- height: 100%;
- .installModel {
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.7);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 100;
- .progress-bar {
- width: 70%;
- height: 17px;
- border-radius: 3px;
- background-color: rgb(227, 229, 231);
- position: absolute;
- top: 50%;
- left: 50%;
- background: url("/images/algo/green.gif");
- overflow: hidden;
- transform: translate(-50%, -50%);
- .inner-bar {
- position: absolute;
- top: 0;
- left: 0;
- width: 0;
- height: 100%;
- transition: width 3s;
- background-color: #3d68e1;
- }
- }
- }
- .el-tab-pane {
- height: auto !important;
- }
- .el-tabs--border-card > .el-tabs__content {
- padding: 0 !important;
- overflow: auto !important;
- background-color: #fff;
- }
- .el-tabs__content {
- padding: 0 !important;
- overflow: auto !important;
- }
-
- .super {
- width: 100%;
- height: 100%;
- .title {
- margin-bottom: 10px;
- line-height: 30px;
- font-family: PingFangSC-Medium;
- font-size: 16px;
- color: #222222;
- }
- .left-box {
- height: 100%;
- box-sizing: border-box;
- .el-drawer__header {
- border-bottom: 2px solid #eee;
- padding-bottom: 10px;
- font-size: 16px;
- margin-bottom: 0px;
- span {
- outline: none !important;
- }
- }
- .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;
- min-height: 200px;
- .wrap-box {
- width: 11%;
- }
- .list-choose-item-left {
- width: 80%;
- height: auto;
- margin: auto;
- margin-bottom: 30px;
- max-width: 150px;
- .mask {
- width: 100%;
-
- .el-button + .el-button {
- margin-left: 0 !important;
- }
- }
- }
- }
- }
- .store-list,
- .app-list {
- display: flex;
- flex-wrap: wrap;
- .wrap-box {
- width: 11%;
- margin-bottom: 30px;
- .list-choose-item-left {
- width: 80%;
- height: auto;
- margin: auto;
- margin-bottom: 30px;
- max-width: 150px;
- }
- .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: 20px;
- text-align: center;
- line-height: 20px;
- }
- .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 {
- display: inline-block;
- width: 90px;
- padding-left: 14px;
- font-weight: bold;
- }
- }
- }
- .text-right {
- padding-right: 30px;
- text-align: right;
- .tip {
- color: #999;
- line-height: 38px;
- }
- }
- }
- .tab-content {
- padding: 20px 20px;
- }
- }
- .mask {
- position: absolute;
- 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;
- .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;
- top: 40%;
- display: contents;
- }
- i:hover {
- color: rgba(255, 255, 255, 0.685);
- }
- }
-
- .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;
- }
- .list-choose-item-left {
- cursor: pointer;
- position: relative;
- font-size: 14px;
-
- transition: all 1s;
- 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;
- flex-wrap: wrap;
- justify-content: center;
- top: 0;
-
- .bot-btn {
- flex: 1;
- }
- &.flex-center {
- align-items: center;
- justify-content: center;
- }
- }
- }
- .list-choose-item-left-uninstal {
- color: gray;
- filter: grayscale(100%);
- }
- .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 {
- line-height: 20px;
- font-family: PingFangSC-Regular;
- font-size: 14px;
- letter-spacing: 0.05em;
- color: #333;
- .el-input {
- position: relative;
- font-size: 14px;
- display: inline-block;
- width: 100%;
- }
- }
- .unit-class {
- margin-left: 10px;
- text-align: center;
- line-height: 38px;
- }
- .el-input {
- position: relative;
- font-size: 14px;
- display: inline-block;
- width: 80%;
- }
- .list-complete-item-handle {
- height: 100%;
- text-align: center;
- .svg-wrap {
- width: 100%;
- margin: auto;
- padding-top: 80%;
- padding-top: 100%;
- position: relative;
- box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07);
- border-radius: 25px;
- svg {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .baseImg {
- width: 100%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- max-height: 150px;
- }
- }
- .willUpGrade {
- .update-icon {
- position: absolute;
- top: -8px;
- right: -8px;
- z-index: 999;
- }
- .iconupdate {
- color: #01e667;
- position: absolute;
- top: 5px;
- right: 5px;
- font-weight: 550;
- font-size: 26px;
- z-index: 999;
- }
- }
- &.uninstall {
- .svg-wrap {
- filter: grayscale(100%);
- }
- .alg-name {
- color: grey;
- }
- }
- }
- .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);
- 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;
- border-color: #eaeaea;
- font-family: PingFangSC-Medium;
- font-size: 13px;
- 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;
- }
- }
- }
-}
-.active-Dial {
- .el-dialog {
- min-width: 400px;
- }
-
- .dialog-active {
- .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 {
- display: inline-block;
- width: 90px;
- padding-left: 14px;
- font-weight: bold;
- }
- }
- }
- .text-right {
- padding-right: 30px;
- text-align: right;
- .tip {
- color: #999;
- line-height: 38px;
- }
- }
- }
-}
-</style>
-
diff --git a/src/pages/ai_c/index/api.ts b/src/pages/ai_c/index/api.ts
deleted file mode 100644
index 7232d34..0000000
--- a/src/pages/ai_c/index/api.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-import request from '@/scripts/httpRequest'
-import qs from "qs";
-
-// 鏌ヨ鎵�鏈夌畻娉�
-export const findAllSdk = (query: any) => {
- return request({
- url: "/data/api-v/sdk/findAllSdk",
- method: "get",
- params: query
- });
-};
-
-// 鏌ユ壘鎵�鏈変换鍔★紝鍖呭惈浠诲姟淇℃伅鍜屽搴旂殑绠楁硶淇℃伅
-export const findAll = (query: any) => {
- return request({
- url: "/data/api-v/task/findAll",
- method: "get",
- params: query
- });
-};
-
-// 缁欎换鍔℃坊鍔犵畻娉�
-export const addTaskSdk = (query: any) => {
- return request({
- url: "/data/api-v/task/addTaskSdk",
- method: "post",
- data: query
- })
-}
-
-// 缁欎换鍔″垹闄ょ畻娉�
-export const delTaskSdk = (query: any) => {
- return request({
- url: "/data/api-v/task/delTaskSdk",
- method: 'get',
- params: query
- })
-}
-
-// 鍒犻櫎浠诲姟
-export const deleteTask = (query: any) => {
- return request({
- url: '/data/api-v/task/delete',
- method: 'get',
- params: query
- })
-}
-
-// 鏇存柊浠诲姟鐘舵��
-export const updateTaskStatus = (query: any) => {
- return request({
- url: '/data/api-v/task/updateTaskStatus',
- method: 'post',
- data: query
- })
-}
-
-// 鏇存柊浠诲姟鍚嶇О
-export const updateTaskName = (query: any) => {
- return request({
- url: '/data/api-v/task/updateTaskName',
- method: 'post',
- data: qs.stringify(query)
- })
-}
-
-// 鑾峰彇绠楁硶鍙傛暟
-export const getSdkArgs = (query: any) => {
- return request({
- url: '/data/api-v/sdkArg/getSdkArgs',
- method: 'get',
- params: query
- })
-}
-
-// 绠楁硶鍙傛暟淇濆瓨
-export const saveTaskSdkRule = (query: any) => {
- return request({
- url: '/data/api-v/task/saveTaskSdkRule',
- method: 'post',
- data: query
- })
-}
-
-// 娣诲姞浠诲姟
-export const addTask = (query: any) => {
- return request({
- url: '/data/api-v/task/addTask',
- method: 'post',
- data: query
- })
-}
-
-// 鏌ヨ绠楁硶瑙勫垯
-export const getRulesByTaskSdk = (query: any) => {
- return request({
- url: '/data/api-v/task/getRulesByTaskSdk',
- method: 'get',
- params: query
- })
-}
-
-// 鎭㈠榛樿
-export const deleteTaskSdkRule = (query: any) => {
- return request({
- url: '/data/api-v/task/deleteTaskSdkRule',
- method: 'post',
- data: qs.stringify(query)
- })
-}
-
-// 鏍规嵁绫诲瀷鏌ユ壘瀛楀吀
-export const findByType = (query: any) => {
- return request({
- url: '/data/api-v/dictionary/findByType',
- method: "get",
- params: query
- })
-}
-
-// 鏌ヨ妫�绱㈡爣绛�
-export const getTagList = (query: any) => {
- return request({
- url: '/data/api-v/es/tagList',
- method: 'post',
- data: query
- })
-}
-//瀹夎绠楁硶
-export const downloadSdk = (query: any) => {
- return request({
- url: '/data/api-v/sdk/sdkDownload',
- method: 'get',
- params: query
- })
-}
-//涓婁紶瀹屾垚鑾峰彇瀹夎淇℃伅
-export const getInstallInfo = (data: any) => {
- return request({
- url: '/data/api-v/sdk/showInstallInfo',
- method: 'post',
- params: data
- })
-}
-//瀹夎宸蹭笂浼犵殑绠楁硶鎺ュ彛
-export const installSdk = (file: any) => {
- return request({
- url: '/data/api-v/sdk/install',
- method: 'post',
- params: file
- })
-}
-
-//鍗歌浇宸插畨瑁呯畻娉�
-export const removeSdk = (sdk: any) => {
- return request({
- url: '/data/api-v/sdk/unInstall',
- method: 'post',
- data: sdk
- })
-}
\ No newline at end of file
diff --git a/src/pages/ai_c/index/main.ts b/src/pages/ai_c/index/main.ts
deleted file mode 100644
index 8ddab5a..0000000
--- a/src/pages/ai_c/index/main.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import Vue from 'vue';
-import App from './App.vue';
-
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css';
-import "@/assets/css/element-variables.scss";
-Vue.use(ElementUI)
-
-new Vue({
- el: '#app',
- render: h => h(App)
-})
diff --git a/src/pages/library/components/addBase.vue b/src/pages/library/components/addBase.vue
index d27669c..f8d8635 100644
--- a/src/pages/library/components/addBase.vue
+++ b/src/pages/library/components/addBase.vue
@@ -424,11 +424,9 @@
// dateString:褰撳墠鏃堕棿
// compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
if (this.isEmpty(dateString)) {
- // alert('dateString涓嶈兘涓虹┖')
return;
}
if (this.isEmpty(compareDateString)) {
- // alert('compareDateString涓嶈兘涓虹┖')
return 1;
}
var dateTime = this.dateParse(dateString).getTime();
diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue
index 66c485b..d834691 100644
--- a/src/pages/library/components/baseList.vue
+++ b/src/pages/library/components/baseList.vue
@@ -205,85 +205,14 @@
this.localTableList = this.BaseManageData.localTables;
this.defaultShow();
},
- handleChange(val) {},
- async setEnable(item) {
- let res = await updateDbTableStatus({
- id: item.id,
- enable: item.enable,
- });
- if (res.success === true) {
- this.$notify({
- type: "success",
- message: "搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
- });
- } else {
- this.$notify({
- type: "error",
- message: "搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
- });
- }
- },
add(type) {
this.$emit("changeShow", null, type);
- },
- isDisabled(item) {
- var flag = true;
- if (this.isShow("library:set")) {
- if (item.endTime == "") {
- flag = false;
- } else {
- flag = !this.$moment(new Date()).isBetween(
- item.startTime,
- item.endTime
- );
- }
- }
- return flag;
},
clickCategory(index, type, item) {
this.categoryIndex = type + index;
// 璋冪敤鍒囨崲鍙充晶闈㈡澘鐨勫嚱鏁板苟涓斿垏鎹㈢埗缁勪欢涓璱sSelected鐨勫�艰鍙︿竴涓粍浠舵竻闄よ閫変腑鐘舵��
this.clickBase = item;
this.$emit("getList", item, type);
- },
- edit(item, type) {
- this.$emit("changeShow", item, type);
- },
- deleteBase(id) {
- let token =
- sessionStorage.getItem("loginedInfo") &&
- JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
- this.$confirm("鎻愮ず锛氱‘瀹氬垹闄ゅ簳搴擄紵", {
- center: true,
- cancelButtonClass: "comfirm-class-cancle",
- confirmButtonClass: "comfirm-class-sure",
- }).then(() => {
- fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${id}`, {
- method: "GET",
- headers: {
- "Content-Type": "application/json",
- Authorization: token,
- },
- })
- .then((res) => {
- return res.json();
- })
- .then((res) => {
- if (res.success) {
- this.$notify({
- type: "success",
- message: "搴曞簱鍒犻櫎鎴愬姛锛�",
- });
- }
- this.init();
- })
- .catch((err) => {
- this.$notify({
- type: "error",
- message: err,
- });
- });
- });
},
// 榛樿鏄剧ず绗竴涓簱鐨勬暟鎹�
defaultShow() {
@@ -317,25 +246,25 @@
return false;
}
},
- dateCompare(dateString, compareDateString) {
- // dateString:褰撳墠鏃堕棿
- // compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
- if (this.isEmpty(dateString)) {
- return;
- }
- if (this.isEmpty(compareDateString)) {
- return 1;
- }
- var dateTime = this.dateParse(dateString).getTime();
- var compareDateTime = this.dateParse(compareDateString).getTime();
- if (compareDateTime > dateTime) {
- return 1;
- } else if (compareDateTime === dateTime) {
- return 0;
- } else {
- return -1;
- }
- },
+ // dateCompare(dateString, compareDateString) {
+ // // dateString:褰撳墠鏃堕棿
+ // // compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
+ // if (this.isEmpty(dateString)) {
+ // return;
+ // }
+ // if (this.isEmpty(compareDateString)) {
+ // return 1;
+ // }
+ // var dateTime = this.dateParse(dateString).getTime();
+ // var compareDateTime = this.dateParse(compareDateString).getTime();
+ // if (compareDateTime > dateTime) {
+ // return 1;
+ // } else if (compareDateTime === dateTime) {
+ // return 0;
+ // } else {
+ // return -1;
+ // }
+ // },
},
props: {
listWidth: {
@@ -401,7 +330,7 @@
font-size: 14px;
}
.out-div {
- max-height: 100%;
+ max-height: 100%; height: 100%;
.el-collapse-item__wrap {
will-change: height;
background-color: #fff;
diff --git a/src/pages/library/components/carList.vue b/src/pages/library/components/carList.vue
index 4843253..019b4db 100644
--- a/src/pages/library/components/carList.vue
+++ b/src/pages/library/components/carList.vue
@@ -1,253 +1,170 @@
<template>
<div class="table-parent">
- <el-row class style="margin: 20px">
- <!-- <el-col :span="4" class="tl">
- <b class="f14">{{this.baseObject.tableName}}</b>
- </el-col>
- <el-col :span="2">
- <b class="f14">{{this.baseObject.bwType === '1'?'榛戝悕鍗�':'鐧藉悕鍗�'}}</b>
- </el-col>
- <el-col :span="8">
- <b class="f14">鏈夋晥鏃堕棿锛歿{this.baseObject.startTime}}--{{this.baseObject.endTime?this.baseObject.endTime:'姘镐箙鏈夋晥'}}</b>
- </el-col>-->
- <div class="tl">
- <span class="f14" style="color: #000000">{{
- this.baseObject.tableName ? this.baseObject.tableName + "/ " : ""
- }}</span>
- <span class="f14" style="color: #000000">{{
- this.baseObject.bwType === "1"
- ? "榛戝悕鍗�/ "
- : "鐧藉悕鍗�/ "
- }}</span>
- <span class="f14" style="color: #000000"
- >鏈夋晥鏃堕棿锛歿{ this.baseObject.startTime }}--{{
- this.baseObject.endTime ? this.baseObject.endTime : "姘镐箙鏈夋晥"
- }}</span
- >
+ <el-row>
+ <div class="base-tip">
+ <div class="left-tips">
+ <span class="ku-name">{{ this.baseObject.tableName }}</span>
+ <span
+ class="list"
+ :class="
+ this.baseObject.bwType === '1' ? 'black-list' : 'white-list'
+ "
+ >{{ this.baseObject.bwType === "1" ? "榛戝悕鍗�" : "鐧藉悕鍗�" }}</span
+ >
+ <span class="ok-time"
+ >鏈夋晥鏃堕棿锛歿{ this.baseObject.startTime }}--{{
+ this.baseObject.endTime ? this.baseObject.endTime : "姘镐箙鏈夋晥"
+ }}</span
+ >
+ </div>
+
+ <div class="right-btns">
+ <el-switch
+ :active-value="1"
+ :width="52"
+ :inactive-value="0"
+ v-model="baseObject.enable"
+ active-color="#4E94FF"
+ inactive-color="#BBBBBB"
+ style="margin-right: 10px"
+ :disabled="isDisabled(baseObject)"
+ @change="setEnable(baseObject)"
+ >
+ </el-switch>
+
+ <el-tooltip content="鍒犻櫎" placement="top" popper-class="atooltip">
+ <span
+ class="iconfont iconfont-wrap iconshanchuku-09"
+ v-if="isShow('library:set')"
+ @click.stop="askDelete('base')"
+ ></span>
+ </el-tooltip>
+
+ <el-tooltip content="缂栬緫" placement="top" popper-class="atooltip">
+ <span
+ class="iconfont iconfont-wrap iconbianjiku-09"
+ @click.stop="edit"
+ v-if="isShow('library:set')"
+ ></span>
+ </el-tooltip>
+ </div>
</div>
</el-row>
- <el-row class style="margin: 40px 0 40px 20px">
- <el-col :span="6">
- <el-input
- placeholder="濮撳悕/鎬у埆/韬唤璇佸彿/鎵嬫満鍙�"
- autocomplete="off"
- width="100%"
- size="small"
- v-model="BaseManageData.contentValue"
- @keyup.enter.native="handleSearch"
- ></el-input>
- </el-col>
- <el-col :span="2">
- <el-button size="small" type="primary" @click="handleSearch"
- >鎼滅储</el-button
- >
- </el-col>
- <el-col :offset="8" :span="3">
- <fTemplate authority="library:set">
- <el-button
+
+ <div style="display: flex" class="border-tabl">
+ <div class="head-search">
+ <div class="desc">
+ 鏈簱鍏辨湁
+ <span class="nums">{{ BaseManageData.total }}鏉�</span>
+ 鏁版嵁
+ </div>
+ <div class="right-group">
+ <el-input
+ placeholder="濮撳悕/鎬у埆/韬唤璇佸彿/鎵嬫満鍙�"
+ autocomplete="off"
+ width="100%"
size="small"
- class="ml10"
- type="danger"
- @click="deleteBatch"
- v-if="isShow('library:set')"
- >鎵归噺鍒犻櫎</el-button
+ v-model="BaseManageData.contentValue"
+ @keyup.enter.native="handleSearch"
+ ></el-input>
+ <el-button size="small" type="primary" @click="handleSearch"
+ >鎼滅储</el-button
>
- </fTemplate>
- </el-col>
- <el-col :span="2">
- <div class="text-left">
- <el-button size="small" class="ml10" type="primary" @click="addCar"
- >娣诲姞杞﹁締</el-button
+
+ <el-tooltip
+ content="鎵归噺鍒犻櫎"
+ placement="top"
+ popper-class="atooltip"
>
- <el-drawer
- title="杞﹁締淇℃伅"
- :modal="false"
- :destroy-on-close="true"
- :append-to-body="true"
- :visible.sync="addDrawer"
- :direction="direction"
- :before-close="handleClose1"
+ <fTemplate authority="library:set">
+ <span
+ class="iconfont iconfont-wrap iconpiliangshanchu-09"
+ @click="askDelete('batch')"
+ v-if="isShow('library:set')"
+ ></span>
+ </fTemplate>
+ </el-tooltip>
+
+ <el-tooltip
+ content="娣诲姞杞﹁締"
+ placement="top"
+ popper-class="atooltip"
>
- <div class="drawerSpace">
- <div class="uploadLine">
- <div class="car-picture">
- <el-upload
- action
- :http-request="uploadCar"
- accept="image/*"
- list-type="picture-card"
- :file-list="form.carUrls"
- :before-remove="handleRemoveCarPic"
- >
- <i class="el-icon-plus" style="margin-top: 25px"></i>
- <div>涓婁紶杞﹁締鐓х墖</div>
- </el-upload>
- </div>
- <div class="person-picture">
- <el-upload
- action
- :http-request="uploadPerson"
- list-type="picture-card"
- accept="image/*"
- :limit="1"
- :file-list="form.faceUrl"
- :on-remove="handleRemoveFacePic"
- >
- <i class="el-icon-plus" style="margin-top: 25px"></i>
- <div>涓婁紶杞︿富鐓х墖</div>
- </el-upload>
- </div>
- </div>
- <el-form
- ref="formForCar"
- :model="form"
- label-width="100px"
- style="margin-top: 20px; margin-bottom: 50px"
- :rule="rules"
- >
- <el-form-item label="*杞︾墝鍙凤細">
- <el-input
- placeholder="璇疯緭鍏ヨ溅鐗屽彿"
- v-model="form.carNo"
- class="inputWidth"
- ></el-input>
- </el-form-item>
- <el-form-item label="杞﹁締绫诲瀷锛�">
- <el-select
- v-model="form.carType"
- placeholder="璇烽�夋嫨杞﹁締绫诲瀷"
- class="inputWidth"
- >
- <el-option
- v-for="item in VideoPhotoData.dictionary.CARTYPE"
- :key="item.value"
- :label="item.name"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="杞﹁締鍝佺墝锛�">
- <el-select
- v-model="form.carBrand"
- placeholder="璇烽�夋嫨杞﹁締鍝佺墝"
- class="inputWidth"
- >
- <el-option
- v-for="item in VideoPhotoData.dictionary.BRAND"
- :key="item.value"
- :label="item.name"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="杞﹁韩棰滆壊锛�">
- <el-select
- v-model="form.carColor"
- placeholder="璇烽�夋嫨杞﹁韩棰滆壊"
- class="inputWidth"
- >
- <el-option
- v-for="item in VideoPhotoData.dictionary.nColor"
- :key="item.value"
- :label="item.name"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="杞︿富濮撳悕锛�">
- <el-input
- v-model="form.personName"
- class="inputWidth"
- ></el-input>
- </el-form-item>
- <el-form-item label="杞︿富鎬у埆锛�">
- <el-radio-group v-model="form.sex">
- <el-radio label="鐢�"></el-radio>
- <el-radio label="濂�"></el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="韬唤璇佸彿锛�">
- <el-input v-model="form.idCard" class="inputWidth"></el-input>
- </el-form-item>
- <el-form-item label="鎵嬫満鍙凤細">
- <el-input
- v-model="form.phoneNum"
- class="inputWidth"
- ></el-input>
- </el-form-item>
- <el-form-item label="鍏朵粬锛�">
- <el-input
- v-model="form.reserved"
- class="inputWidth"
- ></el-input>
- </el-form-item>
- <el-form-item style="text-align: tight">
- <el-button
- type="primary"
- @click="submitCar"
- style="margin-left: 120px"
- >淇濆瓨</el-button
- >
- <el-button @click="resetForm">鍙栨秷</el-button>
- </el-form-item>
- </el-form>
- </div>
- </el-drawer>
+ <span
+ class="iconfont iconfont-wrap icontianjiacheliang-09"
+ @click="addCar"
+ ></span>
+ </el-tooltip>
+
+ <el-tooltip
+ content="鎵归噺涓婁紶杞︾墝"
+ placement="top"
+ popper-class="atooltip"
+ >
+ <span
+ class="iconfont iconfont-wrap iconshangchuanchepai-09"
+ @click="addBatch"
+ ></span>
+ </el-tooltip>
</div>
- </el-col>
- <el-col :span="3">
- <div class="text-left">
- <el-button size="small" class="ml10" type="primary" @click="addBatch"
- >鎵归噺涓婁紶杞︾墝</el-button
- >
- <el-drawer
- title="涓婁紶杞︾墝"
- :modal="false"
- :append-to-body="true"
- :visible.sync="addBatchDrawer"
- :direction="direction"
- :before-close="handleClose2"
- >
- <div class="drawerSpace">
- <div class="plateAttach">
- <el-input
- type="textarea"
- :rows="25"
- v-model="plates"
- style="width: 90%"
- placeholder="璇疯緭鍏ヨ溅鐗屽彿"
- ></el-input>
- <p>
- 杞︾墝鍙蜂互閫楀彿鎴栧洖杞﹂敭闅斿紑锛屽崟娆℃渶澶氭敮鎸�100鏉′笂浼狅紝渚嬪锛氫含YAB123,浜現34Y87
- </p>
- <el-button
- type="primary"
- @click="platesBatch"
- style="margin-left: 210px"
- >淇濆瓨</el-button
- >
- <el-button @click="resetForm('ruleForm')">鍙栨秷</el-button>
- </div>
- </div>
- </el-drawer>
- </div>
- </el-col>
- </el-row>
- <div style="display: flex" class="border-tabl ml20">
+ </div>
+
<el-table
id="multipleTable"
ref="multipleTable"
:data="BaseManageData.personList"
tooltip-effect="dark"
- style="width: 100%"
+ style="width: 100%; overflow: auto"
:fit="true"
:default-sort="{ prop: 'createTime', order: 'descending' }"
@selection-change="handleSelectionChange"
- :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
+ :header-cell-style="{
+ background: '#fff',
+ color: '#222222',
+ padding: '2px 1px',
+ borderBottom: 'none',
+ }"
>
<el-table-column type="selection" width="30"></el-table-column>
- <el-table-column label="搴忓彿" width="70" sortable align="center">
- <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+ <el-table-column
+ prop="carUrls"
+ label="杞﹁締鐓х墖"
+ width="140"
+ show-overflow-tooltip
+ sortable
+ class="picture"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <el-carousel
+ style="height: 100px"
+ :autoplay="false"
+ indicator-position="none"
+ :arrow="scope.row.carUrls.length > 1 ? 'always' : 'never'"
+ >
+ <el-carousel-item
+ v-for="(item, index) in scope.row.carUrls"
+ :key="index"
+ >
+ <img
+ style="width: 100px; height: 100px; object-fit: contain"
+ :src="item.url"
+ alt
+ />
+ </el-carousel-item>
+ </el-carousel>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢熸晥鐘舵��" align="center" width="80">
+ <template slot-scope="scope">
+ <el-switch
+ v-model="scope.row.enable"
+ :active-value="1"
+ :disabled="!isShow('library:set')"
+ :inactive-value="0"
+ @change="enable(scope.row)"
+ ></el-switch>
+ </template>
</el-table-column>
<el-table-column
prop="carNo"
@@ -297,35 +214,7 @@
align="center"
width="80"
></el-table-column>
- <el-table-column
- prop="carUrls"
- label="杞﹁締鐓х墖"
- width="140"
- show-overflow-tooltip
- sortable
- class="picture"
- align="center"
- >
- <template slot-scope="scope">
- <el-carousel
- style="height: 100px"
- :autoplay="false"
- indicator-position="none"
- :arrow="scope.row.carUrls.length > 1 ? 'always' : 'never'"
- >
- <el-carousel-item
- v-for="(item, index) in scope.row.carUrls"
- :key="index"
- >
- <img
- style="width: 100px; height: 100px; object-fit: contain"
- :src="item.url"
- alt
- />
- </el-carousel-item>
- </el-carousel>
- </template>
- </el-table-column>
+
<el-table-column
prop="createTime"
label="鍏ュ簱鏃堕棿"
@@ -334,18 +223,7 @@
sortable
align="center"
></el-table-column>
- <!-- <el-table-column prop="reserved" label="鍏朵粬" align="center"></el-table-column> -->
- <el-table-column label="鐢熸晥鐘舵��" align="center" width="80">
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.enable"
- :active-value="1"
- :disabled="!isShow('library:set')"
- :inactive-value="0"
- @change="enable(scope.row)"
- ></el-switch>
- </template>
- </el-table-column>
+
<el-table-column label="鎿嶄綔" min-width="200" align="center">
<template slot-scope="scope">
<fTemplate authority="library:set">
@@ -415,13 +293,12 @@
</template>
</el-table-column>
</el-table>
- </div>
- <div class="pt5 pb20" style="height: 40px; position: relative">
<el-pagination
@current-change="refrash"
:current-page="BaseManageData.page"
:page-size="BaseManageData.size"
- style="position: absolute; right: 10px; bottom: 5px"
+ style="margin-top: 10px;"
+ layout="total,sizes,prev,pager,next,jumper"
:total="BaseManageData.total"
></el-pagination>
</div>
@@ -608,6 +485,183 @@
>
</div>
</el-dialog>
+
+ <el-dialog
+ :visible.sync="askDeleteShow"
+ :center="true"
+ custom-class="del-dialog"
+ >
+ <div>
+ <div class="suc-icon">
+ <i class="iconfont icongantanhao1"></i>
+ </div>
+ <div class="tt">{{ delText[0] }}</div>
+ <div class="flex-box">
+ <span>{{ delText[1] }}</span>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="askDeleteShow = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleDel">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <el-drawer
+ title="杞﹁締淇℃伅"
+ :modal="false"
+ :destroy-on-close="true"
+ :append-to-body="true"
+ :visible.sync="addDrawer"
+ :direction="direction"
+ :before-close="handleClose1"
+ >
+ <div class="drawerSpace">
+ <div class="uploadLine">
+ <div class="car-picture">
+ <el-upload
+ action
+ :http-request="uploadCar"
+ accept="image/*"
+ list-type="picture-card"
+ :file-list="form.carUrls"
+ :before-remove="handleRemoveCarPic"
+ >
+ <i class="el-icon-plus" style="margin-top: 25px"></i>
+ <div>涓婁紶杞﹁締鐓х墖</div>
+ </el-upload>
+ </div>
+ <div class="person-picture">
+ <el-upload
+ action
+ :http-request="uploadPerson"
+ list-type="picture-card"
+ accept="image/*"
+ :limit="1"
+ :file-list="form.faceUrl"
+ :on-remove="handleRemoveFacePic"
+ >
+ <i class="el-icon-plus" style="margin-top: 25px"></i>
+ <div>涓婁紶杞︿富鐓х墖</div>
+ </el-upload>
+ </div>
+ </div>
+ <el-form
+ ref="formForCar"
+ :model="form"
+ label-width="100px"
+ style="margin-top: 20px; margin-bottom: 50px"
+ :rule="rules"
+ >
+ <el-form-item label="*杞︾墝鍙凤細">
+ <el-input
+ placeholder="璇疯緭鍏ヨ溅鐗屽彿"
+ v-model="form.carNo"
+ class="inputWidth"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="杞﹁締绫诲瀷锛�">
+ <el-select
+ v-model="form.carType"
+ placeholder="璇烽�夋嫨杞﹁締绫诲瀷"
+ class="inputWidth"
+ >
+ <el-option
+ v-for="item in VideoPhotoData.dictionary.CARTYPE"
+ :key="item.value"
+ :label="item.name"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="杞﹁締鍝佺墝锛�">
+ <el-select
+ v-model="form.carBrand"
+ placeholder="璇烽�夋嫨杞﹁締鍝佺墝"
+ class="inputWidth"
+ >
+ <el-option
+ v-for="item in VideoPhotoData.dictionary.BRAND"
+ :key="item.value"
+ :label="item.name"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="杞﹁韩棰滆壊锛�">
+ <el-select
+ v-model="form.carColor"
+ placeholder="璇烽�夋嫨杞﹁韩棰滆壊"
+ class="inputWidth"
+ >
+ <el-option
+ v-for="item in VideoPhotoData.dictionary.nColor"
+ :key="item.value"
+ :label="item.name"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="杞︿富濮撳悕锛�">
+ <el-input v-model="form.personName" class="inputWidth"></el-input>
+ </el-form-item>
+ <el-form-item label="杞︿富鎬у埆锛�">
+ <el-radio-group v-model="form.sex">
+ <el-radio label="鐢�"></el-radio>
+ <el-radio label="濂�"></el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="韬唤璇佸彿锛�">
+ <el-input v-model="form.idCard" class="inputWidth"></el-input>
+ </el-form-item>
+ <el-form-item label="鎵嬫満鍙凤細">
+ <el-input v-model="form.phoneNum" class="inputWidth"></el-input>
+ </el-form-item>
+ <el-form-item label="鍏朵粬锛�">
+ <el-input v-model="form.reserved" class="inputWidth"></el-input>
+ </el-form-item>
+ <el-form-item style="text-align: tight">
+ <el-button
+ type="primary"
+ @click="submitCar"
+ style="margin-left: 120px"
+ >淇濆瓨</el-button
+ >
+ <el-button @click="resetForm">鍙栨秷</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ </el-drawer>
+
+ <el-drawer
+ title="涓婁紶杞︾墝"
+ :modal="false"
+ :append-to-body="true"
+ :visible.sync="addBatchDrawer"
+ :direction="direction"
+ :before-close="handleClose2"
+ >
+ <div class="drawerSpace">
+ <div class="plateAttach">
+ <el-input
+ type="textarea"
+ :rows="25"
+ v-model="plates"
+ style="width: 90%"
+ placeholder="璇疯緭鍏ヨ溅鐗屽彿"
+ ></el-input>
+ <p>
+ 杞︾墝鍙蜂互閫楀彿鎴栧洖杞﹂敭闅斿紑锛屽崟娆℃渶澶氭敮鎸�100鏉′笂浼狅紝渚嬪锛氫含YAB123,浜現34Y87
+ </p>
+ <el-button
+ type="primary"
+ @click="platesBatch"
+ style="margin-left: 210px"
+ >淇濆瓨</el-button
+ >
+ <el-button @click="resetForm('ruleForm')">鍙栨秷</el-button>
+ </div>
+ </div>
+ </el-drawer>
</div>
</template>
<script>
@@ -616,21 +670,23 @@
updateBaseCar,
deleteBasePersons,
plateBatch,
+ updateDbTableStatus,
} from "@/api/baseLibrary";
import axios from "axios";
-// import { findByType } from '@/server/video.js'
import Upload from "./upload";
import fTemplate from "@/components/fTemplate";
import request from "@/scripts/httpRequest";
export default {
components: {
- // httpImg,
fTemplate,
},
props: {
baseObject: {
default: () => {},
type: Object,
+ },
+ syncType: {
+ type: String,
},
},
data() {
@@ -651,15 +707,14 @@
url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg",
},
],
- provinces: [
- { name: "浜�", value: 1 },
- { name: "娲�", value: 2 },
- { name: "鍐�", value: 3 },
- ],
+ // provinces: [
+ // { name: "浜�", value: 1 },
+ // { name: "娲�", value: 2 },
+ // { name: "鍐�", value: 3 },
+ // ],
copyVisiabled: false,
moveVisiabled: false,
buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
- searchName: "",
current: 1,
compare: false,
pageSize: 10,
@@ -678,7 +733,7 @@
idCard: "",
phoneNum: "",
monitorLevel: "one",
- carUrls: [], //{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"},{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"}
+ carUrls: [],
faceUrl: [],
faceFeature: "",
carPicUrls: "",
@@ -700,14 +755,12 @@
],
},
tableData: [],
- tableHeight: window.innerHeight - 320,
- multipleSelection: [],
- peoperLevel: [],
oldWidth: "",
oldHeight: "",
- // 涓婁紶鍚庣殑寮规鏄剧ず
+ askDeleteShow: false,
+ delType: "",
+ toDeleteId: "",
dialogVisible: false,
- // 鎵归噺涓婁紶鍚庣殑杩斿洖缁撴灉
uploadResult: {
failList: [],
successList: [],
@@ -727,8 +780,59 @@
}
return false;
},
+ delText() {
+ switch (this.delType) {
+ case "base":
+ return ["鍒犻櫎搴曞簱", "纭畾鍒犻櫎璇ュ簳搴擄紵"];
+ case "single":
+ return ["鍒犻櫎浜哄憳", "纭畾鍒犻櫎璇ュ簳搴撲汉鍛橈紵"];
+ case "batch":
+ return ["鎵归噺鍒犻櫎", "纭畾鍒犻櫎璇ュ簳搴撻�変腑浜哄憳锛�"];
+ default:
+ return ["", ""];
+ }
+ },
},
methods: {
+ handleDel() {
+ if (this.delType == "single") {
+ this.deleteThis();
+ } else if (this.delType == "base") {
+ this.deleteBase();
+ } else if (this.delType == "batch") {
+ this.deleteBatch();
+ }
+ },
+ deleteBase() {
+ let token =
+ sessionStorage.getItem("loginedInfo") &&
+ JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
+ fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${this.baseObject.id}`, {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: token,
+ },
+ })
+ .then((res) => {
+ return res.json();
+ })
+ .then((res) => {
+ if (res.success) {
+ this.$notify({
+ type: "success",
+ message: "搴曞簱鍒犻櫎鎴愬姛锛�",
+ });
+ }
+ this.$emit("onDelete");
+ })
+ .catch((err) => {
+ this.$notify({
+ type: "error",
+ message: err,
+ });
+ });
+ },
handleRemoveCarPic(file, fileList) {
var index = fileList.findIndex((item) => {
if (item.uid == file.uid) {
@@ -737,10 +841,27 @@
});
this.form.carUrls.splice(index, 1);
},
+ isDisabled(item) {
+ var flag = true;
+ if (this.isShow("library:set")) {
+ if (item.endTime == "") {
+ flag = false;
+ } else {
+ flag = !this.$moment(new Date()).isBetween(
+ item.startTime,
+ item.endTime
+ );
+ }
+ }
+ return flag;
+ },
handleRemoveFacePic(file, fileList) {
this.form.faceUrl.splice(0, 1);
},
- beforeUoload() {},
+ edit() {
+ this.$emit("changeShow", this.baseObject, this.syncType);
+ },
+ // beforeUoload() {},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
@@ -789,7 +910,7 @@
idCard: "",
phoneNum: "",
monitorLevel: "one",
- carUrls: [], //{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"},{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"}
+ carUrls: [],
faceUrl: [],
faceFeature: "",
carPicUrls: "",
@@ -802,19 +923,9 @@
reserved: "",
}),
done();
- // this.$confirm('纭鍏抽棴锛�')
- // .then(_ => {
- // done();
- // })
- // .catch(_ => {});
},
handleClose2(done) {
done();
- // this.$confirm('纭鍏抽棴锛�')
- // .then(_ => {
- // done();
- // })
- // .catch(_ => {});
},
isShow(authority) {
if (this.isAdmin) {
@@ -834,43 +945,32 @@
this.$refs.multipleTable.clearSelection();
}
},
- deleteThis(id) {
-
+ deleteThis() {
let token =
sessionStorage.getItem("loginedInfo") &&
JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
- this.$confirm("鎻愮ず锛氱‘瀹氬垹闄よ搴曞簱浜哄憳锛�", {
- center: true,
- cancelButtonClass: "comfirm-class-cancle",
- confirmButtonClass: "comfirm-class-sure",
+ fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${this.toDeleteId}`, {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: token,
+ },
})
- .then((_) => {
- fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${id}`, {
- method: "GET",
- headers: {
- "Content-Type": "application/json",
- Authorization: token,
- },
- })
- .then((res) => {
- return res.json();
- })
- .then((data) => {
- if (data.success) {
- this.$notify({
- type: "success",
- message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒",
- });
- }
- this.getCarList();
- })
- .catch((err) => {
- });
+ .then((res) => {
+ return res.json();
})
- .catch((_) => {});
+ .then((data) => {
+ if (data.success) {
+ this.$notify({
+ type: "success",
+ message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒",
+ });
+ }
+ this.getCarList();
+ })
+ .catch((err) => {});
},
- sayHello() {
- },
+ // sayHello() {},
getUploadResult(result) {
this.uploadResult = result.data;
this.dialogVisible = true;
@@ -891,7 +991,6 @@
});
},
handleClose() {
- //this.getCarList();
this.dialogFormVisible = false;
},
handleSelectionChange(val) {
@@ -954,7 +1053,7 @@
personPicUrl: item.personPicUrl,
reserved: item.reserved,
});
- if (res.success === true) {
+ if (res.success) {
this.$notify({
type: "success",
message: "搴曞簱浜哄憳鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
@@ -973,10 +1072,24 @@
this.$refs.uploadDrag && this.$refs.uploadDrag.uploadStart();
},
haveScore(row) {
- if (row.compareScore && row.compareScore !== "") {
- return true;
+ return row.compareScore && row.compareScore !== "";
+ },
+ async setEnable(item) {
+ debugger;
+ let res = await updateDbTableStatus({
+ id: item.id,
+ enable: item.enable,
+ });
+ if (res.success) {
+ this.$notify({
+ type: "success",
+ message: "搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
+ });
} else {
- return false;
+ this.$notify({
+ type: "error",
+ message: "搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
+ });
}
},
async searchImgList(faceUrl, threshold) {
@@ -994,7 +1107,7 @@
this.total = res.data.total;
this.compare = true;
},
- updateThreshold() {},
+ // updateThreshold() {},
async updateFace(param) {
const fd = new FormData();
fd.append("file", param.file);
@@ -1014,39 +1127,22 @@
this.form.faceFeature = res.data.data.faceFeature;
}
},
- uploadSuccess() {
- },
- uploadError() {
- },
- deleteBatch() {
- if (this.selectedRowKeys.length === 0) {
+ async deleteBatch() {
+ let ids = [];
+ this.selectedRowKeys.map((item, index) => {
+ ids.push(item.id);
+ });
+ let res = await deleteBasePersons(ids);
+ if (res.success) {
this.$notify({
- type: "warning",
- message: "璇烽�夋嫨瑕佸垹闄ょ殑浜哄憳",
+ type: "success",
+ message: "鍒犻櫎鎴愬姛锛�",
});
+ this.getCarList();
} else {
- this.$confirm("鎻愮ず锛氱‘瀹氬垹闄よ搴曞簱閫変腑浜哄憳锛�", {
- center: true,
- cancelButtonClass: "comfirm-class-cancle",
- confirmButtonClass: "comfirm-class-sure",
- }).then(async (_) => {
- let ids = [];
- this.selectedRowKeys.map((item, index) => {
- ids.push(item.id);
- });
- let res = await deleteBasePersons(ids);
- if (res.success) {
- this.$notify({
- type: "success",
- message: "鍒犻櫎鎴愬姛锛�",
- });
- this.getCarList();
- } else {
- this.$notify({
- type: "error",
- message: "鍒犻櫎澶辫触锛�",
- });
- }
+ this.$notify({
+ type: "error",
+ message: "鍒犻櫎澶辫触锛�",
});
}
},
@@ -1065,10 +1161,19 @@
this.BaseManageData.queryPersonList();
}
},
- handleRowStyle({ row, rowIndex }) {
- if (rowIndex === 0) {
- return "background:#222222;";
+ askDelete(typ, id) {
+ if (typ == "batch") {
+ if (this.selectedRowKeys.length === 0) {
+ this.$notify({
+ type: "warning",
+ message: "璇烽�夋嫨瑕佸垹闄ょ殑浜哄憳",
+ });
+ return;
+ }
}
+ this.askDeleteShow = true;
+ this.delType = typ;
+ id && (this.toDeleteId = id);
},
blackAngWhite() {
if (this.BaseManageData.selectBlacks.length > 0) {
@@ -1163,7 +1268,6 @@
this.$refs["formForCar"].validate(async (valid) => {
if (valid) {
let { ...json } = this.form;
-
for (let index in json.carUrls) {
if (index == 0) {
json.carPicUrls += json.carUrls[index].url.substring(11);
@@ -1392,7 +1496,6 @@
display: none;
}
.table-parent {
- // position: relative;
height: 100%;
overflow: visible !important;
.picture {
@@ -1501,59 +1604,7 @@
padding-left: 8px !important;
padding-right: 0px !important;
}
-// .addToBase1 {
-// height: 350px;
-// position: relative;
-// .topLabel {
-// margin-top: 20px;
-// height: 40px;
-// border-bottom: 1px solid #eee;
-// font-family: PingFangSC-Medium;
-// font-size: 20px;
-// font-weight: 600;
-// line-height: 1rem;
-// color: #222222;
-// text-align: left;
-// margin-left: 15px;
-// }
-// .items {
-// width: 100%;
-// height: auto;
-// overflow-y: auto;
-// margin-bottom: 20px;
-// .lable {
-// // width: 15%;
-// margin-top: 10px;
-// // float: left;
-// //font-family: PingFangSC-Medium;
-// font-size: 14px;
-// font-weight: 600;
-// }
-// .baseList {
-// // width: 85%;
-// height: 100%;
-// // float: left;
-// .base {
-// width: calc(33% - 10px);
-// padding: 0px 5px;
-// line-height: 30px;
-// float: left;
-// text-align: left;
-// font-size: 12px !important;
-// .el-checkbox {
-// width: 100%;
-// display: block;
-// overflow: hidden;
-// text-overflow: ellipsis;
-// white-space: nowrap;
-// .el-checkbox__label {
-// display: inline !important;
-// }
-// }
-// }
-// }
-// }
-// }
+
.copy,
.move {
.el-dialog__body {
@@ -1562,7 +1613,7 @@
}
.avatar-uploader {
- max-width: 100px;
+ max-width: 100px;
min-width: 100px;
min-height: 100px;
border: 1px solid #eee;
diff --git a/src/pages/library/components/personList.vue b/src/pages/library/components/personList.vue
index 7775450..1ccb6e4 100644
--- a/src/pages/library/components/personList.vue
+++ b/src/pages/library/components/personList.vue
@@ -26,7 +26,7 @@
v-model="baseObject.enable"
active-color="#4E94FF"
inactive-color="#BBBBBB"
- style="margin-right: 25px"
+ style="margin-right: 10px"
:disabled="isDisabled(baseObject)"
@change="setEnable(baseObject)"
>
@@ -50,7 +50,6 @@
</div>
</div>
</el-row>
-
<div class="border-tabl">
<div class="head-search">
<div class="desc">
@@ -301,18 +300,6 @@
:total="BaseManageData.total"
></el-pagination>
</div>
- <!-- <div class="pt5" style="height: 40px; position: relative">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="refrash"
- :current-page="BaseManageData.page"
- :page-size="BaseManageData.size"
- :page-sizes="[10, 20, 50, 100]"
- style="position: absolute; right: 10px; bottom: 5px"
- layout="total,sizes,prev,pager,next,jumper"
- :total="BaseManageData.total"
- ></el-pagination>
- </div> -->
<el-dialog
title="鎶撴媿璇︽儏"
:visible.sync="cameraDetailVisible"
@@ -1123,7 +1110,6 @@
idCard: "",
reserved: "",
},
- showPop: true,
askDeleteShow: false,
toDeleteId: "",
reqCameraParams: {
@@ -1173,9 +1159,6 @@
],
},
tableData: [],
- // tableHeight: window.innerHeight - 320,
- // multipleSelection: [],
- // peoperLevel: [],
oldWidth: "",
oldHeight: "",
delType: "",
@@ -1293,11 +1276,9 @@
}
this.getPersonList();
})
- .catch((err) => {
- });
+ .catch((err) => {});
},
- sayHello() {
- },
+ sayHello() {},
getUploadResult(result) {
this.uploadResult = result.data;
this.dialogVisible = true;
@@ -1511,43 +1492,28 @@
data: fd,
});
if (res.data.success) {
- this.form.personPicUrl = res.data.data.personPicUrl;
+ this.form.persoasyncnPicUrl = res.data.data.personPicUrl;
this.form.faceFeature = res.data.data.faceFeature;
}
},
- uploadSuccess() {
- },
- uploadError() {
- },
- deleteBatch() {
- if (this.selectedRowKeys.length === 0) {
+ uploadSuccess() {},
+ uploadError() {},
+ async deleteBatch() {
+ let ids = [];
+ this.selectedRowKeys.map((item, index) => {
+ ids.push(item.id);
+ });
+ let res = await deleteBasePersons(ids);
+ if (res.success) {
this.$notify({
- type: "warning",
- message: "璇烽�夋嫨瑕佸垹闄ょ殑浜哄憳",
+ type: "success",
+ message: "鍒犻櫎鎴愬姛锛�",
});
+ this.getPersonList();
} else {
- this.$confirm("鎻愮ず锛氱‘瀹氬垹闄よ搴曞簱閫変腑浜哄憳锛�", {
- center: true,
- cancelButtonClass: "comfirm-class-cancle",
- confirmButtonClass: "comfirm-class-sure",
- }).then(async (_) => {
- let ids = [];
- this.selectedRowKeys.map((item, index) => {
- ids.push(item.id);
- });
- let res = await deleteBasePersons(ids);
- if (res.success) {
- this.$notify({
- type: "success",
- message: "鍒犻櫎鎴愬姛锛�",
- });
- this.getPersonList();
- } else {
- this.$notify({
- type: "error",
- message: "鍒犻櫎澶辫触锛�",
- });
- }
+ this.$notify({
+ type: "error",
+ message: "鍒犻櫎澶辫触锛�",
});
}
},
@@ -1566,11 +1532,11 @@
this.BaseManageData.queryPersonList();
}
},
- handleRowStyle({ row, rowIndex }) {
- if (rowIndex === 0) {
- return "background:#222222;";
- }
- },
+ // handleRowStyle({ row, rowIndex }) {
+ // if (rowIndex === 0) {
+ // return "background:#222222;";
+ // }
+ // },
blackAngWhite() {
if (this.BaseManageData.selectBlacks.length > 0) {
for (let i = 0; i < this.BaseManageData.whiteList.length; i++) {
@@ -1597,17 +1563,6 @@
}
}
},
- // tosearch(item) {
- // var curWwwPath = window.document.location.href;
- // var pathname = window.document.location.pathname;
- // var pos = curWwwPath.indexOf(pathname);
- // var localhostPath = curWwwPath.substring(0, pos); //ip+port
- // var href = localhostPath + "/Layout/Searching"
- // let captureId = item.id == "" ? item.personId : item.id
- // var url = item.personPicUrl ? item.personPicUrl : item.personPicUrl
- // var compType = 0
- // window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType)
- // },
tosearch(item) {
//let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id
let captureId = item.id == "" ? item.personId : item.id;
@@ -1829,8 +1784,8 @@
.el-button--mini {
padding: 10px 34px;
font-size: 14px;
- background:var(--colorCard) !important;
- border-color:var(--colorCard) !important;
+ background: var(--colorCard) !important;
+ border-color: var(--colorCard) !important;
width: 150px;
border-radius: 18px;
}
@@ -1889,7 +1844,7 @@
}
.iconshanchuku-09 {
color: #fe6d68;
- margin-right: 10px;
+ // margin-right: 10px;
}
.iconshanchuku-09:hover {
background: #fe6d68;
@@ -1901,7 +1856,7 @@
}
.iconbianjiku-09:hover {
border: 1px solidvar(--colorCard);
- background:var(--colorCard);
+ background: var(--colorCard);
color: #fff;
}
}
@@ -1944,8 +1899,8 @@
font-size: 14px;
}
.el-radio__input.is-checked .el-radio__inner {
- border-color:var(--colorCard);
- background:var(--colorCard);
+ border-color: var(--colorCard);
+ background: var(--colorCard);
}
.el-input--small {
@@ -1977,8 +1932,8 @@
padding: 11px 65px;
font-size: 14px;
border-radius: 18px;
- border-color:var(--colorCard) !important;
- background:var(--colorCard) !important;
+ border-color: var(--colorCard) !important;
+ background: var(--colorCard) !important;
color: #fff;
}
.cancel-btn {
@@ -2035,8 +1990,8 @@
}
.iconpiliangshanchu-09 {
color: #fe6d68;
- margin-right: 10px;
- margin-left: 20px;
+ // margin-right: 10px;
+ // margin-left: 20px;
}
.iconpiliangshanchu-09:hover {
background: #fe6d68;
@@ -2046,10 +2001,11 @@
.el-button--small {
padding: 8px 45px;
font-size: 14px;
- background:var(--colorCard) !important;
+ background: var(--colorCard) !important;
border-radius: 0px 18px 18px 0px;
- border-color:var(--colorCard) !important;
+ border-color: var(--colorCard) !important;
color: #fff;
+ margin-right: 10px;
}
.el-input__suffix {
top: 6px;
@@ -2102,13 +2058,16 @@
font-size: 15px;
}
}
+ .el-table::before {
+ visibility: hidden;
+ }
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
- background-color:var(--colorCard);
- border-color:var(--colorCard);
+ background-color: var(--colorCard);
+ border-color: var(--colorCard);
}
.el-checkbox__input.is-checked .el-checkbox__inner {
- background-color:var(--colorCard);
- border-color:var(--colorCard);
+ background-color: var(--colorCard);
+ border-color: var(--colorCard);
}
.el-table th.el-table__cell > .cell {
background: #f7f8fa;
@@ -2150,6 +2109,7 @@
text-align: center;
font-size: 23px;
transition: all 0.2s;
+ margin-left: 10px;
}
.el-dialog__header {
padding: 20px 0 10px;
@@ -2223,9 +2183,9 @@
padding: 8px 15px;
font-size: 14px;
border-radius: 3px;
- background:var(--colorCard) !important;
+ background: var(--colorCard) !important;
border-radius: 16px;
- border-color:var(--colorCard) !important;
+ border-color: var(--colorCard) !important;
width: 128px;
}
.el-input--mini .el-input__inner {
@@ -2293,7 +2253,7 @@
width: 150px;
}
.el-button--primary {
- background:var(--colorCard) !important;
+ background: var(--colorCard) !important;
padding: 9px 37px;
color: #fff;
border: 1px solidvar(--colorCard) !important;
@@ -2350,7 +2310,7 @@
width: 150px;
}
.el-button--primary {
- background:var(--colorCard) !important;
+ background: var(--colorCard) !important;
padding: 9px 37px;
color: #fff;
border: 1px solidvar(--colorCard) !important;
@@ -2402,8 +2362,8 @@
border-radius: 8px;
margin: 0 5px;
.el-checkbox__input.is-checked .el-checkbox__inner {
- background-color:var(--colorCard);
- border-color:var(--colorCard);
+ background-color: var(--colorCard);
+ border-color: var(--colorCard);
}
.el-checkbox {
width: 100%;
@@ -2463,7 +2423,7 @@
width: 150px;
}
.el-button--primary {
- background:var(--colorCard) !important;
+ background: var(--colorCard) !important;
padding: 9px 37px;
color: #fff;
border: 1px solidvar(--colorCard) !important;
@@ -2535,13 +2495,13 @@
}
.el-date-table td.start-date span,
.el-date-table td.end-date span {
- background-color:var(--colorCard);
+ background-color: var(--colorCard);
}
.el-date-table td.in-range div {
- background-color:var(--colorCard)17;
+ background-color: var(--colorCard) 17;
}
.el-button--default {
- background:var(--colorCard);
+ background: var(--colorCard);
padding: 9px 37px;
color: #fff;
border: 1px solidvar(--colorCard);
@@ -2573,7 +2533,7 @@
}
}
& > span:hover {
- background:var(--colorCard);
+ background: var(--colorCard);
color: #fff;
}
& > .del-wrap:hover {
diff --git a/src/pages/library/index/App.vue b/src/pages/library/index/App.vue
index 1c21c31..9d294ea 100644
--- a/src/pages/library/index/App.vue
+++ b/src/pages/library/index/App.vue
@@ -28,6 +28,9 @@
<car-list
ref="carList"
:baseObject="baseObject"
+ @changeShow="changeToAdd"
+ @onDelete="initBaseList"
+ :syncType="syncType"
v-show="showType == 'car'"
></car-list>
</div>
@@ -74,12 +77,6 @@
};
},
methods: {
- clearSelect1() {
- this.$refs.baseLocal.categoryIndex = -1;
- },
- clearSelect2() {
- this.$refs.baseSync.categoryIndex = -1;
- },
getPersonList(item,type) {
this.baseObject = item;
this.baseForEdit = item;
@@ -152,7 +149,6 @@
.s-base-manage {
box-sizing: border-box;
background-color: #e9ebf2;
- // min-width: 1315px;
height: 100%;
.el-collapse {
border: none;
@@ -178,7 +174,6 @@
position: relative;
background: #fff;
box-sizing: border-box;
- // border-right: 1px solid #e0e0e0;
}
.resize-save {
position: absolute;
diff --git a/src/pages/library/index/main.ts b/src/pages/library/index/main.ts
index cadf456..e9b4233 100644
--- a/src/pages/library/index/main.ts
+++ b/src/pages/library/index/main.ts
@@ -3,7 +3,7 @@
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
-import "@/assets/css/element-variables.scss";
+// import "@/assets/css/element-variables.scss";
import moment from "moment";
Vue.prototype.$moment = moment;
--
Gitblit v1.8.0