mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
style: format code for all
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<iframe
|
||||
:src="url"
|
||||
frameborder="0"
|
||||
class="iframe"
|
||||
></iframe>
|
||||
<iframe :src="url" frameborder="0" class="iframe"></iframe>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
import { ref } from 'vue';
|
||||
<script lang="ts">
|
||||
import { ref } from "vue";
|
||||
export default {
|
||||
setup() {
|
||||
const url = ref(process.env.NODE_ENV === 'production' ? '/manages/html/button.html' : '/html/button.html');
|
||||
const url = ref(
|
||||
process.env.NODE_ENV === "production"
|
||||
? "/manages/html/button.html"
|
||||
: "/html/button.html"
|
||||
);
|
||||
return {
|
||||
url
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import { defineComponent } from "vue";
|
||||
|
||||
import {
|
||||
directive,
|
||||
version,
|
||||
Contextmenu,
|
||||
ContextmenuItem,
|
||||
ContextmenuDivider,
|
||||
@@ -72,4 +71,4 @@ export default defineComponent({
|
||||
border-radius: 8px;
|
||||
background-color: rgba(90, 167, 164, 0.2);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="margin:10px">
|
||||
<div style="margin: 10px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
|
||||
<!-- 基本使用 -->
|
||||
|
||||
@@ -7,22 +7,38 @@
|
||||
|
||||
<v-contextmenu ref="contextmenu">
|
||||
<v-contextmenu-group title="操作">
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.push('item')">添加菜单</v-contextmenu-item>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.push('group')">添加菜单组</v-contextmenu-item>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.push('submenu')">添加子菜单</v-contextmenu-item>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.pop()">删除</v-contextmenu-item>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.push('item')"
|
||||
>添加菜单</v-contextmenu-item
|
||||
>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.push('group')"
|
||||
>添加菜单组</v-contextmenu-item
|
||||
>
|
||||
<v-contextmenu-item
|
||||
:hide-on-click="false"
|
||||
@click="extra.push('submenu')"
|
||||
>添加子菜单</v-contextmenu-item
|
||||
>
|
||||
<v-contextmenu-item :hide-on-click="false" @click="extra.pop()"
|
||||
>删除</v-contextmenu-item
|
||||
>
|
||||
</v-contextmenu-group>
|
||||
|
||||
<template v-for="(item, index) of extra">
|
||||
<template v-for="(item, index) of extra" :key="index">
|
||||
<v-contextmenu-divider />
|
||||
|
||||
<v-contextmenu-group v-if="item === 'group'" :title="`菜单组 ${index + 1}`">
|
||||
<v-contextmenu-group
|
||||
v-if="item === 'group'"
|
||||
:title="`菜单组 ${index + 1}`"
|
||||
>
|
||||
<v-contextmenu-item>菜单1</v-contextmenu-item>
|
||||
<v-contextmenu-item>菜单2</v-contextmenu-item>
|
||||
<v-contextmenu-item>菜单3</v-contextmenu-item>
|
||||
</v-contextmenu-group>
|
||||
|
||||
<v-contextmenu-submenu v-else-if="item === 'submenu'" :title="`子菜单 ${index + 1}`">
|
||||
<v-contextmenu-submenu
|
||||
v-else-if="item === 'submenu'"
|
||||
:title="`子菜单 ${index + 1}`"
|
||||
>
|
||||
<v-contextmenu-item>菜单1</v-contextmenu-item>
|
||||
<v-contextmenu-item>菜单2</v-contextmenu-item>
|
||||
<v-contextmenu-item>菜单3</v-contextmenu-item>
|
||||
@@ -39,7 +55,6 @@ import { defineComponent } from "vue";
|
||||
|
||||
import {
|
||||
directive,
|
||||
version,
|
||||
Contextmenu,
|
||||
ContextmenuItem,
|
||||
ContextmenuDivider,
|
||||
@@ -91,4 +106,4 @@ export default defineComponent({
|
||||
border-radius: 8px;
|
||||
background-color: rgba(90, 167, 164, 0.2);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -31,7 +31,6 @@ import { defineComponent } from "vue";
|
||||
|
||||
import {
|
||||
directive,
|
||||
version,
|
||||
Contextmenu,
|
||||
ContextmenuItem,
|
||||
ContextmenuDivider,
|
||||
@@ -69,4 +68,4 @@ export default ExampleSFC;
|
||||
border-radius: 8px;
|
||||
background-color: rgba(90, 167, 164, 0.2);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="margin:10px">
|
||||
<div style="margin: 10px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-card shadow="always">
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import CountTo from "/@/components/ReCountTo";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
forceFallback="true"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div :class="'item'+' '+ 'item-' + element.num">{{ element.num }}</div>
|
||||
<div :class="'item' + ' ' + 'item-' + element.num">
|
||||
{{ element.num }}
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</el-card>
|
||||
@@ -41,7 +43,7 @@
|
||||
animation="300"
|
||||
>
|
||||
<template #item="{ element, index }">
|
||||
<div class="item-single">{{element.name}} {{ index }}</div>
|
||||
<div class="item-single">{{ element.name }} {{ index }}</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</el-card>
|
||||
@@ -56,7 +58,11 @@
|
||||
</template>
|
||||
<!-- 拖拽实现元素位置切换 -->
|
||||
<div class="cut-container">
|
||||
<div class="item-cut" v-for="(item,index) in cutLists" :key="index">
|
||||
<div
|
||||
class="item-cut"
|
||||
v-for="(item, index) in cutLists"
|
||||
:key="index"
|
||||
>
|
||||
<p>{{ item.name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,7 +72,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import draggable from "vuedraggable/src/vuedraggable";
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
export default {
|
||||
@@ -105,6 +111,7 @@ export default {
|
||||
onMounted(() => {
|
||||
// 使用原生sortable实现元素位置切换
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line no-undef
|
||||
new Sortable(document.querySelector(".cut-container"), {
|
||||
swap: true,
|
||||
forceFallback: true,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { Amap } from "/@/components/ReMap";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -5,20 +5,51 @@
|
||||
<div class="card-header">
|
||||
<span>无缝滚动示例</span>
|
||||
<el-button class="button" type="text" @click="changeDirection('top')">
|
||||
<span :style="{color: classOption.direction === 'top' ? 'red' : ''}">向上滚动</span>
|
||||
<span
|
||||
:style="{ color: classOption.direction === 'top' ? 'red' : '' }"
|
||||
>向上滚动</span
|
||||
>
|
||||
</el-button>
|
||||
<el-button class="button" type="text" @click="changeDirection('bottom')">
|
||||
<span :style="{color: classOption.direction === 'bottom' ? 'red' : ''}">向下滚动</span>
|
||||
<el-button
|
||||
class="button"
|
||||
type="text"
|
||||
@click="changeDirection('bottom')"
|
||||
>
|
||||
<span
|
||||
:style="{
|
||||
color: classOption.direction === 'bottom' ? 'red' : ''
|
||||
}"
|
||||
>向下滚动</span
|
||||
>
|
||||
</el-button>
|
||||
<el-button class="button" type="text" @click="changeDirection('left')">
|
||||
<span :style="{color: classOption.direction === 'left' ? 'red' : ''}">向左滚动</span>
|
||||
<el-button
|
||||
class="button"
|
||||
type="text"
|
||||
@click="changeDirection('left')"
|
||||
>
|
||||
<span
|
||||
:style="{ color: classOption.direction === 'left' ? 'red' : '' }"
|
||||
>向左滚动</span
|
||||
>
|
||||
</el-button>
|
||||
<el-button class="button" type="text" @click="changeDirection('right')">
|
||||
<span :style="{color: classOption.direction === 'right' ? 'red' : ''}">向右滚动</span>
|
||||
<el-button
|
||||
class="button"
|
||||
type="text"
|
||||
@click="changeDirection('right')"
|
||||
>
|
||||
<span
|
||||
:style="{ color: classOption.direction === 'right' ? 'red' : '' }"
|
||||
>向右滚动</span
|
||||
>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<SeamlessScroll ref="scroll" :data="listData" :class-option="classOption" class="warp">
|
||||
<SeamlessScroll
|
||||
ref="scroll"
|
||||
:data="listData"
|
||||
:class-option="classOption"
|
||||
class="warp"
|
||||
>
|
||||
<ul class="item">
|
||||
<li v-for="(item, index) in listData" :key="index">
|
||||
<span class="title" v-text="item.title"></span>
|
||||
@@ -29,7 +60,7 @@
|
||||
</el-space>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { ref, unref } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
|
||||
@@ -39,6 +70,7 @@ export default {
|
||||
SeamlessScroll
|
||||
},
|
||||
setup() {
|
||||
// eslint-disable-next-line no-undef
|
||||
const scroll = templateRef<ElRef | null>("scroll", null);
|
||||
|
||||
let listData = ref([
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card" style="margin:10px" v-for="(item,key) in dataLists" :key="key">
|
||||
<el-card
|
||||
class="box-card"
|
||||
style="margin: 10px"
|
||||
v-for="(item, key) in dataLists"
|
||||
:key="key"
|
||||
>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>{{item.title}}</span>
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<Selector
|
||||
@@ -17,7 +22,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { ref } from "vue";
|
||||
import Selector from "/@/components/ReSelector";
|
||||
|
||||
@@ -38,7 +43,7 @@ export default {
|
||||
}
|
||||
]);
|
||||
|
||||
const selectedVal = ({ left, right, whole }) => {
|
||||
const selectedVal = ({ left, right }) => {
|
||||
selectRange.value = `${left}-${right}`;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,32 +2,31 @@
|
||||
<div id="mse"></div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { onMounted } from "vue";
|
||||
import Player from "xgplayer/dist/simple_player";
|
||||
import volume from 'xgplayer/dist/controls/volume';
|
||||
import playbackRate from 'xgplayer/dist/controls/playbackRate';
|
||||
import screenShot from 'xgplayer/dist/controls/screenShot';
|
||||
import { deviceDetection } from "/@/utils/deviceDetection"
|
||||
import volume from "xgplayer/dist/controls/volume";
|
||||
import playbackRate from "xgplayer/dist/controls/playbackRate";
|
||||
import screenShot from "xgplayer/dist/controls/screenShot";
|
||||
import { deviceDetection } from "/@/utils/deviceDetection";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
onMounted(() => {
|
||||
let player = new Player({
|
||||
new Player({
|
||||
id: "mse",
|
||||
autoplay: false,
|
||||
screenShot: true,
|
||||
url:
|
||||
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4",
|
||||
url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4",
|
||||
poster:
|
||||
"https://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
|
||||
fluid: deviceDetection() ? true : false,
|
||||
fluid: deviceDetection(),
|
||||
controlPlugins: [volume, playbackRate, screenShot],
|
||||
playbackRate: [0.5, 0.75, 1, 1.5, 2], //传入倍速可选数组
|
||||
playbackRate: [0.5, 0.75, 1, 1.5, 2] //传入倍速可选数组
|
||||
});
|
||||
});
|
||||
return {};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -6,39 +6,39 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { onMounted, onBeforeUnmount, ref, reactive } from 'vue'
|
||||
import WangEditor from 'wangeditor'
|
||||
import { onMounted, onBeforeUnmount, ref, reactive } from "vue";
|
||||
import WangEditor from "wangeditor";
|
||||
|
||||
export default {
|
||||
name: 'editor',
|
||||
name: "editor",
|
||||
setup() {
|
||||
const editor = ref()
|
||||
const editor = ref();
|
||||
const content = reactive({
|
||||
html: '',
|
||||
text: '',
|
||||
})
|
||||
html: "",
|
||||
text: ""
|
||||
});
|
||||
|
||||
let instance
|
||||
let instance;
|
||||
onMounted(() => {
|
||||
instance = new WangEditor(editor.value)
|
||||
instance = new WangEditor(editor.value);
|
||||
Object.assign(instance.config, {
|
||||
onchange() {
|
||||
content.html = instance.txt.html()
|
||||
},
|
||||
})
|
||||
instance.create()
|
||||
})
|
||||
content.html = instance.txt.html();
|
||||
}
|
||||
});
|
||||
instance.create();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
instance.destroy()
|
||||
instance = null
|
||||
})
|
||||
instance.destroy();
|
||||
instance = null;
|
||||
});
|
||||
|
||||
return {
|
||||
editor,
|
||||
content,
|
||||
}
|
||||
},
|
||||
content
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -50,4 +50,4 @@ export default {
|
||||
z-index: 999 !important;
|
||||
position: static;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
import imgs from '/@/assets/401.gif'
|
||||
import { ref } from "vue"
|
||||
<script lang="ts">
|
||||
import imgs from "/@/assets/401.gif";
|
||||
import { ref } from "vue";
|
||||
export default {
|
||||
name: "401",
|
||||
setup() {
|
||||
const img = ref(`${imgs}?${new Date()}`)
|
||||
const img = ref(`${imgs}?${new Date()}`);
|
||||
return {
|
||||
img
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ export default {
|
||||
return {
|
||||
message,
|
||||
four,
|
||||
four_cloud,
|
||||
four_cloud
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="logic-flow-view">
|
||||
<!-- 辅助工具栏 -->
|
||||
<Control class="demo-control" v-if="lf" :lf="lf" :catTurboData="false" @catData="catData"></Control>
|
||||
<Control
|
||||
class="demo-control"
|
||||
v-if="lf"
|
||||
:lf="lf"
|
||||
:catTurboData="false"
|
||||
@catData="catData"
|
||||
></Control>
|
||||
<!-- 节点面板 -->
|
||||
<NodePanel :lf="lf" :nodeList="nodeList"></NodePanel>
|
||||
<!-- 画布 -->
|
||||
@@ -13,23 +19,21 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
import { ref, unref, onMounted, nextTick } from "vue";
|
||||
<script lang="ts">
|
||||
import { ref, unref, onMounted } from "vue";
|
||||
import LogicFlow from "@logicflow/core";
|
||||
import { Snapshot, BpmnElement, Menu } from "@logicflow/extension";
|
||||
import "@logicflow/core/dist/style/index.css";
|
||||
import "@logicflow/extension/lib/style/index.css";
|
||||
import { Control, NodePanel, DataDialog } from "/@/components/ReFlowChart";
|
||||
|
||||
import {
|
||||
toTurboData,
|
||||
toLogicflowData
|
||||
} from "/@/components/ReFlowChart/src/adpterForTurbo";
|
||||
import { toLogicflowData } from "/@/components/ReFlowChart/src/adpterForTurbo";
|
||||
import { BpmnNode } from "/@/components/ReFlowChart/src/config";
|
||||
import demoData from "./dataTurbo.json";
|
||||
export default {
|
||||
components: { NodePanel, Control, DataDialog },
|
||||
setup() {
|
||||
// eslint-disable-next-line no-undef
|
||||
let lf = ref<ElRef>(null);
|
||||
let graphData = ref(null);
|
||||
let dataVisible = ref(false);
|
||||
@@ -124,4 +128,3 @@ export default {
|
||||
z-index: 3;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<info :ruleForm="contextInfo" @on-behavior="onLogin" @refreshVerify="refreshVerify" />
|
||||
<info
|
||||
:ruleForm="contextInfo"
|
||||
@on-behavior="onLogin"
|
||||
@refreshVerify="refreshVerify"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<p>{{$t('message.hsmenu1')}}</p>
|
||||
<p>{{ $t("message.hsmenu1") }}</p>
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition>
|
||||
<component :is="Component" />
|
||||
@@ -8,5 +8,3 @@
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<p style="text-indent:2em">{{$t('message.hsmenu1-1')}}</p>
|
||||
<p style="text-indent: 2em">{{ $t("message.hsmenu1-1") }}</p>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<p style="text-indent:2em">{{$t('message.hsmenu1-2')}}</p>
|
||||
<p style="text-indent: 2em">{{ $t("message.hsmenu1-2") }}</p>
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive>
|
||||
<component :is="Component" />
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<p style="text-indent:4em">{{$t('message.hsmenu1-2-1')}}</p>
|
||||
<p style="text-indent: 4em">{{ $t("message.hsmenu1-2-1") }}</p>
|
||||
</template>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<p style="text-indent:4em">{{$t('message.hsmenu1-2-2')}}</p>
|
||||
<p style="text-indent: 4em">{{ $t("message.hsmenu1-2-2") }}</p>
|
||||
</template>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<p style="text-indent:2em">{{$t('message.hsmenu1-3')}}</p>
|
||||
<p style="text-indent: 2em">{{ $t("message.hsmenu1-3") }}</p>
|
||||
</template>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<p class="app-container">{{$t('message.hsmenu2')}}</p>
|
||||
<p class="app-container">{{ $t("message.hsmenu2") }}</p>
|
||||
</template>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
import { ref, unref } from "vue";
|
||||
<script lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
export default {
|
||||
name: "permissionButton",
|
||||
@@ -34,5 +34,4 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
<div class="app-container">
|
||||
<h4>
|
||||
当前角色:
|
||||
<span style="font-size:26px">{{ purview }}</span>
|
||||
<p style="color:#FFA500">查看左侧菜单变化(系统管理),模拟后台根据不同角色返回对应路由</p>
|
||||
<span style="font-size: 26px">{{ purview }}</span>
|
||||
<p style="color: #ffa500">
|
||||
查看左侧菜单变化(系统管理),模拟后台根据不同角色返回对应路由
|
||||
</p>
|
||||
</h4>
|
||||
<el-button type="primary" @click="changRole">切换角色</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { ref, unref } from "vue";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
export default {
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<info :ruleForm="contextInfo" @on-behavior="onRegist" @refreshVerify="refreshVerify" />
|
||||
<info
|
||||
:ruleForm="contextInfo"
|
||||
@on-behavior="onRegist"
|
||||
@refreshVerify="refreshVerify"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
onBeforeMount,
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
import { reactive, onBeforeMount } from "vue";
|
||||
import info, { ContextProps } from "../components/ReInfo/index.vue";
|
||||
import { getRegist, getVerify } from "/@/api/user";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@@ -23,8 +23,18 @@
|
||||
<vxe-table-column field="dataval" title="数据值"></vxe-table-column>
|
||||
<vxe-table-column title="操作" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" icon="el-icon-edit" @click="editConfig(row)">编辑</vxe-button>
|
||||
<vxe-button type="text" icon="el-icon-delete" @click="delConfig(row)">删除</vxe-button>
|
||||
<vxe-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="editConfig(row)"
|
||||
>编辑</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="delConfig(row)"
|
||||
>删除</vxe-button
|
||||
>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
</vxe-table>
|
||||
@@ -33,7 +43,16 @@
|
||||
v-model:current-page="tablePage.currentPage"
|
||||
v-model:page-size="tablePage.pageSize"
|
||||
:total="tablePage.total"
|
||||
:layouts="['PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
|
||||
:layouts="[
|
||||
'PrevJump',
|
||||
'PrevPage',
|
||||
'Number',
|
||||
'NextPage',
|
||||
'NextJump',
|
||||
'Sizes',
|
||||
'FullJump',
|
||||
'Total'
|
||||
]"
|
||||
>
|
||||
<template #left>
|
||||
<span class="page-left">
|
||||
@@ -42,7 +61,9 @@
|
||||
:indeterminate="isIndeterminate"
|
||||
@change="changeAllEvent"
|
||||
></vxe-checkbox>
|
||||
<span class="select-count">已选中{{ selectRecords.length }}条</span>
|
||||
<span class="select-count"
|
||||
>已选中{{ selectRecords.length }}条</span
|
||||
>
|
||||
<vxe-button size="small">{{ $t("message.hsdelete") }}</vxe-button>
|
||||
</span>
|
||||
</template>
|
||||
@@ -53,7 +74,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, toRefs, ref } from "vue";
|
||||
import { defineComponent, reactive, toRefs } from "vue";
|
||||
import { propTypes } from "/@/utils/propTypes";
|
||||
import { VxeTableEvents } from "vxe-table";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
@@ -92,7 +113,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
// 抽屉关闭
|
||||
function handleClose(done) {
|
||||
function handleClose() {
|
||||
configData.isAllChecked = false;
|
||||
configData.isIndeterminate = false;
|
||||
emit("handleClose");
|
||||
|
||||
@@ -1,26 +1,34 @@
|
||||
.<template>
|
||||
.
|
||||
<template>
|
||||
<div class="dict-container">
|
||||
<!-- 工具栏 -->
|
||||
<vxe-toolbar>
|
||||
<template #buttons>
|
||||
<vxe-input v-model="filterName" :placeholder="$t('message.hssearch')" @keyup="searchEvent"></vxe-input>
|
||||
<vxe-input
|
||||
v-model="filterName"
|
||||
:placeholder="$t('message.hssearch')"
|
||||
@keyup="searchEvent"
|
||||
></vxe-input>
|
||||
</template>
|
||||
<template #tools>
|
||||
<vxe-button
|
||||
icon="el-icon-circle-plus-outline"
|
||||
status="primary"
|
||||
@click="onAdd"
|
||||
>{{$t('message.hsadd')}}</vxe-button>
|
||||
>{{ $t("message.hsadd") }}</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
icon="el-icon-folder-opened"
|
||||
status="primary"
|
||||
@click="$refs.xTree.setAllTreeExpand(true)"
|
||||
>{{$t('message.hsexpendAll')}}</vxe-button>
|
||||
>{{ $t("message.hsexpendAll") }}</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
icon="el-icon-folder"
|
||||
status="primary"
|
||||
@click="$refs.xTree.clearTreeExpand()"
|
||||
>{{$t('message.hscollapseAll')}}</vxe-button>
|
||||
>{{ $t("message.hscollapseAll") }}</vxe-button
|
||||
>
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
|
||||
@@ -29,29 +37,51 @@
|
||||
ref="xTree"
|
||||
border
|
||||
resizable
|
||||
:tree-config="{children: 'children', iconOpen: 'fa fa-minus-square-o', iconClose: 'fa fa-plus-square-o'}"
|
||||
:tree-config="{
|
||||
children: 'children',
|
||||
iconOpen: 'fa fa-minus-square-o',
|
||||
iconClose: 'fa fa-plus-square-o'
|
||||
}"
|
||||
:data="tableData"
|
||||
@cell-dblclick="cellDBLClickEvent"
|
||||
>
|
||||
<vxe-table-column tree-node field="name" title="字典名称"></vxe-table-column>
|
||||
<vxe-table-column
|
||||
tree-node
|
||||
field="name"
|
||||
title="字典名称"
|
||||
></vxe-table-column>
|
||||
<vxe-table-column title="字典类型">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip effect="dark" :content="'双击复制:'+row.model" placement="right">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="'双击复制:' + row.model"
|
||||
placement="right"
|
||||
>
|
||||
<span class="text-model">{{ row.model }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
<vxe-table-column title="操作" width="330" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" icon="el-icon-edit" @click="onEdit(row)">编辑</vxe-button>
|
||||
<vxe-button type="text" icon="el-icon-circle-plus-outline" @click="onAddChild(row)">新增子类型</vxe-button>
|
||||
<vxe-button type="text" icon="el-icon-edit" @click="onEdit(row)"
|
||||
>编辑</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
type="text"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="onAddChild(row)"
|
||||
>新增子类型</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
v-show="row.model"
|
||||
type="text"
|
||||
icon="el-icon-setting"
|
||||
@click="onDeploy(row)"
|
||||
>字典配置</vxe-button>
|
||||
<vxe-button type="text" icon="el-icon-delete" @click="confirmEvent">删除</vxe-button>
|
||||
>字典配置</vxe-button
|
||||
>
|
||||
<vxe-button type="text" icon="el-icon-delete" @click="confirmEvent"
|
||||
>删除</vxe-button
|
||||
>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
</vxe-table>
|
||||
@@ -63,7 +93,7 @@
|
||||
v-model="showEdit"
|
||||
:title="selectRow ? '编辑' : '新增'"
|
||||
:loading="submitLoading"
|
||||
@hide="$refs.xForm.reset();"
|
||||
@hide="$refs.xForm.reset()"
|
||||
>
|
||||
<template #default>
|
||||
<vxe-form
|
||||
@@ -80,7 +110,7 @@
|
||||
<Config :drawer="drawer" drawTitle="字典列表" @handleClose="handleClose" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
<script lang="ts">
|
||||
import { reactive, ref, unref, nextTick, toRefs } from "vue";
|
||||
import XEUtils from "xe-utils";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
@@ -90,7 +120,6 @@ import {
|
||||
VXETable,
|
||||
VxeTableInstance,
|
||||
VxeTableEvents,
|
||||
VxeTablePropTypes,
|
||||
VxeFormPropTypes
|
||||
} from "vxe-table";
|
||||
import Config from "./config.vue";
|
||||
@@ -203,7 +232,7 @@ export default {
|
||||
|
||||
// 创建一个防防抖函数,调用频率间隔 100 毫秒
|
||||
const searchEvent = XEUtils.debounce(
|
||||
function() {
|
||||
function () {
|
||||
handleSearch();
|
||||
},
|
||||
100,
|
||||
@@ -279,7 +308,7 @@ export default {
|
||||
|
||||
let drawer = ref(false);
|
||||
|
||||
function onDeploy(row: any) {
|
||||
function onDeploy() {
|
||||
drawer.value = true;
|
||||
}
|
||||
|
||||
@@ -325,4 +354,4 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<vxe-grid v-bind="gridOptions" style="width:98%"></vxe-grid>
|
||||
<vxe-grid v-bind="gridOptions" style="width: 98%"></vxe-grid>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { reactive } from "vue";
|
||||
import { VxeGridProps } from "vxe-table";
|
||||
export default {
|
||||
@@ -249,5 +249,4 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import Flop from "/@/components/ReFlop";
|
||||
import { ref, computed, onMounted, nextTick } from "vue";
|
||||
import { deviceDetection } from "/@/utils/deviceDetection";
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
bottom: "10%"
|
||||
},
|
||||
xAxis: {
|
||||
data: info.map(function(item) {
|
||||
data: info.map(function (item) {
|
||||
return item[0];
|
||||
})
|
||||
},
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
series: {
|
||||
name: "上海 空气质量指数",
|
||||
type: "line",
|
||||
data: info.map(function(item) {
|
||||
data: info.map(function (item) {
|
||||
return item[1];
|
||||
}),
|
||||
markLine: {
|
||||
|
||||
Reference in New Issue
Block a user