cz 1 year ago
parent
commit
a6fd99545a

+ 1 - 1
.env.development

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = 三梵职能
+VITE_APP_TITLE = 三梵
 
 # 开发环境配置
 VITE_APP_ENV = 'development'

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = 三梵职能
+VITE_APP_TITLE = 三梵
 
 # 生产环境配置
 VITE_APP_ENV = 'production'

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = 三梵职能
+VITE_APP_TITLE = 三梵
 
 # 生产环境配置
 VITE_APP_ENV = 'staging'

+ 1 - 1
index.html

@@ -7,7 +7,7 @@
   <meta name="renderer" content="webkit">
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
   <link rel="icon" href="/favicon.ico">
-  <title>三梵职能</title>
+  <title>三梵</title>
   <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
   <style>
     html,

+ 2 - 2
package.json

@@ -1,8 +1,8 @@
 {
   "name": "ruoyi",
   "version": "3.8.5",
-  "description": "三梵职能",
-  "author": "三梵职能",
+  "description": "三梵",
+  "author": "三梵",
   "license": "MIT",
   "scripts": {
     "dev": "vite",

+ 8 - 0
src/api/login.js

@@ -69,4 +69,12 @@ export function getTenantList() {
     method: 'get',
     timeout: 20000
   })
+}
+
+// 获取用户所有字典
+export function allDictMap() {
+  return request({
+    url: "/tenantDict/allDictMap",
+    method: "get",
+  });
 }

+ 1 - 1
src/assets/icons/iconfont/iconfont.json

@@ -1,6 +1,6 @@
 {
   "id": "3933484",
-  "name": "三梵职能",
+  "name": "三梵",
   "font_family": "iconfont",
   "css_prefix_text": "icon-",
   "description": "",

+ 11 - 2
src/assets/styles/element-ui.scss

@@ -107,7 +107,7 @@
 
 .el-dialog__body {
   background: #fff;
-  padding: 20px 30px !important;
+  // padding: 20px 30px !important;
 }
 
 .el-dialog__footer {
@@ -122,10 +122,15 @@
 
 .el-form-item {
   // padding: 0!important;
+  margin-bottom: 22px !important;
+}
+
+.margin-b-0.el-form-item {
+  margin-bottom: 0px !important;
 }
 
 .el-form-item__label {
-  height: 22px !important;
+  // height: 22px !important;
 }
 
 .el-tree-node__content {
@@ -143,6 +148,10 @@
   background-color: #EFF6FF !important;
 }
 
+.el-input__wrapper {
+  border-radius: 1px !important;
+}
+
 .el-input.is-disabled .el-input__wrapper {
   background: #fff !important;
   // border: none !important;

+ 1 - 1
src/assets/styles/index.scss

@@ -219,7 +219,7 @@ aside {
 
 // 20223/05/04增加
 .public_height_dialog {
-  height: calc(100vh - 260px);
+  height: calc(100vh - 270px);
   overflow: auto;
 }
 

+ 313 - 271
src/assets/styles/ruoyi.scss

@@ -4,274 +4,316 @@
  */
 
  /** 基础通用 **/
-.pt5 {
-	padding-top: 5px;
-}
-.pr5 {
-	padding-right: 5px;
-}
-.pb5 {
-	padding-bottom: 5px;
-}
-.mt5 {
-	margin-top: 5px;
-}
-.mr5 {
-	margin-right: 5px;
-}
-.mb5 {
-	margin-bottom: 5px;
-}
-.mb8 {
-	margin-bottom: 8px;
-}
-.ml5 {
-	margin-left: 5px;
-}
-.mt10 {
-	margin-top: 10px;
-}
-.mr10 {
-	margin-right: 10px;
-}
-.mb10 {
-	margin-bottom: 10px;
-}
-.ml10 {
-	margin-left: 10px;
-}
-.mt20 {
-	margin-top: 20px;
-}
-.mr20 {
-	margin-right: 20px;
-}
-.mb20 {
-	margin-bottom: 20px;
-}
-.ml20 {
-	margin-left: 20px;
-}
-
-.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
-	font-family: inherit;
-	font-weight: 500;
-	line-height: 1.1;
-	color: inherit;
-}
-
-.el-form .el-form-item__label {
-	font-weight: 700;
-}
-.el-dialog:not(.is-fullscreen) {
-	margin-top: 6vh !important;
-}
-
-.el-dialog.scrollbar .el-dialog__body {
-	overflow: auto;
-	overflow-x: hidden;
-	max-height: 70vh;
-	padding: 10px 20px 0;
-}
-
-.el-table {
-	.el-table__header-wrapper, .el-table__fixed-header-wrapper {
-		th {
-			word-break: break-word;
-			background-color: #EEEEEE !important;
-			color: #515a6e;
-			height: 50px !important;
-			font-size: 14px;
-		}
-	}
-	.el-table__body-wrapper {
-		.el-button [class*="el-icon-"] + span {
-			margin-left: 1px;
-		}
-	}
-}
-
-/** 表单布局 **/
-.form-header {
-    font-size:15px;
-	color:#6379bb;
-	border-bottom:1px solid #ddd;
-	margin:8px 10px 25px 10px;
-	padding-bottom:5px
-}
-
-/** 表格布局 **/
-.pagination-container {
-	// position: relative;
-	height: 25px;
-	margin-bottom: 10px;
-	margin-top: 15px;
-	padding: 10px 20px !important;
-}
-
-/* tree border */
-.tree-border {
-    margin-top: 5px;
-    border: 1px solid #e5e6e7;
-    background: #FFFFFF none;
-    border-radius:4px;
-    width: 100%;
-}
-
-.pagination-container .el-pagination {
-	right: 0;
-	position: absolute;
-}
-
-@media ( max-width : 768px) {
-  .pagination-container .el-pagination > .el-pagination__jump {
-    display: none !important;
-  }
-  .pagination-container .el-pagination > .el-pagination__sizes {
-    display: none !important;
-  }
-}
-
-.el-table .fixed-width .el-button--small {
-	padding-left: 0;
-	padding-right: 0;
-	width: inherit;
-}
-
-/** 表格更多操作下拉样式 */
-.el-table .el-dropdown-link {
-	cursor: pointer;
-	color: #409EFF;
-	margin-left: 10px;
-}
-
-.el-table .el-dropdown, .el-icon-arrow-down {
-	font-size: 12px;
-}
-
-.el-tree-node__content > .el-checkbox {
-	margin-right: 8px;
-}
-
-.list-group-striped > .list-group-item {
-	border-left: 0;
-	border-right: 0;
-	border-radius: 0;
-	padding-left: 0;
-	padding-right: 0;
-}
-
-.list-group {
-	padding-left: 0px;
-	list-style: none;
-}
-
-.list-group-item {
-	border-bottom: 1px solid #e7eaec;
-	border-top: 1px solid #e7eaec;
-	margin-bottom: -1px;
-	padding: 11px 0px;
-	font-size: 13px;
-}
-
-.pull-right {
-	float: right !important;
-}
-
-.el-card__header {
-	padding: 14px 15px 7px !important;
-	min-height: 40px;
-}
-
-.el-card__body {
-	padding: 15px 20px 20px 20px !important;
-}
-
-.card-box {
-	padding-right: 15px;
-	padding-left: 15px;
-	margin-bottom: 10px;
-}
-
-/* button color */
-.el-button--cyan.is-active,
-.el-button--cyan:active {
-  background: #20B2AA;
-  border-color: #20B2AA;
-  color: #FFFFFF;
-}
-
-.el-button--cyan:focus,
-.el-button--cyan:hover {
-  background: #48D1CC;
-  border-color: #48D1CC;
-  color: #FFFFFF;
-}
-
-.el-button--cyan {
-  background-color: #20B2AA;
-  border-color: #20B2AA;
-  color: #FFFFFF;
-}
-
-/* text color */
-.text-navy {
-	color: #1ab394;
-}
-
-.text-primary {
-	color: inherit;
-}
-
-.text-success {
-	color: #1c84c6;
-}
-
-.text-info {
-	color: #23c6c8;
-}
-
-.text-warning {
-	color: #f8ac59;
-}
-
-.text-danger {
-	color: #ed5565;
-}
-
-.text-muted {
-	color: #888888;
-}
-
-/* image */
-.img-circle {
-	border-radius: 50%;
-}
-
-.img-lg {
-	width: 120px;
-	height: 120px;
-}
-
-.avatar-upload-preview {
-	position: absolute;
-	top: 50%;
-	transform: translate(50%, -50%);
-	width: 200px;
-	height: 200px;
-	border-radius: 50%;
-	box-shadow: 0 0 4px #ccc;
-	overflow: hidden;
-}
-
-/* 拖拽列样式 */
-.sortable-ghost{
-	opacity: .8;
-	color: #fff!important;
-	background: #42b983!important;
-}
-
-/* 表格右侧工具栏样式 */
-.top-right-btn {
-	margin-left: auto;
-}
+ .pt5 {
+ 	padding-top: 5px;
+ }
+
+ .pr5 {
+ 	padding-right: 5px;
+ }
+
+ .pb5 {
+ 	padding-bottom: 5px;
+ }
+
+ .mt5 {
+ 	margin-top: 5px;
+ }
+
+ .mr5 {
+ 	margin-right: 5px;
+ }
+
+ .mb5 {
+ 	margin-bottom: 5px;
+ }
+
+ .mb8 {
+ 	margin-bottom: 8px;
+ }
+
+ .ml5 {
+ 	margin-left: 5px;
+ }
+
+ .mt10 {
+ 	margin-top: 10px;
+ }
+
+ .mr10 {
+ 	margin-right: 10px;
+ }
+
+ .mb10 {
+ 	margin-bottom: 10px;
+ }
+
+ .ml10 {
+ 	margin-left: 10px;
+ }
+
+ .mt20 {
+ 	margin-top: 20px;
+ }
+
+ .mr20 {
+ 	margin-right: 20px;
+ }
+
+ .mb20 {
+ 	margin-bottom: 20px;
+ }
+
+ .ml20 {
+ 	margin-left: 20px;
+ }
+
+ .h1,
+ .h2,
+ .h3,
+ .h4,
+ .h5,
+ .h6,
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ 	font-family: inherit;
+ 	font-weight: 500;
+ 	line-height: 1.1;
+ 	color: inherit;
+ }
+
+ .el-form .el-form-item__label {
+ 	font-weight: 700;
+ }
+
+ .el-dialog:not(.is-fullscreen) {
+ 	margin-top: 6vh !important;
+ }
+
+ .el-dialog.scrollbar .el-dialog__body {
+ 	overflow: auto;
+ 	overflow-x: hidden;
+ 	max-height: 70vh;
+ 	padding: 10px 20px 0;
+ }
+
+ .el-table {
+
+ 	.el-table__header-wrapper,
+ 	.el-table__fixed-header-wrapper {
+ 		th {
+ 			word-break: break-word;
+ 			background-color: #EEEEEE !important;
+ 			color: #515a6e;
+ 			height: 50px !important;
+ 			font-size: 14px;
+ 		}
+ 	}
+
+ 	.el-table__body-wrapper {
+ 		.el-button [class*="el-icon-"]+span {
+ 			margin-left: 1px;
+ 		}
+ 	}
+ }
+
+ /** 表单布局 **/
+ .form-header {
+ 	font-size: 15px;
+ 	color: #6379bb;
+ 	border-bottom: 1px solid #ddd;
+ 	margin: 8px 10px 25px 10px;
+ 	padding-bottom: 5px
+ }
+
+ /** 表格布局 **/
+ .pagination-container {
+ 	// position: relative;
+ 	height: 25px;
+ 	margin-bottom: 10px;
+ 	margin-top: 15px;
+ 	padding: 10px 20px !important;
+ }
+
+ /* tree border */
+ .tree-border {
+ 	margin-top: 5px;
+ 	border: 1px solid #e5e6e7;
+ 	background: #FFFFFF none;
+ 	border-radius: 4px;
+ 	width: 100%;
+ }
+
+ .pagination-container .el-pagination {
+ 	right: 0;
+ 	position: absolute;
+ }
+
+ @media (max-width : 768px) {
+ 	.pagination-container .el-pagination>.el-pagination__jump {
+ 		display: none !important;
+ 	}
+
+ 	.pagination-container .el-pagination>.el-pagination__sizes {
+ 		display: none !important;
+ 	}
+ }
+
+ .el-table .fixed-width .el-button--small {
+ 	padding-left: 0;
+ 	padding-right: 0;
+ 	width: inherit;
+ }
+
+ /** 表格更多操作下拉样式 */
+ .el-table .el-dropdown-link {
+ 	cursor: pointer;
+ 	color: #409EFF;
+ 	margin-left: 10px;
+ }
+
+ .el-table .el-dropdown,
+ .el-icon-arrow-down {
+ 	font-size: 12px;
+ }
+
+ .el-tree-node__content>.el-checkbox {
+ 	margin-right: 8px;
+ }
+
+ .list-group-striped>.list-group-item {
+ 	border-left: 0;
+ 	border-right: 0;
+ 	border-radius: 0;
+ 	padding-left: 0;
+ 	padding-right: 0;
+ }
+
+ .list-group {
+ 	padding-left: 0px;
+ 	list-style: none;
+ }
+
+ .list-group-item {
+ 	border-bottom: 1px solid #e7eaec;
+ 	border-top: 1px solid #e7eaec;
+ 	margin-bottom: -1px;
+ 	padding: 11px 0px;
+ 	font-size: 13px;
+ }
+
+ .pull-right {
+ 	float: right !important;
+ }
+
+ .el-card__header {
+ 	padding: 14px 15px 7px !important;
+ 	min-height: 40px;
+ }
+
+ .el-card {
+ 	border: none !important;
+ }
+
+ .el-card__body {
+ 	// padding: 15px 20px 20px 20px !important;
+ 	padding: 15px !important;
+
+ }
+
+ .el-card.is-always-shadow {
+ 	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.12) !important;
+ }
+
+ .card-box {
+ 	padding-right: 15px;
+ 	padding-left: 15px;
+ 	margin-bottom: 10px;
+ }
+
+ /* button color */
+ .el-button--cyan.is-active,
+ .el-button--cyan:active {
+ 	background: #20B2AA;
+ 	border-color: #20B2AA;
+ 	color: #FFFFFF;
+ }
+
+ .el-button--cyan:focus,
+ .el-button--cyan:hover {
+ 	background: #48D1CC;
+ 	border-color: #48D1CC;
+ 	color: #FFFFFF;
+ }
+
+ .el-button--cyan {
+ 	background-color: #20B2AA;
+ 	border-color: #20B2AA;
+ 	color: #FFFFFF;
+ }
+
+ /* text color */
+ .text-navy {
+ 	color: #1ab394;
+ }
+
+ .text-primary {
+ 	color: inherit;
+ }
+
+ .text-success {
+ 	color: #1c84c6;
+ }
+
+ .text-info {
+ 	color: #23c6c8;
+ }
+
+ .text-warning {
+ 	color: #f8ac59;
+ }
+
+ .text-danger {
+ 	color: #ed5565;
+ }
+
+ .text-muted {
+ 	color: #888888;
+ }
+
+ /* image */
+ .img-circle {
+ 	border-radius: 50%;
+ }
+
+ .img-lg {
+ 	width: 120px;
+ 	height: 120px;
+ }
+
+ .avatar-upload-preview {
+ 	position: absolute;
+ 	top: 50%;
+ 	transform: translate(50%, -50%);
+ 	width: 200px;
+ 	height: 200px;
+ 	border-radius: 50%;
+ 	box-shadow: 0 0 4px #ccc;
+ 	overflow: hidden;
+ }
+
+ /* 拖拽列样式 */
+ .sortable-ghost {
+ 	opacity: .8;
+ 	color: #fff !important;
+ 	background: #42b983 !important;
+ }
+
+ /* 表格右侧工具栏样式 */
+ .top-right-btn {
+ 	margin-left: auto;
+ }

+ 25 - 20
src/components/byForm/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="by-form">
-    <el-form :model="formData" :label-width="formOption.labelWidth" :inline="formOption.inline || false" :rules="rules"
-             :labelPosition="formOption.labelPosition || 'top'" ref="byForm" :disabled="formOption.disabled || false">
+    <el-form :model="formData" :label-width="formOption.labelWidth || '100px'" :inline="formOption.inline || false" :rules="rules"
+             :labelPosition="formOption.labelPosition || 'right'" ref="byForm" :disabled="formOption.disabled || false">
       <template v-for="i in formConfig" :key="i.model">
         <el-form-item :label="i.label" :prop="i.prop" v-if="i.isShow || i.isShow == undefined" :style="
-            i.type == 'title'
+            (i.type == 'title'||i.type == 'title1')
               ? 'width:100%'
               : i.itemWidth
               ? 'width:' + i.itemWidth + '%'
@@ -12,12 +12,8 @@
               ? 'width:' + formOption.itemWidth + '%'
               : '100%'
           " :class="
-            i.type == 'json'
-              ? i.isHide
-                ? 'by-form-json dn'
-                : 'by-form-json'
-              : i.isHide
-              ? 'dn'
+            (i.type == 'title'||i.type == 'title1')?
+             'formTitle'
               : ''
           ">
           <el-input v-if="i.type == 'input'" v-model="formData[i.prop]" :placeholder="i.placeholder || $t('common.pleaseEnter')"
@@ -86,12 +82,18 @@
           </div> -->
 
           <div v-else-if="i.type == 'title'" style="width:100%">
-            <div v-if="i.haveLine" style="width:calc(100% + 90px);margin-left:-45px;background:#F0F2F5;height:15px"></div>
+            <div v-if="i.haveLine" style="width:calc(100% + 80px);margin-left:-45px;background:#F0F2F5;height:15px"></div>
             <div :style="{marginTop:i.haveLine?'15px':''}" style="margin-left:-15px;">
               <TitleInfo :content="i.title"></TitleInfo>
             </div>
           </div>
 
+          <div v-else-if="i.type == 'title1'" style="width:100%">
+            <div>
+              <TitleInfo :content="i.title"></TitleInfo>
+            </div>
+          </div>
+
           <slot :name="i.slotName" v-else-if="i.type == 'slot'">
             {{ i.slotName }}插槽占位符
           </slot>
@@ -118,10 +120,10 @@
               </el-table-column>
             </el-table>
           </div>
-          <div v-else-if="i.type == 'json'">
+          <!-- <div v-else-if="i.type == 'json'">
             <byForm :formConfig="i.json" :formOption="formOption" v-model="formData[i.prop]" ref="byform" :rules="rules">
             </byForm>
-          </div>
+          </div> -->
         </el-form-item>
       </template>
     </el-form>
@@ -357,9 +359,9 @@ const handleSubmit = async (onSubmit) => {
     if (flag) {
       const form = { ...formData.value };
       proxy.formConfig.map((item) => {
-        if (item.type == "json") {
-          form[item.prop] = JSON.stringify(form[item.prop]);
-        }
+        // if (item.type == "json") {
+        //   form[item.prop] = JSON.stringify(form[item.prop]);
+        // }
         // if (item.type == 'input') {
         //   form[item.prop] = form[item.prop].trim();
         // }
@@ -395,7 +397,10 @@ loadInit();
   box-sizing: border-box;
 }
 .by-form .el-form--inline > .el-form-item {
-  padding: 0 10px;
+  padding: 0 20px 0 10px;
+}
+.by-form .el-form--inline .formTitle {
+  padding: 0px !important;
 }
 
 /* .el-form--inline.el-form--label-top{
@@ -405,11 +410,11 @@ loadInit();
 .dn {
   display: none !important;
 }
-.by-form-json .by-form .el-form .el-form-item {
+/* .by-form-json .by-form .el-form .el-form-item {
   margin-bottom: 18px;
-}
+} */
 
-.by-form-json {
+/* .by-form-json {
   padding: 0px !important;
-}
+} */
 </style>

+ 31 - 12
src/components/byTable/index.vue

@@ -56,25 +56,33 @@
           </el-button>
         </div>
         <div class="by-dropdown" v-for="(i, index) in selectConfigCopy" :key="i.prop" style="margin-right: 10px">
-          <div class="by-dropdown-title">
-            {{
+          <div v-if="i.type" class="selectTime" style="display:flex;align-items:center">
+            <span style="font-size:14px;height:32px;margin-right:15px">{{i.label || ''}}</span>
+            <el-date-picker v-model="pagination[i.prop]" type="date" size="small" :placeholder="i.placeholder" style="width:120px" />
+            <span style="margin-right:15px">-</span>
+            <el-date-picker v-model="pagination[i.propOne]" type="date" size="small" :placeholder="i.placeholderOne" style="width:120px" />
+          </div>
+          <div v-else>
+            <div class="by-dropdown-title">
+              {{
               pagination[i.prop]
                 ? i.data.find((j) => j.value === pagination[i.prop])
                   ? i.data.find((j) => j.value === pagination[i.prop]).label
                   : i.label
                 : i.labelCopy
             }}
-            <!-- {{ i.label || i.labelCopy }} -->
-            <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
+              <!-- {{ i.label || i.labelCopy }} -->
+              <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
+            </div>
+            <ul class="by-dropdown-lists">
+              <li @click="searchItemSelct('all', i, index)" v-if="i.isShowAll === false ? i.isShowAll : true" style="">
+                {{ $t("common.all") }}
+              </li>
+              <li v-for="j in i.data" :key="j.value" @click="searchItemSelct(j, i)" style="">
+                {{ j.label }}
+              </li>
+            </ul>
           </div>
-          <ul class="by-dropdown-lists">
-            <li @click="searchItemSelct('all', i, index)" v-if="i.isShowAll === false ? i.isShowAll : true" style="">
-              {{ $t("common.all") }}
-            </li>
-            <li v-for="j in i.data" :key="j.value" @click="searchItemSelct(j, i)" style="">
-              {{ j.label }}
-            </li>
-          </ul>
         </div>
       </div>
 
@@ -756,4 +764,15 @@ export default defineComponent({
   overflow-y: auto;
   line-height: 1;
 }
+:deep(.selectTime .el-input__wrapper) {
+  box-shadow: none;
+}
+:deep(.selectTime .el-input__inner) {
+  color: #000 !important;
+  font-size: 14px !important;
+}
+:deep(.selectTime .el-input .el-input__icon) {
+  color: #000 !important;
+  font-size: 14px !important;
+}
 </style>

+ 1 - 1
src/components/headerBar/header-bar.vue

@@ -2,7 +2,7 @@
   <div id="main" class="header-bar" @click="isChildMenu = false">
     <header>
       <ul class="nav">
-        <!-- <div class="logo">三梵职能</div> -->
+        <!-- <div class="logo">三梵</div> -->
         <div class="logo" style="display: flex; align-items: center; justify-content: center">
           <img v-if="!logoUrl" :src="'/img/logo2.png'" />
           <el-image v-else style="width: 120px; height: 30px" :src="logoUrl" fit="scale-down" />

+ 97 - 0
src/components/process/SF/Contract.vue

@@ -0,0 +1,97 @@
+<template>
+  <div>
+    <el-form :model="formData.data" :rules="rules" label-width="120px" ref="formDom">
+      <el-card>
+        <div style="margin-bottom:20px">
+          <TitleInfo :content="'基础信息'"></TitleInfo>
+        </div>
+        <el-row :gutter="10">
+          <el-col :span="12">
+            <el-form-item label="sellAddress:" prop="sellAddress">
+              <el-input v-model="formData.data.sellAddress" placeholder="请输入" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="Activity name:">
+              <el-input v-model="formData.dataname" placeholder="请输入" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-card>
+
+      <el-card style="margin-top:20px">
+        <div style="margin-bottom:20px">
+          <TitleInfo :content="'基础信息'"></TitleInfo>
+        </div>
+        <el-row :gutter="10">
+          <el-col :span="8">
+            <el-form-item label="sellAddress:" prop="sellAddress">
+              <el-input v-model="formData.data.sellAddress" placeholder="请输入" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="Activity name:">
+              <el-input v-model="formData.dataname" placeholder="请输入" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="Activity name:">
+              <el-input v-model="formData.dataname" placeholder="请输入" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-card>
+      <el-form-item>
+        <el-button type="primary" @click="onSubmit()">
+          Create
+        </el-button>
+        <el-button @click="resetForm(ruleFormRef)">Reset</el-button>
+      </el-form-item>
+
+    </el-form>
+  </div>
+</template>
+
+<script setup>
+const { proxy } = getCurrentInstance();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = ref({
+  sellCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
+  ],
+  buyCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
+  ],
+  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+});
+// 字典数据
+const arr = computed(() => proxy.useUserStore().allDict["enterprise_type"]);
+const onSubmit = () => {
+  console.log(proxy.useUserStore(), "aaa");
+  formDom.value.validate((valid) => {
+    console.log(valid, "sss");
+    if (valid) {
+    }
+  });
+  // proxy.msgTip("aa", 1);
+  // proxy.msgConfirm().then(
+  //   (res) => {
+  //     console.log(res, "ss");
+  //   },
+  //   (err) => {
+  //     console.log(err, "aa");
+  //   }
+  // );
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 1 - 1
src/directive/common/disabledBtn.js → src/directive/common/debounce.js

@@ -6,7 +6,7 @@ export default {
       setTimeout(() => {
         el.disabled = false;
         el.classList.remove('is-disabled');
-      }, 1500);
+      }, binding.value ? binding.value : 2000);
     })
   }
 }

+ 2 - 2
src/directive/index.js

@@ -1,13 +1,13 @@
 import hasRole from './permission/hasRole'
 import hasPermi from './permission/hasPermi'
 import copyText from './common/copyText'
-import disabledBtn from './common/disabledBtn'
+import debounce from './common/debounce'
 import mousewheel from './permission/mousewheel'
 
 export default function directive(app) {
   app.directive('hasRole', hasRole)
   app.directive('hasPermi', hasPermi)
   app.directive('copyText', copyText)
-  app.directive('disabledBtn', disabledBtn)
+  app.directive('debounce', debounce)
   app.directive('mousewheel', mousewheel)
 }

+ 2 - 2
src/lang/en.js

@@ -103,7 +103,7 @@ export const lang = {
 		deviceInformation: "设备信息",
 		switchLanguage: 'switch English',
 		logOut: '退出登录',
-		title: "三梵职能管理系统",
+		title: "三梵管理系统",
 		form: {
 			tenantId: "请输入租户ID",
 			username: "请输入账号",
@@ -113,7 +113,7 @@ export const lang = {
 		loginText: '登录',
 		demo: "demo",
 		agreement: {
-			text: "已阅读并同意:三梵职能",
+			text: "已阅读并同意:三梵",
 			clause: "服务条款",
 			agreement: "隐私协议",
 			and: "和"

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -28,7 +28,7 @@ defineProps({
   },
 });
 
-const title = ref("三梵职能");
+const title = ref("三梵");
 const settingsStore = useSettingsStore();
 const sideTheme = computed(() => settingsStore.sideTheme);
 </script>

+ 14 - 16
src/layout/index.vue

@@ -1,19 +1,8 @@
 <template>
-  <div
-    :class="classObj"
-    class="app-wrapper"
-    :style="{ '--current-color': theme }"
-  >
-    <div
-      v-if="device === 'mobile' && sidebar.opened"
-      class="drawer-bg"
-      @click="handleClickOutside"
-    />
+  <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
+    <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
     <sidebar v-if="!sidebar.hide" class="sidebar-container" />
-    <div
-      :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
-      class="main-container"
-    >
+    <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
       <div :class="{ 'fixed-header': fixedHeader }">
         <navbar @setLayout="setLayout" />
         <headerBar></headerBar>
@@ -21,7 +10,7 @@
       </div>
       <app-main />
       <settings ref="settingRef" />
-      
+
     </div>
   </div>
 </template>
@@ -35,7 +24,7 @@ import defaultSettings from "@/settings";
 import headerBar from "@/components/headerBar/header-bar";
 import useAppStore from "@/store/modules/app";
 import useSettingsStore from "@/store/modules/settings";
-
+const { proxy } = getCurrentInstance();
 const settingsStore = useSettingsStore();
 const theme = computed(() => settingsStore.theme);
 const sideTheme = computed(() => settingsStore.sideTheme);
@@ -74,6 +63,15 @@ const settingRef = ref(null);
 function setLayout() {
   settingRef.value.openSetting();
 }
+
+const getAllDict = () => {
+  proxy
+    .useUserStore()
+    .allDictMap()
+    .then(() => {})
+    .catch(() => {});
+};
+getAllDict();
 </script>
 
 <style lang="scss" scoped>

+ 17 - 26
src/main.js

@@ -1,20 +1,15 @@
 import {
   createApp
 } from 'vue'
-
 import Cookies from 'js-cookie'
-
 import ElementPlus from 'element-plus'
 import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
-
 import '@/utils/table2excel'
 import '@/assets/styles/index.scss' // global css
-
 import App from './App'
 import store from './store'
 import router from './router'
 import directive from './directive' // directive
-
 // 注册指令
 import plugins from './plugins' // plugins
 import {
@@ -23,18 +18,19 @@ import {
   postTwo,
   get
 } from '@/utils/request'
-
 // svg图标
 import 'virtual:svg-icons-register'
 import SvgIcon from '@/components/SvgIcon'
 import elementIcons from '@/components/SvgIcon/svgicon'
-
+// 标题组件
+import TitleInfo from "@/components/TitleInfo/index.vue";
+// 路由权限
 import './permission' // permission control
-
+// userStore
+import useUserStore from "@/store/modules/user";
 import {
   useDict
 } from '@/utils/dict'
-
 import {
   parseTime,
   resetForm,
@@ -43,11 +39,8 @@ import {
   selectDictLabel,
   selectDictLabels
 } from '@/utils/ruoyi'
-
-
-
 import {
-  dictDataEcho,
+  dictKeyValue,
   dictValueLabel,
   moneyFormat,
   calculationWeek,
@@ -60,7 +53,9 @@ import {
   deepClone,
   timeInterval,
   compareTime,
-  getImgBase64
+  getImgBase64,
+  msgTip,
+  msgConfirm
 } from '@/utils/util'
 
 // 分页组件
@@ -77,20 +72,19 @@ import TreeSelect from '@/components/TreeSelect'
 import DictTag from '@/components/DictTag'
 // 多语言
 import i18n from "@/lang/index";
-
 // 打印
 import print from "vue3-print-nb"
 // import * as echarts from "echarts";
-
 // import 'echarts-gl'
 // import './world.js'
-
 const app = createApp(App)
 console.log(i18n.global.t('login.welcomeToLogin'))
 // 全局方法挂载
 app.config.globalProperties.useDict = useDict
 app.config.globalProperties.get = get
 app.config.globalProperties.post = post
+app.config.globalProperties.msgTip = msgTip
+app.config.globalProperties.msgConfirm = msgConfirm
 app.config.globalProperties.postTwo = postTwo
 app.config.globalProperties.download = download
 app.config.globalProperties.parseTime = parseTime
@@ -101,7 +95,7 @@ app.config.globalProperties.selectDictLabel = selectDictLabel
 app.config.globalProperties.selectDictLabels = selectDictLabels
 app.config.globalProperties.t = i18n.global.t
 //字典回显
-app.config.globalProperties.dictDataEcho = dictDataEcho
+app.config.globalProperties.dictKeyValue = dictKeyValue
 app.config.globalProperties.dictValueLabel = dictValueLabel
 app.config.globalProperties.moneyFormat = moneyFormat
 app.config.globalProperties.calculationWeek = calculationWeek
@@ -115,9 +109,8 @@ app.config.globalProperties.deepClone = deepClone
 app.config.globalProperties.timeInterval = timeInterval
 app.config.globalProperties.compareTime = compareTime
 app.config.globalProperties.getImgBase64 = getImgBase64
-
-
-
+// user
+app.config.globalProperties.useUserStore = useUserStore
 
 
 // 全局组件挂载
@@ -127,17 +120,15 @@ app.component('TreeSelect', TreeSelect)
 app.component('ImageUpload', ImageUpload)
 app.component('ImagePreview', ImagePreview)
 app.component('RightToolbar', RightToolbar)
-
+app.component('svg-icon', SvgIcon)
+app.component('TitleInfo', TitleInfo)
+// use
 app.use(router)
 app.use(store)
 app.use(plugins)
-
-
 app.use(i18n)
 app.use(elementIcons)
 app.use(print)
-app.component('svg-icon', SvgIcon)
-
 directive(app)
 
 // 使用element-plus 并且设置全局的大小

+ 16 - 1
src/store/modules/user.js

@@ -1,7 +1,8 @@
 import {
   login,
   logout,
-  getInfo
+  getInfo,
+  allDictMap
 } from '@/api/login'
 import {
   getToken,
@@ -19,6 +20,7 @@ const useUserStore = defineStore(
       roles: [],
       permissions: [],
       user: {},
+      allDict: {},
     }),
     actions: {
       // 登录
@@ -60,6 +62,19 @@ const useUserStore = defineStore(
           })
         })
       },
+      // 获取字典
+      allDictMap() {
+        return new Promise((resolve, reject) => {
+          allDictMap()
+            .then((res) => {
+              this.allDict = res.data;
+              resolve("");
+            })
+            .catch((error) => {
+              reject(error);
+            });
+        });
+      },
       // 退出系统
       logOut() {
         return new Promise((resolve, reject) => {

+ 42 - 4
src/utils/util.js

@@ -7,12 +7,16 @@ import Cookies from "js-cookie";
 import html2Canvas from "html2canvas";
 import JsPDF from "jspdf";
 import * as toEnglish from "./ACapital.js";
+import {
+  ElMessage,
+  ElMessageBox
+} from 'element-plus'
 
 //根据value值回显字典label值
-export function dictDataEcho(value, arr) {
-  if (value && arr) {
+export function dictKeyValue(value, arr) {
+  if ((value || value == 0) && arr) {
     value = value + "";
-    const current = arr.find((x) => x.dictKey === value);
+    const current = arr.find((x) => x.dictKey == value);
     if (current != undefined && current.dictValue) {
       return current.dictValue;
     }
@@ -450,4 +454,38 @@ export function getImgBase64(url) {
       reject("图片加载失败");
     };
   });
-};
+};
+
+// 消息提示
+export function msgTip(message, type = 1) {
+  let obj = {
+    1: 'success',
+    2: "info",
+    3: "warning",
+    4: "error"
+  }
+  ElMessage({
+    type: obj[type],
+    message,
+  })
+  return
+}
+
+// 消息确认
+export function msgConfirm(title = '您是否确认执行此操作? ') {
+  return new Promise((resolve, reject) => {
+    ElMessageBox.confirm(
+      title,
+      "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }
+    ).then((res) => {
+      resolve(res)
+    }).catch((err) => {
+      reject(err)
+    })
+  })
+
+}

+ 77 - 134
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -1,29 +1,16 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList
-        title="产品分类"
-        submitType="1"
-        :data="treeListData"
-        v-model="sourceList.pagination.productClassifyId"
-        @change="treeChange"
-        @changeTreeList="getTreeList"
-      >
+      <treeList title="产品分类" submitType="1" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
+                @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           props.selectStatus
             ? {}
             : {
@@ -38,25 +25,15 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #name="{ item }">
           <div>
-            <span
-              style="color: #409eff; cursor: pointer; word-break: break-all"
-              @click="handleOpenProductContract(item)"
-              >{{ item.name }}</span
-            >
+            <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="handleOpenProductContract(item)">{{ item.name }}</span>
           </div>
         </template>
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img
-              :src="item.fileList[0].fileUrl"
-              class="pic"
-              @click="handleClickFile(item.fileList[0])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
@@ -74,102 +51,72 @@
         </template>
         <template #costPrice="{ item }">
           <div>
-            <span v-if="item.costPrice"
-              >{{ item.costCurrency }} {{ item.costPrice }}</span
-            >
+            <span v-if="item.costPrice">{{ item.costCurrency }} {{ item.costPrice }}</span>
           </div>
         </template>
       </byTable>
     </div>
 
-    <el-dialog
-      :title="modalType == 'add' ? '添加产品' : '编辑产品'"
-      v-model="dialogVisible"
-      width="700"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加产品' : '编辑产品'" v-model="dialogVisible" width="80%" v-loading="submitLoading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
           <template #nameEnglish>
             <div style="width: 100%">
-              <el-form-item label="英文名" prop="nameEnglish">
-                <el-input
-                  v-model="formData.data.nameEnglish"
-                  placeholder="请输入"
-                  onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
-                ></el-input>
-                <!-- @input="(val) => handleKeyup(val)" -->
-              </el-form-item>
+              <el-input v-model="formData.data.nameEnglish" placeholder="请输入" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"></el-input>
+              <!-- @input="(val) => handleKeyup(val)" -->
+            </div>
+          </template>
+          <template #productLong>
+            <div style="width: 100%">
+              <el-row :gutter="10">
+                <el-col :span="8">
+                  <el-form-item prop="productLong" label-width="0px" class="margin-b-0">
+                    <el-input v-model="formData.data.productLong" placeholder="请输入"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="productWide" label-width="0px" class="margin-b-0">
+                    <el-input v-model="formData.data.productWide" placeholder="请输入"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item prop="productHigh" label-width="0px" class="margin-b-0">
+                    <el-input v-model="formData.data.productHigh" placeholder="请输入"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </div>
           </template>
           <template #productPic>
             <div>
-              <el-upload
-                v-model:fileList="fileList"
-                action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                :data="uploadData"
-                list-type="picture-card"
-                :on-remove="handleRemove"
-                :before-upload="handleBeforeUpload"
-                :on-preview="handlePreview"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
+                         list-type="picture-card" :on-remove="handleRemove" :before-upload="handleBeforeUpload" :on-preview="handlePreview"
+                         accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
         </byForm>
       </div>
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="defualt" :loading="submitLoading" v-debounce>确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="导入产品"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="excelLoading"
-    >
-      <el-upload
-        :action="actionUrl + '/productInfo/excelImportByEhsd'"
-        :headers="headers"
-        :on-success="handleSuccess"
-        :on-progress="handleProgress"
-        :show-file-list="false"
-        :on-error="handleError"
-        accept=".xlsx"
-      >
+    <el-dialog title="导入产品" v-model="openExcelDialog" width="400" v-loading="excelLoading">
+      <el-upload :action="actionUrl + '/productInfo/excelImportByEhsd'" :headers="headers" :on-success="handleSuccess" :on-progress="handleProgress"
+                 :show-file-list="false" :on-error="handleError" accept=".xlsx">
         <el-button type="primary">点击导入</el-button>
       </el-upload>
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-if="productContractDialog"
-      v-model="productContractDialog"
-      :title="'外销合同'"
-      width="80%"
-      append-to-body
-    >
+    <el-dialog v-if="productContractDialog" v-model="productContractDialog" :title="'外销合同'" width="80%" append-to-body>
       <ProductContract :currentProductId="currentProductId"></ProductContract>
     </el-dialog>
   </div>
@@ -376,7 +323,7 @@ const byform = ref(null);
 const formConfig = computed(() => {
   return [
     {
-      type: "title",
+      type: "title1",
       title: "基本信息",
     },
     {
@@ -384,7 +331,7 @@ const formConfig = computed(() => {
       prop: "productClassifyId",
       label: "产品分类",
       data: treeListData.value,
-      itemWidth: 100,
+      itemWidth: 50,
       disabled: false,
       style: {
         width: "100%",
@@ -394,13 +341,14 @@ const formConfig = computed(() => {
       type: "input",
       prop: "name",
       label: "产品名称",
-      itemWidth: 100,
+      itemWidth: 50,
       disabled: false,
     },
     {
       type: "slot",
       slotName: "nameEnglish",
-      label: "",
+      label: "英文名",
+      itemWidth: 50,
     },
     {
       type: "slot",
@@ -409,7 +357,7 @@ const formConfig = computed(() => {
       label: "产品图片",
     },
     {
-      type: "title",
+      type: "title1",
       title: "价格信息",
     },
     {
@@ -435,40 +383,41 @@ const formConfig = computed(() => {
       data: accountCurrency.value,
     },
     {
-      type: "title",
+      type: "title1",
       title: "属性信息",
     },
     {
       type: "input",
       prop: "spec",
       label: "规格型号",
-      itemWidth: 100,
+      itemWidth: 50,
       disabled: false,
     },
     {
-      type: "input",
+      type: "slot",
+      slotName: "productLong",
       prop: "productLong",
       label: "尺寸",
-      itemWidth: 33.33,
-      placeholder: "长(cm)",
-      disabled: false,
-    },
-    {
-      type: "input",
-      prop: "productWide",
-      label: " ",
-      itemWidth: 33.33,
-      placeholder: "宽(cm)",
-      disabled: false,
-    },
-    {
-      type: "input",
-      prop: "productHigh",
-      label: " ",
-      itemWidth: 33.33,
-      placeholder: "高(cm)",
+      itemWidth: 50,
+      // placeholder: "长(cm)",
       disabled: false,
     },
+    // {
+    //   type: "input",
+    //   prop: "productWide",
+    //   label: "",
+    //   itemWidth: 33.33,
+    //   placeholder: "宽(cm)",
+    //   disabled: false,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "productHigh",
+    //   label: "",
+    //   itemWidth: 33.33,
+    //   placeholder: "高(cm)",
+    //   disabled: false,
+    // },
     {
       type: "select",
       prop: "innerPackMethod",
@@ -503,19 +452,13 @@ const formConfig = computed(() => {
       type: "input",
       prop: "netWeight",
       label: "净重(kg)",
-      itemWidth: 100,
-      style: {
-        width: "30%",
-      },
+      itemWidth: 50,
     },
     {
       type: "input",
       prop: "hsCode",
       label: "海关编码",
-      itemWidth: 100,
-      style: {
-        width: "30%",
-      },
+      itemWidth: 50,
       disabled: false,
     },
     {

+ 9 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -273,6 +273,15 @@ const selectConfig = computed(() => {
       prop: "isSettled",
       data: isSettled.value,
     },
+    {
+      type: "time",
+      label: "合同创建时间",
+      placeholder: "开始日期",
+      prop: "time",
+      placeholderOne: "结束日期",
+      propOne: "time1",
+      // data: status.value,
+    },
   ];
 });
 const headerData = ref({});

+ 2 - 2
src/views/login.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="login">
-    <h1>三梵职能</h1>
+    <h1>三梵</h1>
     <div class="content">
       <div class="warp-bg">
         <div class="left-bg">
@@ -27,7 +27,7 @@
           <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
             <div class="form" style="margin-top: 300px">
               <div class="">{{ $t("login.welcomeToLogin") }}~</div>
-              <h2>三梵职能 {{ $t("login.managementSystem") }}</h2>
+              <h2>三梵 {{ $t("login.managementSystem") }}</h2>
               <el-form-item prop="tenantId" style="margin-top: 30px">
                 <!-- <el-input :placeholder="$t('login.pleaseEnterTheTenantId')" prefix-icon="user" @keyup.enter="handleLogin" autocomplete="email"
                           v-model="loginForm.tenantId">

+ 2 - 0
src/views/process/processApproval/index.vue

@@ -23,6 +23,7 @@
         <!-- 销售合同 -->
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
           <ContractEHSD ref="makeDom" :queryData="queryData.data" @auxiliaryChange="(e) => getAuxiliaryData(e)"></ContractEHSD>
+          <!-- <Contract ref="makeDom" :queryData="queryData.data"></Contract> -->
         </template>
 
         <!-- 销售合同变更 -->
@@ -212,6 +213,7 @@
 <script setup name="ProcessApproval">
 import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
+import Contract from "@/components/process/SF/Contract";
 // 消息提示
 import { ElMessage, ElMessageBox } from "element-plus";
 //决策辅助

+ 11 - 0
src/views/production/project/ceshi/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>
+    ceshi
+  </div>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 1 - 1
src/views/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="register">
     <el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
-      <h3 class="title">三梵职能</h3>
+      <h3 class="title">三梵</h3>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" size="large" auto-complete="off" placeholder="账号">
           <template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>

+ 91 - 6
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -23,11 +23,12 @@
             <span>{{ row.createTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" align="center" width="180">
+        <el-table-column label="操作" align="center" width="240">
           <template #default="{ row }">
             <el-button link type="primary" @click="getDtl(row)">修改</el-button>
             <el-button link type="primary" @click="openModal(row.deptId)">添加子项</el-button>
-            <el-button v-if="row.parentId != 0" link type="primary" @click="listDelete(row)">删除</el-button>
+            <el-button link type="primary" @click="openRoomModal(row)">权限</el-button>
+            <el-button v-if="checkIsTopData(row.parentId)" link type="primary" @click="listDelete(row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -37,8 +38,8 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #parentId>
           <div style="width: 100%">
-            <el-tree-select v-model="formData.data.parentId" :data="sourceList.data" check-strictly :render-after-expand="false" node-key="deptId"
-                            :props="defaultProps" style="width:100%" />
+            <el-tree-select v-model="formData.data.parentId" :data="sourceList.data" :disabled="isTopData && modalType=='edit'" check-strictly
+                            :render-after-expand="false" node-key="deptId" :props="defaultProps" style="width:100%" />
           </div>
         </template>
         <template #orderNum>
@@ -53,6 +54,14 @@
         <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="权限配置" v-if="roomDialogVisible" v-model="roomDialogVisible" width="500" v-loading="loading">
+      <el-tree :data="treeData" show-checkbox node-key="id" :default-checked-keys="checkTreeData" :props="defaultPropsOne" ref="tree"> </el-tree>
+      <template #footer>
+        <el-button @click="roomDialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitTree()" size="large" :loading="submitLoading">确 定</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -69,6 +78,10 @@ const defaultProps = {
   children: "children",
   label: "deptName",
 };
+const defaultPropsOne = {
+  children: "children",
+  label: "label",
+};
 const userList = ref([]);
 const typeList = ref([
   {
@@ -118,6 +131,7 @@ const getDict = () => {
       });
     });
 };
+const deptAllData = ref([]);
 const getList = async (req) => {
   if (req) {
     req.deptName = req.keyword;
@@ -125,6 +139,7 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy.get("/tenantDept/list", sourceList.value.pagination).then((res) => {
+    deptAllData.value = res.data;
     sourceList.value.data = proxy.handleTree(res.data, "deptId");
     console.log(sourceList.value.data);
     setTimeout(() => {
@@ -165,6 +180,7 @@ const formConfig = computed(() => {
       prop: "type",
       label: "机构类型",
       data: typeList.value,
+      disabled: isTopData.value && modalType.value == "edit",
       style: {
         width: "100%",
       },
@@ -245,8 +261,13 @@ const listDelete = (row) => {
     });
   });
 };
-
-const getDtl = (row) => {
+const isTopData = ref(false);
+const checkIsTopData = (parentId) => {
+  return deptAllData.value.some((x) => x.deptId == parentId);
+};
+const getDtl = (row, index) => {
+  // 修改的时候,反查所有数据,如果能找到当前的父级id则不是第一级数据
+  isTopData.value = !checkIsTopData(row.parentId);
   formData.data = proxy.deepClone(row);
   modalType.value = "edit";
   formData.data.leaderId =
@@ -258,6 +279,70 @@ const getDtl = (row) => {
     formData.data.type = row.type;
   }, 0);
 };
+
+const tree = ref(null);
+const roomDialogVisible = ref(false);
+const treeData = ref([]);
+const checkTreeData = ref([]);
+const rowTenantId = ref("");
+const getSubset = (list, data) => {
+  for (let i = 0; i < list.length; i++) {
+    if (list[i].children && list[i].children.length > 0) {
+      getSubset(list[i].children, data);
+    } else {
+      data.push(list[i].id);
+    }
+  }
+  return data;
+};
+const openRoomModal = (row) => {
+  if (row.parentId == "0") {
+    rowTenantId.value = row.tenantId;
+  } else {
+    rowTenantId.value = row.deptId;
+  }
+  proxy
+    .get("/tenantInfo/roleMenuTreeSelect/" + rowTenantId.value)
+    .then((res) => {
+      if (res.code == 200) {
+        treeData.value = res.menus;
+        let data = getSubset(res.menus, []);
+        checkTreeData.value = res.checkedKeys.filter((item) => {
+          return data.some((i) => item == i);
+        });
+        roomDialogVisible.value = true;
+      }
+    });
+};
+const noRepeat = (arr) => {
+  var newArr = [...new Set(arr)];
+  return newArr;
+};
+
+const submitTree = () => {
+  let data = noRepeat(
+    tree.value.getHalfCheckedKeys().concat(tree.value.getCheckedKeys())
+  );
+  if (data.length == 0) {
+    ElMessage({
+      message: "请至少选择一个菜单",
+      type: "error",
+    });
+    return;
+  }
+  proxy
+    .post("/tenantInfo/bindingMenu", {
+      tenantId: rowTenantId.value,
+      menuIdList: data,
+    })
+    .then((res) => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+    });
+};
 </script>
 
 <style lang="scss" scoped>