6个文件已删除
16个文件已添加
11个文件已修改
| | |
| | | }) |
| | | } |
| | | |
| | | export const getAuthInfo = () => { |
| | | return request({ |
| | | url: "/data/api-v/sysset/showAuthInfo", |
| | | method: "get" |
| | | }) |
| | | } |
| | | |
| | | export const setAuthInfo = (data: any) => { |
| | | return request({ |
| | | url: "/data/api-v/sysset/setAuthInfo", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | |
| | | :extension="extension" |
| | | :file-category="fileCategory" |
| | | > |
| | | <div class="uploader-file-progress" :class="progressingClass" :style="progressStyle"></div> |
| | | <div |
| | | class="uploader-file-progress" |
| | | :class="progressingClass" |
| | | :style="progressStyle" |
| | | ></div> |
| | | <div class="uploader-file-info"> |
| | | <div class="uploader-file-name"> |
| | | <i class="uploader-file-icon" :icon="fileCategory"></i> |
| | | {{file.name}} |
| | | {{ file.name }} |
| | | </div> |
| | | <div class="uploader-file-size">{{formatedSize}}</div> |
| | | <div class="uploader-file-size">{{ formatedSize }}</div> |
| | | <div class="uploader-file-meta"></div> |
| | | <div class="uploader-file-status"> |
| | | <span v-show="status !== 'uploading'">{{statusText}}</span> |
| | | <span v-show="status !== 'uploading'">{{ statusText }}</span> |
| | | <span v-show="status === 'uploading'"> |
| | | <span>{{progressStyle.progress}}</span> |
| | | <em>{{formatedAverageSpeed}}</em> |
| | | <span>{{ progressStyle.progress }}</span> |
| | | <em>{{ formatedAverageSpeed }}</em> |
| | | |
| | | <i> {{formatedTimeRemaining}}</i> |
| | | <i> {{ formatedTimeRemaining }}</i> |
| | | </span> |
| | | </div> |
| | | <div class="uploader-file-actions"> |
| | | <span class="uploader-file-pause" @click="pause"></span> |
| | | <span class="uploader-file-resume" @click="resume">ï¸</span> |
| | | <span class="uploader-file-retry" @click="retry"></span> |
| | | <span class="uploader-file-remove" @click="remove"></span> |
| | | <el-tooltip effect="dark" content="éæ°ä¸ä¼ " placement="bottom"> |
| | | <span class="uploader-file-retry" @click="retry"></span> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="å é¤" placement="bottom"> |
| | | <span class="uploader-file-remove" @click="remove"></span> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | </slot> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Uploader from 'simple-uploader.js' |
| | | import events from './common/file-events' |
| | | import { secondsToStr } from './common/utils' |
| | | import Uploader from "simple-uploader.js"; |
| | | import events from "./common/file-events"; |
| | | import { secondsToStr } from "./common/utils"; |
| | | |
| | | const COMPONENT_NAME = 'uploader-file' |
| | | const COMPONENT_NAME = "uploader-file"; |
| | | |
| | | export default { |
| | | name: COMPONENT_NAME, |
| | |
| | | file: { |
| | | type: Object, |
| | | default() { |
| | | return {} |
| | | } |
| | | return {}; |
| | | }, |
| | | }, |
| | | list: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | default: false, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | isComplete: false, |
| | | isUploading: false, |
| | | size: 0, |
| | | formatedSize: '', |
| | | formatedSize: "", |
| | | uploadedSize: 0, |
| | | progress: 0, |
| | | timeRemaining: 0, |
| | | type: '', |
| | | extension: '', |
| | | progressingClass: '' |
| | | } |
| | | type: "", |
| | | extension: "", |
| | | progressingClass: "", |
| | | }; |
| | | }, |
| | | computed: { |
| | | fileCategory() { |
| | | const extension = this.extension |
| | | const isFolder = this.file.isFolder |
| | | let type = isFolder ? 'folder' : 'unknown' |
| | | const categoryMap = this.file.uploader.opts.categoryMap |
| | | const extension = this.extension; |
| | | const isFolder = this.file.isFolder; |
| | | let type = isFolder ? "folder" : "unknown"; |
| | | const categoryMap = this.file.uploader.opts.categoryMap; |
| | | const typeMap = categoryMap || { |
| | | image: ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp'], |
| | | video: ['mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv'], |
| | | audio: ['mp3', 'wav', 'wma', 'ogg', 'aac', 'flac'], |
| | | document: ['doc', 'txt', 'docx', 'pages', 'epub', 'pdf', 'numbers', 'csv', 'xls', 'xlsx', 'keynote', 'ppt', 'pptx'] |
| | | } |
| | | image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"], |
| | | video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"], |
| | | audio: ["mp3", "wav", "wma", "ogg", "aac", "flac"], |
| | | document: [ |
| | | "doc", |
| | | "txt", |
| | | "docx", |
| | | "pages", |
| | | "epub", |
| | | "pdf", |
| | | "numbers", |
| | | "csv", |
| | | "xls", |
| | | "xlsx", |
| | | "keynote", |
| | | "ppt", |
| | | "pptx", |
| | | ], |
| | | }; |
| | | Object.keys(typeMap).forEach((_type) => { |
| | | const extensions = typeMap[_type] |
| | | const extensions = typeMap[_type]; |
| | | if (extensions.indexOf(extension) > -1) { |
| | | type = _type |
| | | type = _type; |
| | | } |
| | | }) |
| | | return type |
| | | }); |
| | | return type; |
| | | }, |
| | | progressStyle() { |
| | | const progress = Math.floor(this.progress * 100) |
| | | const style = `translateX(${Math.floor(progress - 100)}%)` |
| | | const progress = Math.floor(this.progress * 100); |
| | | const style = `translateX(${Math.floor(progress - 100)}%)`; |
| | | return { |
| | | progress: `${progress}%`, |
| | | webkitTransform: style, |
| | | mozTransform: style, |
| | | msTransform: style, |
| | | transform: style |
| | | } |
| | | transform: style, |
| | | }; |
| | | }, |
| | | formatedAverageSpeed() { |
| | | return `${Uploader.utils.formatSize(this.averageSpeed)} / s` |
| | | return `${Uploader.utils.formatSize(this.averageSpeed)} / s`; |
| | | }, |
| | | status() { |
| | | const isUploading = this.isUploading |
| | | const isComplete = this.isComplete |
| | | const isError = this.error |
| | | const paused = this.paused |
| | | const isUploading = this.isUploading; |
| | | const isComplete = this.isComplete; |
| | | const isError = this.error; |
| | | const paused = this.paused; |
| | | if (isComplete) { |
| | | return 'success' |
| | | return "success"; |
| | | } else if (isError) { |
| | | return 'error' |
| | | return "error"; |
| | | } else if (isUploading) { |
| | | return 'uploading' |
| | | return "uploading"; |
| | | } else if (paused) { |
| | | return 'paused' |
| | | return "paused"; |
| | | } else { |
| | | return 'waiting' |
| | | return "waiting"; |
| | | } |
| | | }, |
| | | statusText() { |
| | | const status = this.status |
| | | const fileStatusText = this.file.uploader.fileStatusText |
| | | let txt = status |
| | | if (typeof fileStatusText === 'function') { |
| | | txt = fileStatusText(status, this.response) |
| | | const status = this.status; |
| | | const fileStatusText = this.file.uploader.fileStatusText; |
| | | let txt = status; |
| | | if (typeof fileStatusText === "function") { |
| | | txt = fileStatusText(status, this.response); |
| | | } else { |
| | | txt = fileStatusText[status] |
| | | txt = fileStatusText[status]; |
| | | } |
| | | return txt || status |
| | | return txt || status; |
| | | }, |
| | | formatedTimeRemaining() { |
| | | const timeRemaining = this.timeRemaining |
| | | const file = this.file |
| | | const timeRemaining = this.timeRemaining; |
| | | const file = this.file; |
| | | if (timeRemaining === Number.POSITIVE_INFINITY || timeRemaining === 0) { |
| | | return '' |
| | | return ""; |
| | | } |
| | | let parsedTimeRemaining = secondsToStr(timeRemaining) |
| | | const parseTimeRemaining = file.uploader.opts.parseTimeRemaining |
| | | let parsedTimeRemaining = secondsToStr(timeRemaining); |
| | | const parseTimeRemaining = file.uploader.opts.parseTimeRemaining; |
| | | if (parseTimeRemaining) { |
| | | parsedTimeRemaining = parseTimeRemaining(timeRemaining, parsedTimeRemaining) |
| | | parsedTimeRemaining = parseTimeRemaining( |
| | | timeRemaining, |
| | | parsedTimeRemaining |
| | | ); |
| | | } |
| | | return parsedTimeRemaining |
| | | } |
| | | return parsedTimeRemaining; |
| | | }, |
| | | }, |
| | | watch: { |
| | | status(newStatus, oldStatus) { |
| | | if (oldStatus && newStatus === 'uploading' && oldStatus !== 'uploading') { |
| | | if (oldStatus && newStatus === "uploading" && oldStatus !== "uploading") { |
| | | this.tid = setTimeout(() => { |
| | | this.progressingClass = 'uploader-file-progressing' |
| | | }, 200) |
| | | this.progressingClass = "uploader-file-progressing"; |
| | | }, 200); |
| | | } else { |
| | | clearTimeout(this.tid) |
| | | this.progressingClass = '' |
| | | clearTimeout(this.tid); |
| | | this.progressingClass = ""; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | _actionCheck() { |
| | | this.paused = this.file.paused |
| | | this.error = this.file.error |
| | | this.isUploading = this.file.isUploading() |
| | | this.paused = this.file.paused; |
| | | this.error = this.file.error; |
| | | this.isUploading = this.file.isUploading(); |
| | | }, |
| | | pause() { |
| | | this.file.pause() |
| | | this._actionCheck() |
| | | this._fileProgress() |
| | | this.file.pause(); |
| | | this._actionCheck(); |
| | | this._fileProgress(); |
| | | }, |
| | | resume() { |
| | | this.file.resume() |
| | | this._actionCheck() |
| | | this.file.resume(); |
| | | this._actionCheck(); |
| | | }, |
| | | remove() { |
| | | this.file.cancel() |
| | | this.file.cancel(); |
| | | }, |
| | | retry() { |
| | | this.file.retry() |
| | | this._actionCheck() |
| | | this.file.retry(); |
| | | this._actionCheck(); |
| | | }, |
| | | processResponse(message) { |
| | | let res = message |
| | | let res = message; |
| | | try { |
| | | res = JSON.parse(message) |
| | | } catch (e) { } |
| | | this.response = res |
| | | res = JSON.parse(message); |
| | | } catch (e) {} |
| | | this.response = res; |
| | | }, |
| | | fileEventsHandler(event, args) { |
| | | const rootFile = args[0] |
| | | const file = args[1] |
| | | const target = this.list ? rootFile : file |
| | | const rootFile = args[0]; |
| | | const file = args[1]; |
| | | const target = this.list ? rootFile : file; |
| | | if (this.file === target) { |
| | | if (this.list && event === 'fileSuccess') { |
| | | this.processResponse(args[2]) |
| | | return |
| | | if (this.list && event === "fileSuccess") { |
| | | this.processResponse(args[2]); |
| | | return; |
| | | } |
| | | this[`_${event}`].apply(this, args) |
| | | this[`_${event}`].apply(this, args); |
| | | } |
| | | }, |
| | | _fileProgress() { |
| | | this.progress = this.file.progress() |
| | | this.averageSpeed = this.file.averageSpeed |
| | | this.currentSpeed = this.file.currentSpeed |
| | | this.timeRemaining = this.file.timeRemaining() |
| | | this.uploadedSize = this.file.sizeUploaded() |
| | | this._actionCheck() |
| | | this.progress = this.file.progress(); |
| | | this.averageSpeed = this.file.averageSpeed; |
| | | this.currentSpeed = this.file.currentSpeed; |
| | | this.timeRemaining = this.file.timeRemaining(); |
| | | this.uploadedSize = this.file.sizeUploaded(); |
| | | this._actionCheck(); |
| | | }, |
| | | _fileSuccess(rootFile, file, message) { |
| | | if (rootFile) { |
| | | this.processResponse(message) |
| | | this.processResponse(message); |
| | | } |
| | | this._fileProgress() |
| | | this.error = false |
| | | this.isComplete = true |
| | | this.isUploading = false |
| | | console.log('rootFile, file, message', rootFile, file, message) |
| | | this._fileProgress(); |
| | | this.error = false; |
| | | this.isComplete = true; |
| | | this.isUploading = false; |
| | | console.log("rootFile, file, message", rootFile, file, message); |
| | | }, |
| | | _fileComplete() { |
| | | this._fileSuccess() |
| | | this._fileSuccess(); |
| | | }, |
| | | _fileError(rootFile, file, message) { |
| | | this._fileProgress() |
| | | console.log('rootFile, file, message', rootFile, file, message) |
| | | this.processResponse(message) |
| | | this.error = true |
| | | this.isComplete = false |
| | | this.isUploading = false |
| | | } |
| | | this._fileProgress(); |
| | | console.log("rootFile, file, message", rootFile, file, message); |
| | | this.processResponse(message); |
| | | this.error = true; |
| | | this.isComplete = false; |
| | | this.isUploading = false; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | const staticProps = ['paused', 'error', 'averageSpeed', 'currentSpeed'] |
| | | const staticProps = ["paused", "error", "averageSpeed", "currentSpeed"]; |
| | | const fnProps = [ |
| | | 'isComplete', |
| | | 'isUploading', |
| | | "isComplete", |
| | | "isUploading", |
| | | { |
| | | key: 'size', |
| | | fn: 'getSize' |
| | | key: "size", |
| | | fn: "getSize", |
| | | }, |
| | | { |
| | | key: 'formatedSize', |
| | | fn: 'getFormatSize' |
| | | key: "formatedSize", |
| | | fn: "getFormatSize", |
| | | }, |
| | | { |
| | | key: 'uploadedSize', |
| | | fn: 'sizeUploaded' |
| | | key: "uploadedSize", |
| | | fn: "sizeUploaded", |
| | | }, |
| | | 'progress', |
| | | 'timeRemaining', |
| | | "progress", |
| | | "timeRemaining", |
| | | { |
| | | key: 'type', |
| | | fn: 'getType' |
| | | key: "type", |
| | | fn: "getType", |
| | | }, |
| | | { |
| | | key: 'extension', |
| | | fn: 'getExtension' |
| | | } |
| | | ] |
| | | staticProps.forEach(prop => { |
| | | this[prop] = this.file[prop] |
| | | }) |
| | | key: "extension", |
| | | fn: "getExtension", |
| | | }, |
| | | ]; |
| | | staticProps.forEach((prop) => { |
| | | this[prop] = this.file[prop]; |
| | | }); |
| | | fnProps.forEach((fnProp) => { |
| | | if (typeof fnProp === 'string') { |
| | | this[fnProp] = this.file[fnProp]() |
| | | if (typeof fnProp === "string") { |
| | | this[fnProp] = this.file[fnProp](); |
| | | } else { |
| | | this[fnProp.key] = this.file[fnProp.fn]() |
| | | this[fnProp.key] = this.file[fnProp.fn](); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | const handlers = this._handlers = {} |
| | | const handlers = (this._handlers = {}); |
| | | const eventHandler = (event) => { |
| | | handlers[event] = (...args) => { |
| | | this.fileEventsHandler(event, args) |
| | | } |
| | | return handlers[event] |
| | | } |
| | | this.fileEventsHandler(event, args); |
| | | }; |
| | | return handlers[event]; |
| | | }; |
| | | events.forEach((event) => { |
| | | this.file.uploader.on(event, eventHandler(event)) |
| | | }) |
| | | this.file.uploader.on(event, eventHandler(event)); |
| | | }); |
| | | }, |
| | | destroyed() { |
| | | events.forEach((event) => { |
| | | this.file.uploader.off(event, this._handlers[event]) |
| | | }) |
| | | this._handlers = null |
| | | } |
| | | } |
| | | this.file.uploader.off(event, this._handlers[event]); |
| | | }); |
| | | this._handlers = null; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <div class="desc-2">çæ¬ {{ item.version }}</div>
|
| | | </div>
|
| | | <div class="right-icon">
|
| | | <span class="icon iconfont"></span>
|
| | | <el-tooltip effect="dark" content="ä¸è½½" placement="bottom">
|
| | | <span class="icon iconfont"></span>
|
| | | </el-tooltip>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <detailPage
|
| | | :detailProductID="detailProductID"
|
| | | :detailType="detailType"
|
| | | :detailPrice="detailPrice"
|
| | | v-if="inDetail"
|
| | | @flushSdk="getAllSdk"
|
| | | @flushApp="getAllApps"
|
| | |
| | | showUpload: false,
|
| | | detailType: "",
|
| | | detailProductID: "",
|
| | | detailPrice: "",
|
| | | buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
|
| | | activeName: "åºç¨ä¸å¿",
|
| | | patchUpdateStatus: "",
|
| | |
| | | checkDetail(item, typ) {
|
| | | this.inDetail = true;
|
| | | this.detailProductID = item.id;
|
| | | this.detailPrice = item.price;
|
| | | if (typ) {
|
| | | this.detailType = typ;
|
| | | } else {
|
| | |
| | | version: res.data.apps[0].version,
|
| | | productName: res.data.productName,
|
| | | installContent: res.data.apps[0].installContent,
|
| | | |
| | | };
|
| | | }
|
| | | if (res.data.sdks.length > 0) {
|
| | |
| | | min-width: 100px;
|
| | | text-align: end;
|
| | | position: absolute;
|
| | | right: 0; width: 120px;
|
| | | right: 0;
|
| | | width: 120px;
|
| | | margin-top: 2px;
|
| | | }
|
| | | .rocket-icon {
|
| | |
| | | <el-button
|
| | | size="mini"
|
| | | round
|
| | | v-if="!isActive && showInstallNotActive"
|
| | | v-if="!isActive && (!detailPrice || showInstallNotActive)"
|
| | | @click="downloadSdkInSide"
|
| | | >å®è£
</el-button
|
| | | >
|
| | |
| | | clearable
|
| | | :autofocus="true"
|
| | | v-model="activeCode"
|
| | | v-if="!isActive && !showInstallNotActive"
|
| | | v-if="!isActive && !showInstallNotActive && detailPrice"
|
| | | >
|
| | | </el-input>
|
| | | <el-button
|
| | | size="mini"
|
| | | round
|
| | | class="act-btn"
|
| | | v-if="!isActive && !showInstallNotActive"
|
| | | v-if="!isActive && !showInstallNotActive && detailPrice"
|
| | | @click="actived"
|
| | | >æ¿æ´»</el-button
|
| | | >
|
| | |
| | | > -->
|
| | | </div>
|
| | | </div>
|
| | | <div class="back-btn" @click="goback">
|
| | | <!-- <div class="back-btn" @click="goback">
|
| | | <span class="icon iconfont"></span>
|
| | | <span class="back-text">è¿å</span>
|
| | | </div>
|
| | | </div> -->
|
| | | </div>
|
| | | <div class="text-area">
|
| | | <div class="text-line">
|
| | | <span class="icon iconfont" ></span>
|
| | | <span class="icon iconfont"></span>
|
| | | <span class="title">çæ¬ï¼</span>
|
| | | <span class="desc">{{ productDetail.productVersion }}</span>
|
| | | </div>
|
| | |
| | | class="rec-item"
|
| | | v-for="(item, index) in otherProducts"
|
| | | :key="index"
|
| | | @click="checkInWindow(item)"
|
| | | @click="checkInWindow(item)"
|
| | | >
|
| | | <div class="icon-img">
|
| | | <img
|
| | |
| | | <el-button
|
| | | size="small"
|
| | | type="primary"
|
| | | |
| | | round
|
| | | @click="checkInWindow(item)"
|
| | | >æ¥ç</el-button
|
| | |
| | | detailProductID: {
|
| | | type: String,
|
| | | },
|
| | | detailPrice: {},
|
| | | },
|
| | | directives: {
|
| | | focus: {
|
| | |
| | | this.autoRefreshAppAndSdkState();
|
| | | this.getUnActivedList();
|
| | | this.getUnActivedAppList();
|
| | | this.showBackBtn();
|
| | | this.addBackListener();
|
| | | },
|
| | | beforeDestroy() {
|
| | | this.autoRefresh = false;
|
| | | this.hiddenBackBtn();
|
| | | },
|
| | | methods: {
|
| | | getDetail(id) {
|
| | | getAppDetail({ id: id || this.detailProductID })
|
| | | .then((res) => {
|
| | | if (res.success) {
|
| | | console.log("----------");
|
| | | console.log(res);
|
| | | this.productDetail = res.data.detail;
|
| | | this.otherProducts = res.data.randoms;
|
| | |
|
| | |
| | | if (res && res.success) {
|
| | | app.unloadLoading = false;
|
| | | // _this.getAllApps();
|
| | | this.$emit("flushApp")
|
| | | this.$emit("flushApp");
|
| | | window.parent.postMessage(
|
| | | {
|
| | | msg: "AppUpdate",
|
| | |
| | | message: "å¸è½½åºç¨æå",
|
| | | type: "success",
|
| | | });
|
| | | this.goback()
|
| | | this.goback();
|
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | |
| | | sdk.unloadLoading = false;
|
| | | this.$notify.success("å¸è½½å®æ");
|
| | | // _this.getAllSdk();
|
| | | this.$emit("flushSdk")
|
| | | this.$emit("flushSdk");
|
| | | window.parent.postMessage({ msg: "AppUpdate" }, "*");
|
| | | this.goback()
|
| | | this.goback();
|
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | |
| | | inputBlur(item) {
|
| | | this.$set(item, "isEdit", false);
|
| | | },
|
| | | autoRefreshAppAndSdkState() {
|
| | | autoRefreshAppAndSdkState() {
|
| | | this.getAllApps();
|
| | | this.getAllSdk();
|
| | | if (!this.autoRefresh) {
|
| | |
| | | this.getAllSdk();
|
| | | }
|
| | | }, 1000);
|
| | | },
|
| | | showBackBtn() {
|
| | | window.parent.postMessage(
|
| | | {
|
| | | msg: "showBack",
|
| | | },
|
| | | "*"
|
| | | );
|
| | | },
|
| | | hiddenBackBtn() {
|
| | | window.parent.postMessage(
|
| | | {
|
| | | msg: "hiddenBack",
|
| | | },
|
| | | "*"
|
| | | );
|
| | | },
|
| | | addBackListener() {
|
| | | window.addEventListener("message", (e) => {
|
| | | if (e.data.msg === "è¿ååºç¨ä¸å¿") {
|
| | | this.goback();
|
| | | }
|
| | | });
|
| | | },
|
| | | },
|
| | | };
|
| | |
| | | height: 25px;
|
| | | .icon {
|
| | | font-size: 14px;
|
| | | margin-right: 4px;
|
| | |
|
| | | margin-right: 4px;
|
| | | }
|
| | | .title {
|
| | | font-size: 12px;
|
| | |
| | | margin-bottom: 10px;
|
| | |
|
| | | .title {
|
| | | width: 80px;
|
| | | height: 20px;
|
| | | display: inline-block;
|
| | | line-height: 20px;
|
| | | padding: 0px 10px;
|
| | | letter-spacing: 0.5px;
|
| | | font-size: 12px;
|
| | | color: #828282;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | | font-weight: bold;
|
| | | border: 1px solid;
|
| | | border: 1px solid #e0e0e0;
|
| | | box-sizing: border-box;
|
| | | border-radius: 22px;
|
| | |
| | | font-size: 14px;
|
| | | font-weight: bold;
|
| | | line-height: 28px;
|
| | | width: 116px;
|
| | | height: 28px;
|
| | | letter-spacing: 0.1px;
|
| | | color: #4f4f4f;
|
| | |
|
| | | overflow: hidden;
|
| | | white-space: nowrap;
|
| | | text-overflow: ellipsis;
|
| | | }
|
| | | .desc-2 {
|
| | | font-size: 12px;
|
| | |
| | | .el-button {
|
| | | padding: 3px 12px;
|
| | | border-radius: 22px;
|
| | | background-color: #f2f2f7 !important;
|
| | | border-color: #f2f2f7 !important;
|
| | | color: #4f4f4f;
|
| | | font-size: 12px;
|
| | | font-weight: bold;
|
| | | background-color: #f2f2f7 !important;
|
| | | border-color: #f2f2f7 !important;
|
| | | color: #4f4f4f;
|
| | | font-size: 12px;
|
| | | font-weight: bold;
|
| | | }
|
| | | // .el-button--primary:hover {
|
| | | // background: #089fb3 !important;
|
| | |
| | | data: Object, |
| | | }, |
| | | created() { |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "showBack") { |
| | | this.isShowBack = true; |
| | | } |
| | | }); |
| | | this.addBackListener(); |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | //return false; |
| | | }, |
| | | |
| | | // èåæ è¿å |
| | | back() { |
| | | let active = this.$store.state.desktop.minDocks; |
| | | active = active.filter((item) => item.highlight); |
| | | console.log(`è¿å${active.alt}`); |
| | | console.log(active); |
| | | const iframeArr = document.querySelectorAll("iframe"); |
| | | iframeArr.forEach((item) => { |
| | | item.contentWindow.postMessage({ msg: `è¿å${active[0].alt}` }, "*"); |
| | | }); |
| | | }, |
| | | // æ·»å è¿åæé®ç¸å
³çå¬ |
| | | addBackListener() { |
| | | //æ¾ç¤ºè¿åæé® |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "showBack") { |
| | | this.isShowBack = true; |
| | | } |
| | | }); |
| | | //éèè¿åæé® |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "hiddenBack") { |
| | | this.isShowBack = false; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | directives: { |
| | | drag(el, binding) { |
| | |
| | | ref="joinForm"
|
| | | class="join-form"
|
| | | >
|
| | | <!-- ææç®¡çæ¹å¼ -->
|
| | | <el-form-item>
|
| | | <div class="row">
|
| | | <div class="item-title">è®¾å¤ææç®¡çæ¹å¼</div>
|
| | | <div class="inputContain">
|
| | | <el-select
|
| | | v-model="settingForm.authorizationType"
|
| | | v-model="settingForm.need_auth_pwd"
|
| | | placeholder="è¯·éæ©"
|
| | | size="small"
|
| | | :popper-append-to-body="false"
|
| | |
| | | </div>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item prop="password" v-if="settingForm.authorizationType == 1">
|
| | | <!-- ææå¯ç -->
|
| | | <el-form-item prop="auth_pwd" v-if="settingForm.need_auth_pwd == 1">
|
| | | <div class="row">
|
| | | <div class="item-title">ææå¯é¥</div>
|
| | | <div class="inputContain">
|
| | | <el-input
|
| | | v-model="settingForm.password"
|
| | | v-model="settingForm.auth_pwd"
|
| | | placeholder="请è¾å
¥6使æå¯é¥"
|
| | | maxlength="6"
|
| | | show-password
|
| | | show-auth_pwd
|
| | | ></el-input>
|
| | | </div>
|
| | | </div>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | | <div class="save">ä¿å</div>
|
| | | <div class="save" @click="submit">ä¿å</div>
|
| | | </div>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { getAuthInfo, setAuthInfo } from "@/api/system";
|
| | |
|
| | | export default {
|
| | | created() {
|
| | | this.getAuth();
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | settingForm: {
|
| | | authorizationType: 0,
|
| | | password: "",
|
| | | need_auth_pwd: 0, //ææç®¡çæ¹å¼
|
| | | auth_pwd: "", //ææå¯é¥
|
| | | id: "", //设å¤id
|
| | | },
|
| | | typeOptions: [
|
| | | {
|
| | |
| | | label: "å¯ç æ ¡éª",
|
| | | value: 1,
|
| | | },
|
| | | ],
|
| | | ], //ææç®¡çæ¹å¼é项
|
| | | rules: {
|
| | | password: [
|
| | | auth_pwd: [
|
| | | { min: 6, max: 6, message: "é¿åº¦ä¸º6个å符", trigger: "blur" },
|
| | | ],
|
| | | },
|
| | | }, //æ£åæ ¡éª
|
| | | };
|
| | | },
|
| | | methods: {
|
| | | //è·åææä¿¡æ¯
|
| | | async getAuth() {
|
| | | const res = await getAuthInfo();
|
| | | if (res.code === 200 && res.success) {
|
| | | //æææ°æ®åå¡«
|
| | | this.settingForm = res.data;
|
| | | } else {
|
| | | this.$notify.error({
|
| | | title: "é误",
|
| | | message: "è·åææä¿¡æ¯å¤±è´¥",
|
| | | });
|
| | | }
|
| | | },
|
| | | //æäº¤ææé
ç½®
|
| | | async submit() {
|
| | | const res = await setAuthInfo(this.settingForm);
|
| | | if (res.code === 200 && res.success) {
|
| | | this.$notify.success({
|
| | | title: "æå",
|
| | | message: "ä¿®æ¹æå",
|
| | | });
|
| | | } else {
|
| | | this.$notify.error({
|
| | | title: "é误",
|
| | | message: "ä¿®æ¹å¤±è´¥",
|
| | | });
|
| | | }
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | |
| | | let color = localStorage.getItem("--colorCard"); |
| | | if (color) { |
| | | document.documentElement.style.setProperty("--colorCard", `${color}`); |
| | |
| | | clearInterval(this.browserTimer); |
| | | }, |
| | | mounted() { |
| | | // è¿åæé®åè° |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "è¿åç³»ç»è®¾ç½®") { |
| | | this.showWelcome = true; |
| | |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | showWelcome(newVal) { |
| | | if (newVal) { |
| | | // éèè¿åææé® |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "hiddenBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } else { |
| | | //æ¾ç¤ºè¿åæé® |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | };
|
| | | const checkID = (rule, value, callback) => {
|
| | | if (!value) {
|
| | | return callback(new Error("å¯ç ä¸è½ä¸ºç©º"));
|
| | | return callback(new Error("IDä¸è½ä¸ºç©º"));
|
| | | }
|
| | | };
|
| | | return {
|
| | |
| | | step-strictly
|
| | | size="small"
|
| | | ></el-input-number
|
| | | > s -->
|
| | |
|
| | | <el-input-number
|
| | | v-model="min_len"
|
| | | @change="fakeObj.min = +(min_len / 1.2)"
|
| | | :min="5"
|
| | | :step="5"
|
| | | :max="120"
|
| | | step-strictly
|
| | | size="small"
|
| | | ></el-input-number
|
| | | > s
|
| | | </div>
|
| | | </div>
|
| | |
| | | style="cursor: pointer"
|
| | | >{{ playSpan }}</span
|
| | | >
|
| | | <!-- <span class="iconfont" v-else style="cursor: pointer">{{
|
| | | playSpan2
|
| | | }}</span> -->
|
| | |
|
| | | <img
|
| | | v-else
|
| | | src="/images/settings/æå.png"
|
| | |
| | | margin-top: 15px;
|
| | | "
|
| | | />
|
| | | <!-- |
| | | <i
|
| | | v-if="!item.isPlay"
|
| | | class="el-icon-video-play"
|
| | | style=""
|
| | | ></i>
|
| | | <i v-else class="el-icon-video-pause"></i> -->
|
| | | </span>
|
| | | <span
|
| | | class="icon iconfont del"
|
| | |
| | | <div class="top-title">徿 主é¢</div>
|
| | | <div class="icon-bar" style="cursor: pointer" @click="selectIcons(0)">
|
| | | <div class="bar-title">
|
| | | <span class="title">æå¹³åå®å¾æ </span>
|
| | | <span class="title">颿§é£æ ¼</span>
|
| | | <span
|
| | | class="icon iconfont"
|
| | | :class="activeIcons == 0 ? 'icon-active' : 'icon-normal'"
|
| | |
| | | </div>
|
| | | <div class="icon-bar" style="cursor: pointer" @click="selectIcons(1)">
|
| | | <div class="bar-title">
|
| | | <span class="title">æå¹³å徿 </span>
|
| | | <span class="title">ç®çº¦é£æ ¼</span>
|
| | | <span
|
| | | class="icon iconfont"
|
| | | :class="activeIcons == 1 ? 'icon-active' : 'icon-normal'"
|
| | |
| | | },
|
| | | isPlay: false,
|
| | | realIconList: [
|
| | | { url: "/images/settings/æ¥å¿ç®¡ç.png", color: "green" },
|
| | | { url: "/images/settings/宿¶çæ§.png", color: "yellow" },
|
| | | { url: "/images/settings/æ°æ®å¯è§å.png", color: "pink" },
|
| | | { url: "/images/settings/颿§å¾æ /1ä»°å§æ£æµ.png" },
|
| | | { url: "/images/settings/颿§å¾æ /2个ä½éæ¢.png" },
|
| | | { url: "/images/settings/颿§å¾æ /3å®å
¨è¦æ.png" },
|
| | | { url: "/images/settings/颿§å¾æ /4å®å
¨å¸½æ£æµ.png" },
|
| | | { url: "/images/settings/颿§å¾æ /5å¥è·.png" },
|
| | | { url: "/images/settings/颿§å¾æ /6è½¦è¾æ£æµ.png" },
|
| | | { url: "/images/settings/颿§å¾æ /7æ½ç.png" },
|
| | | ],
|
| | | flatIconList: [
|
| | | { url: "/images/settings/æ°æ®æ¨é.png" },
|
| | | { url: "/images/settings/æ°æ®æ é
ç½®.png" },
|
| | | { url: "/images/settings/ç³»ç»è®¾ç½®.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /1ä»°å§æ£æµ.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /2个ä½éæ¢.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /3å®å
¨è¦æ.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /4å®å
¨å¸½æ£æµ.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /5å¥è·.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /6è½¦è¾æ£æµ.png" },
|
| | | { url: "/images/settings/ç®çº¦å¾æ /7æ½ç.png" },
|
| | | ],
|
| | | tableBGList: [
|
| | | { name: "background", url: "/images/desktop/background.png" },
|
| | |
| | | });
|
| | | const url = this.curUser.backgroundpic;
|
| | | this.activeIcons = this.curUser.useIconType - 1;
|
| | | this.universalColor = this.colorList.findIndex(
|
| | | (x) => x.color == localStorage.getItem("--colorCard")
|
| | | );
|
| | | this.activeBg = url ? this.tableBGList.findIndex((x) => x.url == url) : 0;
|
| | | this.universalColor = this.colorList.findIndex((x) => {
|
| | | return x.color == localStorage.getItem("--colorCard");
|
| | | });
|
| | | if (url) {
|
| | | this.activeBg = this.tableBGList.findIndex((x) => {
|
| | | return x.url == url;
|
| | | });
|
| | | } else {
|
| | | this.activeBg = 0;
|
| | | }
|
| | | const e = this.$refs.curPage;
|
| | | e.addEventListener("click", (e) => {
|
| | | if (this.showUpload) {
|
| | |
| | | }).then((res) => {
|
| | | if (res.success) {
|
| | | sessionStorage.setItem("userInfo", JSON.stringify(res.data));
|
| | | debugger;
|
| | | this.$message.success(res.msg);
|
| | | }
|
| | | });
|
| | |
| | | font-weight: 700;
|
| | | margin-top: 20px;
|
| | | }
|
| | |
|
| | | /* .icon-bar:hover {
|
| | | background-color: rgba(233, 233, 233, 1);
|
| | | } */
|
| | | .color-bar {
|
| | | display: flex;
|
| | | justify-content: center;
|
| | |
| | | components: { |
| | | systemClean, |
| | | updateSettings, |
| | | BackUp, |
| | | BackUp, |
| | | restartSettings, |
| | | sysInfo, |
| | | }, |
| | |
| | | img_white: "/images/vindicate/ç³»ç»æ¸
ç-ç½.png", |
| | | img_welcome: "/images/vindicate/ç³»ç»æ¸
ç.png", |
| | | }, |
| | | |
| | | |
| | | { |
| | | name: "éå¯è®¾ç½®", |
| | | img_black: "/images/vindicate/éå¯è®¾ç½®-é».png", |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | |
| | | let color = localStorage.getItem("--colorCard"); |
| | | if (color) { |
| | | document.documentElement.style.setProperty("--colorCard", `${color}`); |
| | |
| | | return this.searchArr.filter((item) => { |
| | | return item.name.indexOf(this.searchText.toUpperCase()) > -1; |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | showWelcome(newVal) { |
| | | if (newVal) { |
| | | // éèè¿åææé® |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "hiddenBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } else { |
| | | //æ¾ç¤ºè¿åæé® |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } |
| | | }, |
| | | }, |
| | |
| | | background-color: rgba(251, 251, 255, 0.1); |
| | | backdrop-filter: blur(4px); |
| | | float: left; |
| | | width: 442px; |
| | | width: 288px; |
| | | height: 190px; |
| | | margin: 0 15px; |
| | | margin-bottom: 30px; |
| | | margin: 0 10px; |
| | | margin-bottom: 20px; |
| | | border-radius: 15px; |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | // }
|
| | | });
|
| | |
|
| | | const serverUrl = "http://192.168.20.189:7009"; // ç¾äº//
|
| | | //const serverUrl = "http://192.168.20.189:7009"; // ç¾äº//
|
| | | // const serverUrl = "http://192.168.8.10:7009";
|
| | | const serverUrl = "http://192.168.8.118:7009";
|
| | |
|
| | | const serverUrl2 = "http://192.168.8.10:9000";
|
| | | // const serverUrl = "http://192.168.20.10:7009";
|
| | | // const serverUrl2 = "http://192.168.20.10:9000";
|