From d24c9dde20cba23b96082b4db81b5223c75e4ea9 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期三, 08 三月 2023 09:06:28 +0800
Subject: [PATCH] 身份证正反面调整
---
src/views/systemSetting/platform/mySetting/index.vue | 277 +++++++++++++++++++++++++++++--------------------------
1 files changed, 147 insertions(+), 130 deletions(-)
diff --git a/src/views/systemSetting/platform/mySetting/index.vue b/src/views/systemSetting/platform/mySetting/index.vue
index 423859c..88b2c61 100644
--- a/src/views/systemSetting/platform/mySetting/index.vue
+++ b/src/views/systemSetting/platform/mySetting/index.vue
@@ -1,131 +1,139 @@
<template>
<div class="mySetting">
<!-- header 椤甸潰鏍囬鎻愮ず -->
- <header>
- <div class="headerTitle">绯荤粺璁剧疆 >> 闂ㄦ埛绠$悊 > 鑷畾涔夎彍鍗曡缃�</div>
- </header>
+ <!-- <header>
+ <div class="header-title">绯荤粺璁剧疆 >> 闂ㄦ埛绠$悊 > 鑷畾涔夎彍鍗曡缃�</div>
+ </header> -->
<main>
- <div class="mainContent">
+ <div class="main-content">
<!-- 鏁版嵁灞曠ず -->
- <el-table ref="multipleTable"
- :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
- :data="menuList" style="width: 100%" row-key="id" :row-class-name="tableRowClassName">
- <el-table-column type="selection" min-width="5">
- </el-table-column>
- <el-table-column prop="title" label="鑿滃崟鏍�" min-width="75">
- <el-tree :data="menuList" node-key="id" :default-expanded-keys="[0]"
- :default-checked-keys="[0]" :props="defaultProps">
+ <el-row class="my-container">
+ <el-col :span="6" class="my-aside">
+ <el-tree draggable :data="menuList" @node-click="handleNodeClick" :props="defaultProps"
+ accordion node-key="id" @node-drop="handleDrop" :allow-drop="allowDrop">
+ <span class="custom-tree-node" slot-scope="{ node, data }">
+ <span>{{ node.label }}</span>
+ </span>
</el-tree>
- </el-table-column>
- <el-table-column label="鎿嶄綔" min-width="20">
- <template slot-scope="scope">
- <div class="operation">
- <!-- <span @click="handleChangeRole(scope.row)">淇敼瑙掕壊</span> -->
- <span @click="handleFind(scope.row)">鏌ョ湅</span>
- <span class="line">|</span>
- <!-- <span>淇敼瀵嗙爜</span> -->
- <!-- <span>鍒犻櫎</span> -->
- <span @click="handleUpdate(scope.row)">淇敼瑙掕壊</span>
+ </el-col>
+ <el-col :span="18" class="my-content" v-if="article.title">
+ <div class="my-header">鑿滃崟绠$悊-{{article.title}}
+ </div>
+ <div class="my-name">
+ <div class="my-show__left">鍚嶇О:</div>
+ <div class="my-show__right">{{article.title}}</div>
+ </div>
+ <div class="my-desc">
+ <div class="my-show__left">鎻忚堪:</div>
+ <div class="my-show__right">{{article.title}}</div>
+ </div>
+ <div class="my-show">
+ <div class="my-show__left">鏄惁鏄剧ず鑿滃崟:</div>
+ <div class="my-show__right">
+ <el-switch class="switchStyle" v-model="article.isStart" active-color="#3fef9a"
+ inactive-color="#000212" @change="handleChangeStatus(article)">
+ </el-switch>
</div>
- </template>
- </el-table-column>
- </el-table>
- <!-- 鏌ョ湅淇敼椤甸潰 -->
- <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '淇敼瑙掕壊淇℃伅' :'鏌ョ湅瑙掕壊淇℃伅'"
- v-if="dialogUpdate">
-
- </el-dialog>
+ </div>
+ </el-col>
+ </el-row>
</div>
</main>
+ <footer>
+ <!-- 鏂板寮圭獥 -->
+ <el-dialog title="鎻愮ず" :visible.sync="dialogAdd" v-if="dialogAdd" width="45%" :before-close="handleClose">
+ <MyAdd></MyAdd>
+ </el-dialog>
+ </footer>
</div>
</template>
<script>
-import helper from "@/utils/mydate.js"
+import MyAdd from './create'
export default {
+ components: {
+ MyAdd
+ },
data() {
return {
menuList: [],
- article: [],
+ article: {},
defaultProps: {
children: 'menuVoArrayList',
label: 'title'
},
- count: 1,
- menuList: [],
- context: "",
- dialogCreate: false,
- dialogUpdate: false,
- updateFlag: false,
- userInfo: '',
+ dialogAdd: false,
}
},
created() {
this.getMenuList();
},
methods: {
+ // 鐐瑰嚮鑺傜偣
+ handleNodeClick(data) {
+ this.article = { ...data };
+ this.article.isStart === 0 ? this.article.isStart = false : this.article.isStart = true
+ },
+ // 淇敼鐘舵��
+ handleChangeStatus(data) {
+ let { isStart, relationId } = data;
+ isStart ? isStart = 1 : isStart = 0;
+ this.$axios({
+ method: 'put',
+ url: `sccg/system/portal/menu/modification_myself?relationId=${relationId}&status=${isStart}`
+ })
+ .then(res => {
+ this.$message({
+ type: res.code === 200 ? 'success' : 'error',
+ message: res.message
+ })
+ this.getMenuList();
+ this.article = {};
+ })
+ },
+ handleDelete(data) {
+ this.$confirm('鎮ㄧ‘璁よ鍒犻櫎璁㈠崟鍚�?')
+ .then(_ => {
+ this.$axios({
+ method: 'post',
+ url: `sccg/menu/delete/${data.id}`
+ })
+ .then(res => {
+ this.$message({
+ type: res.code === 200 ? 'success' : 'error',
+ message: res.code === 200 ? '鍒犻櫎鑿滃崟鎴愬姛' : res.message
+ })
+ if (res.code === 200) {
+ this.getMenuList();
+ }
+ })
+ })
+ .catch(err => {
+ })
+ },
// 鑾峰彇鑿滃崟鍒楄〃
getMenuList() {
this.$axios({
method: 'get',
- url: 'sccg/system/portal/menu/search',
+ url: 'sccg/system/portal/menu/search_myself',
}).then(res => {
- this.menuList = res.data.records;
- this.getContent(0);
+ this.menuList = res.data.menu;
})
},
- // 鍒囨崲鑿滃崟鍐呭灞曠ず
- getContent(index, sonIndex = null) {
- if (sonIndex === null) {
- this.article = this.menuList[index];
-
- return;
- }
- this.article = this.menuList[index].menuVoArrayList[sonIndex];
+ // 鎷栨嫿
+ handleDrop(before, after, inner, event) {
},
- // 璁剧疆琛ㄦ牸鏂戦┈绾�
- tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 == 0) {
- return 'warning-row';
- } else {
- return 'success-row';
- }
- return '';
- },
- handleCheckChange(data, checked, indeterminate) {
- console.log(data, checked, indeterminate);
- },
- handleNodeClick(data) {
- console.log(data);
- },
- loadNode(node, resolve) {
- if (node.level === 0) {
- return resolve([{ name: 'region1' }, { name: 'region2' }]);
- }
- if (node.level > 3) return resolve([]);
-
- var hasChild;
- if (node.data.name === 'region1') {
- hasChild = true;
- } else if (node.data.name === 'region2') {
- hasChild = false;
- } else {
- hasChild = Math.random() > 0.5;
- }
-
- setTimeout(() => {
- var data;
- if (hasChild) {
- data = [{
- name: 'zone' + this.count++
- }, {
- name: 'zone' + this.count++
- }];
+ // 鑾峰彇鏄惁鍙互鏀剧疆
+ allowDrop(before, inner, next) {
+ if (before.data.level === inner.data.level) {
+ if (before.data.parentId === inner.data.parentId) {
+ return next === "prev" || next === "next";
} else {
- data = [];
+ return false;
}
-
- resolve(data);
- }, 500);
+ } else {
+ // 涓嶅悓绾ц繘琛屽鐞�
+ return false;
+ }
}
}
@@ -135,62 +143,67 @@
.mySetting {
margin: 10px 20px;
text-align: left;
- color: #4b9bb7;
+ // color: #4b9bb7;
header {
line-height: 60px;
padding: 0 20px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .header-add {
+ .el-button {
+ background-color: #eb5d01;
+ border: none;
+ }
+ }
}
main {
- background-color: #09152f;
+ // background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
- .mainTitle {
- line-height: 60px;
- }
+ .main-content {
+ .my-container {
+ ::v-deep .el-tree-node__content {
+ height: 36px;
+ }
- .el-table {
- color: #4b9bb7;
- font-size: 10px;
-
- &::v-deep .el-table__cell {
- text-align: center;
+ ::v-deep .el-tree-node__label {
+ line-height: 20px;
+ }
}
- &::v-deep .el-table__empty-block {
- background-color: #09152f;
- color: #4b9bb7;
- }
- &::v-deep .el-table__row:hover{
- background-color: #4b9bb7;
- }
- .el-tree {
- background-color: #071f39;
- }
-
- .operation {
+ .my-header {
+ line-height: 60px;
display: flex;
justify-content: center;
-
- .line {
- padding: 0 5px;
- }
-
- span:hover {
- cursor: pointer;
- }
}
- }
- .el-table::v-deep .warning-row {
- background: #06122c;
- }
+ .my-name,
+ .my-desc,
+ .my-show {
+ line-height: 40px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
- .el-table::v-deep .success-row {
- background: #071f39;
+ .my-show__right {
+ margin-left: 10px;
+ }
+
+ .custom-tree-node {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 14px;
+ line-height: 20px;
+ padding-right: 8px;
+ }
}
&::v-deep .switchStyle .el-switch__label {
@@ -250,4 +263,8 @@
padding: 0;
}
}
+
+.my-aside{
+ border-right: 1px solid #d3d3d3 ;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0