ソースを参照

1、工资模块添加上传弹窗
2、用户登录接口添加state参数解决报错

fuwb 2 ヶ月 前
コミット
5770ebf48b

+ 2 - 1
client/src/views/Login/OALogin.vue

@@ -52,6 +52,7 @@ import * as LoginApi from '@/api/login'
 import { useRouter } from 'vue-router'
 import { useAppStore } from '@/store/modules/app'
 import * as authUtil from '@/utils/auth'
+import { generateUUID } from '@/utils'
 defineOptions({ name: 'OALogin' })
 const appStore = useAppStore()
 const oaLoginTitle = ref(appStore.title)
@@ -77,7 +78,7 @@ const handleMessage = async (event) => {
     const res = await LoginApi.socialLogin({
       type: 20,
       code: event.data.code,
-      state: event.data.state
+      state: generateUUID()
     })
     if (!res) {
       return

+ 11 - 0
client/src/views/OaSystem/searchCenter/salary/index.scss

@@ -0,0 +1,11 @@
+.container-header {
+  background-color: #ffffff;
+  padding-left: 20px;
+  padding-top: 20px;
+}
+
+.container-main {
+  background-color: #ffffff;
+  margin-top: 20px;
+  padding: 10px;
+}

+ 19 - 3
client/src/views/OaSystem/searchCenter/salary/index.vue

@@ -11,7 +11,16 @@
         <el-button plain @click="resetSearchKey">重置</el-button>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" @click="handleInsert">导入</el-button>
+        <el-upload
+          style="margin-top: 8px"
+          action=""
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :before-remove="beforeRemove"
+          :on-exceed="handleExceed"
+        >
+          <el-button type="primary">上传文件</el-button>
+        </el-upload>
       </el-form-item>
     </el-form>
   </div>
@@ -42,16 +51,19 @@
   </div>
 </template>
 
-<script lang="ts" scoped>
+<script lang="ts" setup>
 import { ref, reactive } from 'vue'
 import * as SalaryApi from '@/api/salary'
 
+const searchKey = ref('')
 const total = ref(0)
 const list = ref([])
 const queryParams = reactive({
   pageNo: 1,
-  pageSize: 10
+  pageSize: 10,
+  isAdmin: 1
 })
+const dialogFormVisible = ref(false)
 
 // 获取工资列表
 const salaryList = async (json) => {
@@ -59,6 +71,10 @@ const salaryList = async (json) => {
   total.value = data.total
   list.value = data.records
 }
+
+const handleUpload = () => {
+  dialogFormVisible.value = true
+}
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
client/src/views/OaSystem/searchCenter/supplier/index.vue

@@ -42,7 +42,7 @@
   </div>
 
   <!-- 新增供应商的表单弹窗 -->
-  <el-dialog v-model:visible="dialogFormVisible" :close-on-click-modal="false" :title="dialogTitle">
+  <el-dialog v-model="dialogFormVisible" :close-on-click-modal="false" :title="dialogTitle">
     <el-form label-width="130px" :model="supply" ref="supplyRef">
       <el-form-item prop="supplierId">
         <el-input style="display: none" v-model="supply.supplierId" />