浏览代码

新增多点bug,去除模板按时间搜索

liuQiang 1 年之前
父节点
当前提交
493506f61b
共有 4 个文件被更改,包括 27 次插入15 次删除
  1. 6 6
      src/layout/indexCommon.vue
  2. 9 5
      src/views/biz/dirTemplate/index.vue
  3. 5 1
      src/views/system/role/index.vue
  4. 7 3
      src/views/system/user/index.vue

+ 6 - 6
src/layout/indexCommon.vue

@@ -435,12 +435,12 @@ const menuList = reactive({
     //   beimgs: bechat,
     //   disabled:true
     // },
-    {
-      label: "最近文件",
-      path: "/recent",
-      imgs: zuijin,
-      beimgs: bezuijin,
-    },
+    // {
+    //   label: "最近文件",
+    //   path: "/recent",
+    //   imgs: zuijin,
+    //   beimgs: bezuijin,
+    // },
     {
       label: "收藏文件",
       path: "/collect",

+ 9 - 5
src/views/biz/dirTemplate/index.vue

@@ -18,14 +18,14 @@
             @keyup.enter="handleQuery"
         />
       </el-form-item> -->
-      <el-form-item label="创建时间" prop="createTime">
+      <!-- <el-form-item label="创建时间" prop="createTime">
         <el-date-picker clearable
                         v-model="queryParams.createTime"
                         type="date"
                         value-format="YYYY-MM-DD"
                         placeholder="请选择创建时间">
         </el-date-picker>
-      </el-form-item>
+      </el-form-item> -->
       <!-- <el-form-item label="更新人" prop="updateBy">
         <el-input
             v-model="queryParams.updateBy"
@@ -34,14 +34,14 @@
             @keyup.enter="handleQuery"
         />
       </el-form-item> -->
-      <el-form-item label="更新时间" prop="updateTime">
+      <!-- <el-form-item label="更新时间" prop="updateTime">
         <el-date-picker clearable
                         v-model="queryParams.updateTime"
                         type="date"
                         value-format="YYYY-MM-DD"
                         placeholder="请选择更新时间">
         </el-date-picker>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item>
         <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
@@ -163,7 +163,7 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button type="primary" @click="submitForm" :disabled="addDisabled">确 定</el-button>
           <el-button @click="cancelAddTemp">取 消</el-button>
         </div>
       </template>
@@ -208,6 +208,7 @@ const newName = ref()
 const tempId = ref(1000)
 const upNodeData = ref()
 const tempTitle = ref('')
+const addDisabled = ref(false);
 const tempData = ref([
   {id:1,label:tempTitle || '请输入模板名称',children:[
 
@@ -329,16 +330,19 @@ function submitForm() {
     form.value.tmplContent = str
     form.value.tmplName = tempTitle.value
     if (valid) {
+      addDisabled.value = true
       if (form.value.tmplId != null) {
         updateDirTemplate(form.value).then(response => {
           proxy.$modal.msgSuccess("修改成功");
           open.value = false;
+          addDisabled.value = false
           getList();
         });
       } else {
         addDirTemplate(form.value).then(response => {
           proxy.$modal.msgSuccess("新增成功");
           open.value = false;
+          addDisabled.value = false
           getList();
         });
       }

+ 5 - 1
src/views/system/role/index.vue

@@ -189,7 +189,7 @@
          </el-form>
          <template #footer>
             <div class="dialog-footer">
-               <el-button type="primary" @click="submitForm">确 定</el-button>
+               <el-button type="primary" @click="submitForm" :disabled="addDisabled">确 定</el-button>
                <el-button @click="cancel">取 消</el-button>
             </div>
          </template>
@@ -268,6 +268,7 @@ const deptOptions = ref([]);
 const openDataScope = ref(false);
 const menuRef = ref(null);
 const deptRef = ref(null);
+const addDisabled = ref(false);
 
 /** 数据范围选项*/
 const dataScopeOptions = ref([
@@ -490,11 +491,13 @@ function getMenuAllCheckedKeys() {
 function submitForm() {
   proxy.$refs["roleRef"].validate(valid => {
     if (valid) {
+      addDisabled.value = true
       if (form.value.roleId != undefined) {
         form.value.menuIds = getMenuAllCheckedKeys();
         updateRole(form.value).then(response => {
           proxy.$modal.msgSuccess("修改成功");
           open.value = false;
+          addDisabled.value = false
           getList();
         });
       } else {
@@ -502,6 +505,7 @@ function submitForm() {
         addRole(form.value).then(response => {
           proxy.$modal.msgSuccess("新增成功");
           open.value = false;
+          addDisabled.value = false
           getList();
         });
       }

+ 7 - 3
src/views/system/user/index.vue

@@ -197,7 +197,7 @@
 			</el-form>
 			<template #footer>
 				<div class="dialog-footer">
-					<el-button type="primary" @click="submitForm">确 定</el-button>
+					<el-button type="primary" @click="submitForm" :disabled="addDisabled">确 定</el-button>
 					<el-button @click="cancel">取 消</el-button>
 				</div>
 			</template>
@@ -294,6 +294,7 @@
 	const initPassword = ref(undefined);
 	const postOptions = ref([]);
 	const roleOptions = ref([]);
+	const addDisabled = ref(false);
 	/*** 用户导入参数 */
 	const upload = reactive({
 		// 是否显示弹出层(用户导入)
@@ -387,7 +388,7 @@
 		rules: {
 			userName: [{
 				required: true,
-				message: "用户名称不能为空",
+				message: "帐号名称不能为空",
 				trigger: "blur"
 			}, {
 				min: 2,
@@ -397,7 +398,7 @@
 			}],
 			nickName: [{
 				required: true,
-				message: "用户昵称不能为空",
+				message: "姓名不能为空",
 				trigger: "blur"
 			}],
 			password: [{
@@ -699,6 +700,7 @@
 	function submitForm() {
 		proxy.$refs["userRef"].validate(valid => {
 			if (valid) {
+				addDisabled.value = true
 				const query = JSON.parse(JSON.stringify(form.value))
 				query.password = sm3(query.password)
 				query.phonenumber = encode(query.phonenumber)
@@ -706,12 +708,14 @@
 					updateUser(query).then(response => {
 						proxy.$modal.msgSuccess("修改成功");
 						open.value = false;
+						addDisabled.value = false
 						getList();
 					});
 				} else {
 					addUser(query).then(response => {
 						proxy.$modal.msgSuccess("新增成功");
 						open.value = false;
+						addDisabled.value = false
 						getList();
 					});
 				}