From 89bdfef24b9ee62719e8a9def5151c3ebb1224f9 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 23 七月 2024 16:36:14 +0800
Subject: [PATCH] 枚举类型点击行展示枚举信息和枚举项&&构建属性池页面
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js | 22 ++
Source/plt-web/plt-web-ui/src/views/system/user/index.vue | 1
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 239 +++++++++++++++++++++++
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue | 283 ++++++++++++++++++----------
Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js | 14 +
Source/plt-web/plt-web-ui/src/api/user.js | 6
6 files changed, 455 insertions(+), 110 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
new file mode 100644
index 0000000..3a10e9c
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
@@ -0,0 +1,14 @@
+import request from '@/router/axios';
+
+// 鍒楄〃鏌ヨ
+export function gridAttribute(page,limit,params) {
+ return request({
+ url: "/api/attributeController/gridAttribute",
+ method: "get",
+ params:{
+ page,
+ limit,
+ ...params
+ }
+ });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/user.js b/Source/plt-web/plt-web-ui/src/api/user.js
index 1744e78..0a7fed7 100644
--- a/Source/plt-web/plt-web-ui/src/api/user.js
+++ b/Source/plt-web/plt-web-ui/src/api/user.js
@@ -118,13 +118,13 @@
// 淇敼瀵嗙爜
export function changePassword(params) {
let formData = new FormData;
- for (let key in params){
- formData.append(key,params[key])
+ for (let key in params) {
+ formData.append(key, params[key])
}
return request({
url: "/api/userQueryController/changePassword",
method: "post",
- data:formData
+ data: formData
});
}
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index 2da0423..871f037 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -1,13 +1,244 @@
<template>
-<p>灞炴�ф睜</p>
+ <el-container>
+ <el-main>
+ <basic-container>
+ <avue-crud
+ ref="userCrud"
+ :data="tableData"
+ :option="option"
+ :page.sync="page"
+ :table-loading="tableLoading"
+ @on-load="getTableList"
+ @refresh-change="handleRefresh"
+ @search-change="handleSearch"
+ @search-reset="handleReset"
+ @selection-change="selectChange"
+ @row-click="rowClickHandler"
+ @size-change="sizeChange"
+ @current-change="currentChange"
+ >
+ <template slot="menuLeft" slot-scope="scope">
+ <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button>
+ <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button>
+ </template>
+
+ <template slot="menu" slot-scope="scope">
+ <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
+ </el-button>
+ <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
+ </el-main>
+
+ <el-aside width="30%">
+ <basic-container>
+ <div style="height: 85vh; overflow-y: auto">
+ <el-descriptions :column="1" border size="medium" title="灞炴�ч」">
+ <el-descriptions-item>
+ <template slot="label">
+ 鍚嶇О
+ </template>
+ 鍚嶇О
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鏍囩
+ </template>
+ 鏍囩
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鎻忚堪
+ </template>
+ 鎻忚堪
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鎿嶄綔绫诲瀷
+ </template>
+ 鎿嶄綔绫诲瀷
+ </el-descriptions-item>
+ </el-descriptions>
+
+ <el-descriptions :column="1" border class="margin-top" size="medium" title="VTString">
+ <el-descriptions-item>
+ <template slot="label">
+ 鍏佽涓虹┖
+ </template>
+ <el-tag type="success">鏄�</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 绮惧害
+ </template>
+ 绮惧害
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 闀垮害
+ </template>
+ 闀垮害
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 榛樿鍊�
+ </template>
+ 榛樿鍊�
+ </el-descriptions-item>
+ </el-descriptions>
+
+ <el-descriptions :column="1" border class="margin-top" size="medium" title="鍊煎煙">
+ <el-descriptions-item>
+ <template slot="label">
+ 褰撳墠绫诲瀷
+ </template>
+ 涓氬姟绫诲瀷
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 褰撳墠绫诲瀷鍊�
+ </template>
+
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 褰撳墠鐗堟湰娆�
+ </template>
+
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 浣跨敤鏋氫妇
+ </template>
+ <el-tag type="success">鏄�</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鏋氫妇绫诲瀷
+ </template>
+ 鏋氫妇绫诲瀷
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鏋氫妇鍊�
+ </template>
+
+ </el-descriptions-item>
+
+ </el-descriptions>
+
+ </div>
+ </basic-container>
+ </el-aside>
+ </el-container>
</template>
<script>
+import {gridAttribute} from "@/api/modeling/attributePool/api";
+import basicOption from '@/util/basic-option';
+import {column} from "./option"
+
export default {
-name: "index"
+ name: "index",
+ data() {
+ return {
+ tableData: [],
+ option: {
+ ...basicOption,
+ searchMenuSpan: 8,
+ calcHeight: -60,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ column
+ },
+ tableLoading: false,
+ page: {
+ currentPage: 1,
+ pageSize: 10,
+ total: 0,
+ pageSizes: [10, 30, 50, 100],
+ },
+ searchParams: {},
+ selectList: []
+ }
+ },
+ methods: {
+ //琛ㄦ牸鏌ヨ璇锋眰
+ getTableList() {
+ this.tableLoading = true;
+ gridAttribute(this.page.currentPage, this.page.pageSize, this.searchParams).then(res => {
+ const data = res.data.data;
+ this.tableData = data;
+ this.page.total = res.data.total;
+ this.tableLoading = false;
+ }).catch(err => {
+ this.$message.error(err)
+ });
+ },
+
+ // 琛ㄦ牸澶撮儴鍒锋柊
+ handleRefresh() {
+ this.getTableList();
+ },
+
+ // 鎼滅储
+ handleSearch() {
+
+ },
+
+ // 閲嶇疆鎼滅储鏉′欢
+ handleReset() {
+
+ },
+
+ // 閫夋嫨妗�
+ selectChange(row) {
+ this.selectList = row;
+ },
+
+ // 鐐瑰嚮琛�
+ rowClickHandler(row) {
+ this.$refs.userCrud.toggleRowSelection(row);
+ },
+
+ // 鏉℃暟
+ sizeChange(val) {
+ this.page.pageSize = val;
+ },
+
+ // 椤电爜
+ currentChange(val) {
+ this.page.currentPage = val;
+ },
+
+ rowSaveHandlerClick() {
+ },
+
+ allDelHandler() {
+
+ },
+
+ chekView() {
+
+ },
+
+ editBtnClick() {
+
+ },
+
+ rowDeleteHandler() {
+
+ }
+ }
}
</script>
-<style scoped>
-
+<style lang="scss" scoped>
+.margin-top{
+ margin-top: 25px;
+}
</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js
new file mode 100644
index 0000000..e2d889d
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/option.js
@@ -0,0 +1,22 @@
+export const column = [
+ {
+ label: '灞炴�у悕',
+ prop: 'id',
+ search:true,
+ sortable:true,
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'attributeDataTypeText',
+ sortable:true,
+ },
+ {
+ label: '榛樿鍊�',
+ prop: 'defaultValue',
+ sortable:true,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'description',
+ },
+];
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
index 320acd5..67688b6 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
@@ -1,117 +1,160 @@
<template>
- <basic-container>
- <avue-crud
- ref="userCrud"
- :data="tableData"
- :option="option"
- :table-loading="tableLoading"
- @on-load="getTableList"
- @refresh-change="handleRefresh"
- @search-change="handleSearch"
- @search-reset="handleReset"
- @selection-change="selectChange"
- @row-click="rowClickHandler"
- >
+ <el-container>
+ <el-main>
+ <basic-container>
+ <avue-crud
+ ref="userCrud"
+ :data="tableData"
+ :option="option"
+ :table-loading="tableLoading"
+ @on-load="getTableList"
+ @refresh-change="handleRefresh"
+ @search-change="handleSearch"
+ @search-reset="handleReset"
+ @selection-change="selectChange"
+ @row-click="rowClickHandler"
+ >
- <template slot="menuLeft" slot-scope="scope">
- <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button>
- <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘
- </el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">瀵煎嚭</el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">瀵煎叆</el-button>
- </template>
+ <template slot="menuLeft" slot-scope="scope">
+ <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button>
+ <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘
+ </el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">瀵煎嚭</el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">瀵煎叆</el-button>
+ </template>
- <template slot="menu" slot-scope="scope">
- <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
- </el-button>
- <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
- </el-button>
- </template>
+ <template slot="menu" slot-scope="scope">
+ <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
+ </el-button>
+ <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ </el-button>
+ </template>
- </avue-crud>
- <!-- 鍒涘缓缂栬緫鑷畾涔夊璇濇 -->
- <el-dialog
- v-dialogDrag
- v-loading="dialogLoading"
- :title="dialogType === 'add' ? ' 鍒涘缓' : '缂栬緫'"
- :visible.sync="dialogVisible"
- append-to-body="true"
- class="avue-dialog"
- width="70%"
- @close="dialogClose"
- >
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="鍚嶇О锛�" prop="id">
- <el-input v-model="form.id"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏍囩锛�">
- <el-input v-model="form.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="绫诲瀷锛�">
- <el-select v-model="form.enumValueDataType" placeholder="璇烽�夋嫨绫诲瀷">
- <el-option label="String" value="String"></el-option>
- <el-option label="Integer" value="Integer"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="闀垮害锛�">
- <el-input-number v-model="form.length" :max="999" :min="1" label="鎻忚堪鏂囧瓧"></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <avue-crud
- ref="dialogCrud"
- :data="dialogData"
- :option="dialogOption"
- @row-save="rowSaveDialogHandler"
- @row-update="rowUpdateDialogHandler"
- @row-del="rowDeleteDialogHandler"
- >
- </avue-crud>
- </el-col>
- </el-row>
- </el-form>
+ </avue-crud>
+ <!-- 鍒涘缓缂栬緫鑷畾涔夊璇濇 -->
+ <el-dialog
+ v-dialogDrag
+ v-loading="dialogLoading"
+ :title="dialogType === 'add' ? ' 鍒涘缓' : '缂栬緫'"
+ :visible.sync="dialogVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ width="70%"
+ @close="dialogClose"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鍚嶇О锛�" prop="id">
+ <el-input v-model="form.id"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鏍囩锛�">
+ <el-input v-model="form.name"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="绫诲瀷锛�">
+ <el-select v-model="form.enumValueDataType" placeholder="璇烽�夋嫨绫诲瀷">
+ <el-option label="String" value="String"></el-option>
+ <el-option label="Integer" value="Integer"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="闀垮害锛�">
+ <el-input-number v-model="form.length" :max="999" :min="1" label="鎻忚堪鏂囧瓧"></el-input-number>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <avue-crud
+ ref="dialogCrud"
+ :data="dialogData"
+ :option="dialogOption"
+ @row-save="rowSaveDialogHandler"
+ @row-update="rowUpdateDialogHandler"
+ @row-del="rowDeleteDialogHandler"
+ >
+ </avue-crud>
+ </el-col>
+ </el-row>
+ </el-form>
- <span slot="footer" class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="rowSaveHandler">纭� 瀹�</el-button>
<el-button @click="dialogVisible = false">鍙� 娑�</el-button>
</span>
- </el-dialog>
+ </el-dialog>
- <!-- 鏌ョ湅浣跨敤鑼冨洿 -->
- <el-dialog
- v-dialogDrag
- v-loading="checkViewLoading"
- :visible.sync="checkViewVisible"
- append-to-body="true"
- class="avue-dialog"
- title="鏌ョ湅浣跨敤鑼冨洿"
- width="70%"
- >
- <avue-crud
- ref="checkViewCrud"
- :data="checkViewData"
- :option="checkViewOption"
- @search-change="checkHandleSearch"
- @search-reset="checkHandleReset"
- >
+ <!-- 鏌ョ湅浣跨敤鑼冨洿 -->
+ <el-dialog
+ v-dialogDrag
+ v-loading="checkViewLoading"
+ :visible.sync="checkViewVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="鏌ョ湅浣跨敤鑼冨洿"
+ width="70%"
+ >
+ <avue-crud
+ ref="checkViewCrud"
+ :data="checkViewData"
+ :option="checkViewOption"
+ @search-change="checkHandleSearch"
+ @search-reset="checkHandleReset"
+ >
- </avue-crud>
- </el-dialog>
+ </avue-crud>
+ </el-dialog>
- <!--瀵煎叆 -->
- <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
- @updata="getTableList"></upload-file>
- </basic-container>
+ <!--瀵煎叆 -->
+ <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
+ @updata="getTableList"></upload-file>
+ </basic-container>
+ </el-main>
+
+ <el-aside width="30%">
+ <basic-container>
+ <el-descriptions :column="1" border size="medium" style="margin-bottom: 20px" title="鏋氫妇淇℃伅">
+ <el-descriptions-item>
+ <template slot="label">
+ 鍚嶇О
+ </template>
+ {{ this.lastItem.id }}
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 鏍囩
+ </template>
+ {{ this.lastItem.name }}
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 绫诲瀷
+ </template>
+ {{ this.lastItem.enumValueDataType || 'String' }}
+ </el-descriptions-item>
+ <el-descriptions-item>
+ <template slot="label">
+ 闀垮害
+ </template>
+ <el-tag> {{ this.lastItem.length || 50 }}</el-tag>
+ </el-descriptions-item>
+
+ </el-descriptions>
+
+ <p style="font-weight: bold">鏋氫妇椤�</p>
+ <avue-crud
+ :data="asideData"
+ :option="asideOption"
+ >
+ </avue-crud>
+ </basic-container>
+ </el-aside>
+ </el-container>
</template>
<script>
@@ -132,6 +175,31 @@
name: "index",
data() {
return {
+ asideOption: {
+ ...basicOption,
+ addBtn: false,
+ editBtn: false,
+ menu: false,
+ refreshBtn: false,
+ selection: false,
+ index: false,
+ column: [
+ {
+ label: '鏋氫妇椤瑰悕绉�',
+ prop: 'name',
+ sortable: true,
+ },
+ {
+ label: '鏋氫妇鍊�',
+ prop: 'value',
+ sortable: true,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'description',
+ },
+ ]
+ },
tipList: [
"瀵煎叆妯℃澘涓爣鏄庣孩鑹插瓧浣撶殑涓哄繀杈撻」",
"*娉ㄦ剰*:绗簩琛屽紑濮嬬殑鏁版嵁涓虹ず渚嬫暟鎹紝瀵煎叆鍓嶈灏嗗叾鍒犻櫎锛屽綋瀵煎叆鐨勬灇涓句笅鍏峰澶氫釜鏋氫妇椤规椂锛屽簲鎸夌収绀轰緥enum2鐨勫啓娉�",
@@ -255,6 +323,14 @@
searchParams: {}
}
},
+ computed: {
+ lastItem() {
+ return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1] : {};
+ },
+ asideData() {
+ return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1].items : [];
+ }
+ },
methods: {
//琛ㄦ牸鏌ヨ璇锋眰
getTableList() {
@@ -290,6 +366,7 @@
// 閫夋嫨妗�
selectChange(row) {
+ console.log(row)
this.selectList = row;
},
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index 8c09e9e..619ebf1 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -227,6 +227,7 @@
}
done();
},
+
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
--
Gitblit v1.9.3