spring
昨天 3739a47340c8d8b6edf5fdcbb0534f5fc8d96530
src/views/collaborativeApproval/sealManagement/index.vue
@@ -82,7 +82,14 @@
    </el-card>
    <!-- 用印申请对话框 -->
    <el-dialog v-model="showSealApplyDialog" title="申请用印" width="600px">
    <FormDialog
      v-model="showSealApplyDialog"
      title="申请用印"
      :width="'600px'"
      @close="closeSealApplyDialog"
      @confirm="submitSealApplication"
      @cancel="closeSealApplyDialog"
    >
      <el-form :model="sealForm" :rules="sealRules" ref="sealFormRef" label-width="100px">
        <el-form-item label="申请编号" prop="applicationNum">
          <el-input v-model="sealForm.applicationNum" placeholder="请输入申请编号" />
@@ -119,13 +126,7 @@
          </el-radio-group>
        </el-form-item>
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="showSealApplyDialog = false">取消</el-button>
          <el-button type="primary" @click="submitSealApplication">提交申请</el-button>
        </span>
      </template>
    </el-dialog>
    </FormDialog>
    <!-- 规章制度发布对话框 -->
    <!-- <el-dialog v-model="showRegulationDialog" :title="operationType === 'add' ? '发布制度' : '编辑制度'" width="800px">
@@ -177,10 +178,17 @@
    </el-dialog> -->
    <!-- 用印详情对话框 -->
    <el-dialog v-model="showSealDetailDialog" title="用印申请详情" width="700px">
    <FormDialog
      v-model="showSealDetailDialog"
      title="用印申请详情"
      :width="'700px'"
      @close="closeSealDetailDialog"
      @confirm="closeSealDetailDialog"
      @cancel="closeSealDetailDialog"
    >
      <div v-if="currentSealDetail" class="mb10">
        <el-descriptions :column="2" border>
          <el-descriptions-item label="申请编号">{{ currentSealDetail.id }}</el-descriptions-item>
          <el-descriptions-item label="申请编号">{{ currentSealDetail.applicationNum }}</el-descriptions-item>
          <el-descriptions-item label="申请标题">{{ currentSealDetail.title }}</el-descriptions-item>
          <el-descriptions-item label="申请人">{{ currentSealDetail.createUserName }}</el-descriptions-item>
          <el-descriptions-item label="所属部门">{{ currentSealDetail.department }}</el-descriptions-item>
@@ -194,10 +202,17 @@
          <el-descriptions-item label="申请原因" :span="2">{{ currentSealDetail.reason }}</el-descriptions-item>
        </el-descriptions>
      </div>
    </el-dialog>
    </FormDialog>
    <!-- 规章制度详情对话框 -->
    <el-dialog v-model="showRegulationDetailDialog" title="规章制度详情" width="800px">
    <FormDialog
      v-model="showRegulationDetailDialog"
      title="规章制度详情"
      :width="'800px'"
      @close="closeRegulationDetailDialog"
      @confirm="handleRegulationDetailConfirm"
      @cancel="closeRegulationDetailDialog"
    >
      <div v-if="currentRegulationDetail">
        <el-descriptions :column="2" border>
          <el-descriptions-item label="制度编号">{{ currentRegulationDetail.id }}</el-descriptions-item>
@@ -216,10 +231,17 @@
          <el-button type="success" @click="resetForm(currentRegulationDetail)">确认查看</el-button>
        </div>
      </div>
    </el-dialog>
    </FormDialog>
    <!-- 版本历史对话框 -->
    <el-dialog v-model="showVersionHistoryDialog" title="版本历史" width="800px">
    <FormDialog
      v-model="showVersionHistoryDialog"
      title="版本历史"
      :width="'800px'"
      @close="closeVersionHistoryDialog"
      @confirm="closeVersionHistoryDialog"
      @cancel="closeVersionHistoryDialog"
    >
      <el-table :data="versionHistory" style="width: 100%;margin-bottom: 10px">
        <el-table-column prop="version" label="版本号" width="100" />
        <el-table-column prop="updateTime" label="更新时间" width="180" />
@@ -232,10 +254,17 @@
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    </FormDialog>
    <!-- 阅读状态对话框 -->
    <el-dialog v-model="showReadStatusDialog" title="阅读状态" width="800px">
    <FormDialog
      v-model="showReadStatusDialog"
      title="阅读状态"
      :width="'800px'"
      @close="closeReadStatusDialog"
      @confirm="closeReadStatusDialog"
      @cancel="closeReadStatusDialog"
    >
      <el-table :data="readStatusList" style="width: 100%;margin-bottom: 10px">
        <el-table-column prop="employee" label="员工姓名" width="120" />
        <el-table-column prop="department" label="所属部门" width="150" />
@@ -249,7 +278,7 @@
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    </FormDialog>
  </div>
</template>
@@ -263,7 +292,8 @@
import { getUserProfile, userListNoPageByTenantId } from '@/api/system/user.js'
import useUserStore from '@/store/modules/user'
import { userLoginFacotryList } from "@/api/system/user.js"
import {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js";
import {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js"
import FormDialog from '@/components/Dialog/FormDialog.vue'
// 响应式数据
const currentUser = ref(null)
@@ -434,7 +464,7 @@
    addSealApplication(sealForm).then(res => {
      if(res.code == 200){
        ElMessage.success('申请提交成功')
        showSealApplyDialog.value = false
        closeSealApplyDialog()
        getSealApplicationList()
        Object.assign(sealForm, {
        applicationNum: '',
@@ -447,12 +477,53 @@
      })
      }
    }).catch(err => {
      ElMessage.error(err.msg)
      console.log(err.msg)
    })
  
  } catch (error) {
    ElMessage.error('请完善申请信息')
  }
}
// 关闭用印申请对话框
const closeSealApplyDialog = () => {
  // 清空表单数据
  Object.assign(sealForm, {
    applicationNum: '',
    title: '',
    sealType: '',
    reason: '',
    approveUserId: '',
    urgency: 'normal',
    status: 'pending'
  })
  // 清除表单验证状态
  if (sealFormRef.value) {
    sealFormRef.value.clearValidate()
  }
  showSealApplyDialog.value = false
}
// 关闭用印详情对话框
const closeSealDetailDialog = () => {
  showSealDetailDialog.value = false
}
// 关闭规章制度详情对话框
const closeRegulationDetailDialog = () => {
  showRegulationDetailDialog.value = false
}
// 处理规章制度详情确认
const handleRegulationDetailConfirm = () => {
  // 如果tableData>0,执行确认查看操作
  if (currentRegulationDetail.value && tableData.value && tableData.value.length > 0) {
    resetForm(currentRegulationDetail.value)
  }
  closeRegulationDetailDialog()
}
// 关闭版本历史对话框
const closeVersionHistoryDialog = () => {
  showVersionHistoryDialog.value = false
}
// 关闭阅读状态对话框
const closeReadStatusDialog = () => {
  showReadStatusDialog.value = false
}
// 新增
const handleAdd = () => {
@@ -735,6 +806,13 @@
  })
}
// 分页变化处理
const paginationChange = (obj) => {
  page.current = obj.page;
  page.size = obj.limit;
  getSealApplicationList();
};
// 监听对话框打开,获取用户列表
watch(showSealApplyDialog, (newVal) => {
  if (newVal) {