feat: 调整目录结构等
This commit is contained in:
parent
5f738446fb
commit
49f6158bf0
|
@ -16,17 +16,17 @@ VUE_APP_PJ = ''
|
|||
# VUE_APP_API_BASEURL = http://127.0.0.1:8887/api
|
||||
|
||||
#测试环境
|
||||
VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
# VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
|
||||
VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||
# VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||
|
||||
# VUE_APP_BASEURL = http://127.0.0.1:8887
|
||||
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
||||
|
||||
# #光子
|
||||
# VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
# VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
#
|
||||
# 本地端口
|
||||
VUE_APP_PORT = 2800
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-input
|
||||
ref="inputRef0"
|
||||
:value-on-clear="null"
|
||||
style="display: none"
|
||||
v-model="inputValue"
|
||||
>
|
||||
</el-input>
|
||||
<el-input
|
||||
:value-on-clear="null"
|
||||
:readonly="true"
|
||||
ref="inputRef"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputLabel"
|
||||
>
|
||||
</el-input>
|
||||
<div v-if="edit">
|
||||
<el-popover
|
||||
v-model:visible="showPopover"
|
||||
trigger="click"
|
||||
virtual-triggering
|
||||
:virtual-ref="inputRef"
|
||||
:width="tableWidth"
|
||||
>
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
placeholder="关键词查找"
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<div style="height: 2px"></div>
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
:query="query"
|
||||
:height="tableHeight"
|
||||
row-key="id"
|
||||
stripe
|
||||
@row-click="rowClick"
|
||||
:hidePagination="hidePagination"
|
||||
paginationLayout="prev, pager, next"
|
||||
hideDo
|
||||
>
|
||||
<slot></slot>
|
||||
</scTable>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineEmits, computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
edit: { type: Boolean, default: true },
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
tableWidth: { type: Number, default: 600 },
|
||||
tableHeight: { type: Number, default: 400 },
|
||||
apiObj: { type: Object, default: () => {}, required: true },
|
||||
params: { type: Object, default: () => {} },
|
||||
label: { type: String, default: "" },
|
||||
modelValue: { type: String, default: null },
|
||||
labelField: { type: String, default: "name" },
|
||||
valueField: { type: String, default: "id" },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "update:label"]);
|
||||
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const showPopover = ref(false);
|
||||
const inputRef = ref();
|
||||
const inputRef0 = ref();
|
||||
const table = ref();
|
||||
const inputLabel = computed({
|
||||
get() {
|
||||
return props.label;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:label", val);
|
||||
},
|
||||
});
|
||||
const inputValue = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
|
||||
const keyword = ref("");
|
||||
const query = ref({ search: "" });
|
||||
|
||||
const handleQuery = () => {
|
||||
query.value.search = keyword.value;
|
||||
table.value.queryData(query.value);
|
||||
};
|
||||
|
||||
const rowClick = (row) => {
|
||||
inputLabel.value = row[props.labelField];
|
||||
inputValue.value = row[props.valueField];
|
||||
showPopover.value = false;
|
||||
};
|
||||
</script>
|
12
src/ehs.js
12
src/ehs.js
|
@ -1,12 +0,0 @@
|
|||
import ehsUserSelect from './components/ehsSelect/userselect'
|
||||
import ehsEpSelect from './components/ehsSelect/epselect'
|
||||
import ehsSelect from './components/ehsSelect/select'
|
||||
import xSelect from './components/ehsSelect/xselect.vue'
|
||||
export default {
|
||||
install(app) {
|
||||
app.component('ehsUserSelect', ehsUserSelect);
|
||||
app.component('ehsEpSelect', ehsEpSelect);
|
||||
app.component('ehsSelect', ehsSelect);
|
||||
app.component('xSelect', xSelect);
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ import ElementPlus from "element-plus";
|
|||
import "element-plus/dist/index.css";
|
||||
import "element-plus/theme-chalk/display.css";
|
||||
import scui from "./scui";
|
||||
import ehsui from "./ehs";
|
||||
import xui from "./xui";
|
||||
import i18n from "./locales";
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
|
@ -29,7 +29,7 @@ app.use(ElementPlus);
|
|||
app.use(Cesium);
|
||||
app.use(i18n);
|
||||
app.use(scui);
|
||||
app.use(ehsui);
|
||||
app.use(xui);
|
||||
app.use(preventReClick);
|
||||
app.use(Print);
|
||||
app.use(Xlsx);
|
||||
|
@ -40,9 +40,6 @@ app.component('v-chart', ECharts);
|
|||
|
||||
//挂载app
|
||||
app.mount("#app");
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component);
|
||||
}
|
||||
|
||||
const debounce = (fn, delay) => {
|
||||
let timer = null;
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-menu>
|
||||
<el-menu-item index="1" @click="currentM='二维码'">二维码</el-menu-item>
|
||||
<el-menu-item index="2" @click="currentM='带默认的选择'">带默认的选择</el-menu-item>
|
||||
<el-menu-item index="3" @click="currentM='图标选择'">图标选择</el-menu-item>
|
||||
<el-menu-item index="4" @click="currentM='xselect'">xselect</el-menu-item>
|
||||
<el-menu-item index="5" @click="currentM='vue-echarts'">vue-echarts</el-menu-item>
|
||||
<el-menu-item v-for="item in menu" :key="item" :index="item" @click="currentM=item">{{item}}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-main>
|
||||
|
@ -28,13 +24,20 @@
|
|||
</div>
|
||||
<div v-if="currentM=='xselect'">
|
||||
<xSelect :apiObj="apiObj" v-model="x2" v-model:label="x2_name" style="width: 200px">
|
||||
<el-table-column label="id" prop="id"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
</xSelect>
|
||||
<!-- <el-button @click="showx2"></el-button> -->
|
||||
<el-table-column label="id" prop="id"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
</xSelect>
|
||||
|
||||
<div>当前选择:{{ x2 }} {{ x2_name }}</div>
|
||||
</div>
|
||||
<div v-if="currentM=='vue-echarts'">
|
||||
<v-chart :option="chartOption" autoresize style="height: 400px; width: 400px"/>
|
||||
</div>
|
||||
<div v-if="currentM=='用户选择'">
|
||||
<ehsUserSelect :multiple="true" @submit="getMember"/>
|
||||
</div>
|
||||
<div v-if="currentM=='员工选择'">
|
||||
<ehsEpSelect :multiple="true" @submit="getMember"/>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -45,7 +48,16 @@ export default {
|
|||
components: {},
|
||||
data() {
|
||||
return {
|
||||
currentM: "",
|
||||
menu: [
|
||||
'二维码',
|
||||
'带默认的选择',
|
||||
'图标选择',
|
||||
'xselect',
|
||||
'vue-echarts',
|
||||
'用户选择',
|
||||
'员工选择'
|
||||
],
|
||||
currentM: "",
|
||||
apiObj: this.$API.system.dept.list,
|
||||
x: "3607937377546706944",
|
||||
x_name: "光芯科技",
|
||||
|
@ -103,7 +115,10 @@ export default {
|
|||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
showx2(){
|
||||
getMember(data) {
|
||||
console.log(data)
|
||||
},
|
||||
showx2(){
|
||||
// console.log(this.x2)
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue