Admin
2022-07-25 1ca46431ab9faea036ec8b2ae54b20b720f7bad6
src/views/specialWorkSystem/afterWorkManagement/workTicketCheck/index.vue
@@ -181,15 +181,16 @@
   interface type {
   }
   // export default defineComponent({
   //    name: 'workCheckinRecord',
   //    setup() {
         const userInfo = useUserInfo()
         const { userInfos } = storeToRefs(userInfo);
         const state  = reactive<stateType>({});
   // 分页
         const currentPage = ref(1)
         const pageSize = ref(10)
   // 判断编辑和新增
         const chosenIndex = ref(-1)
         const handleSizeChange = (val: number) => {
            console.log(`${val} items per page`)
         }
@@ -224,23 +225,32 @@
            result:[{required: true, message: '该内容不能为空',trigger:'blur'}],
            checkTime:[{required: true, message: '该内容不能为空',trigger:'blur'}]
         })
         const dialogDetails = ref(false)
         const dialogAddRecord = ref(false)
         const deleteDialog = ref(false)
         const addRecord = ref({})
         const details = ref({})
   // 查看记录
         const viewRecord = (row) =>{
            details.value = JSON.parse(JSON.stringify(row))
            dialogDetails.value = true
         }
   // 删除记录
         const deleteRecord = (index) =>{
            chosenIndex.value = index
            deleteDialog.value = true
         }
   // 弹窗确认删除记录
         const conFirmDelete = ()=> {
            tableData.splice(chosenIndex.value,1)
            deleteDialog.value = false
         }
   // 弹窗确认新增记录
         const confirmAddRecord = async (formEl: FormInstance | undefined) =>{
            if (!formEl) return
            await formEl.validate((valid, fields) => {
@@ -257,6 +267,7 @@
            })
         }
   // 新增弹窗关闭时的数据初始化处理
         const closeAdd =()=>{
            addRecord.value={}
            chosenIndex.value = -1
@@ -264,6 +275,8 @@
         const indexClear = ()=>{
            chosenIndex.value = -1
         }
   // 修改编辑记录
         const editRecord =(index, row)=>{
            dialogAddRecord.value = true
            chosenIndex.value = index
@@ -275,31 +288,6 @@
            userInfos.value.projectId = value
            await initBackEndControlRoutes();
         };
         // return {
         //    renderMenu,
         //    multipleTableRef,
         //    tableData,
         //    currentPage,
         //    pageSize,
         //    dialogDetails,
         //    details,
         //    deleteDialog,
         //    dialogAddRecord,
         //    viewRecord,
         //    deleteRecord,
         //    handleSizeChange,
         //    handleCurrentChange,
         //    Plus,
         //    Edit,
         //    Delete,
         //    Search,
         //    Download,
         //    handleSelectionChange,
         //    Refresh,
         //    ...toRefs(state),
         // };
   //    },
   // });
</script>
<style scoped lang="scss">