ZaiZai 1 yıl önce
ebeveyn
işleme
4bf4b00115

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240723170200"
+  "value": "20240725092039"
 }

+ 24 - 2
src/components/hc-tasks-user/modules/user-modal.vue

@@ -146,17 +146,20 @@ const props = defineProps({
     },
 })
 
-const emit = defineEmits(['finish', 'close', 'update:modelValue'])
+const emit = defineEmits(['finish', 'close'])
 
+//双向绑定
 const isShow = defineModel('modelValue', {
     default: false,
 })
 
+//监听参数
 const dataInfo = ref(props.datas)
 watch(() => props.datas, (data) => {
     dataInfo.value = getObjValue(data)
 }, { deep: true, immediate: true })
 
+//监听数据
 const fixedData = ref([])
 watch(() => props.data, (data) => {
     const res = getArrValue(data)
@@ -167,6 +170,7 @@ watch(isShow, (val) => {
     if (val) setInitData()
 })
 
+//初始化
 const setInitData = async () => {
     await nextTick()
     fixedData.value.forEach(item => {
@@ -174,6 +178,7 @@ const setInitData = async () => {
     })
 }
 
+//流程被点击
 const fixedIndex = ref(-1)
 const fixedItem = ref({})
 const fixedItemClick = (item, index) => {
@@ -183,14 +188,17 @@ const fixedItemClick = (item, index) => {
     getAllRoleList()
 }
 
+//获取流程图标
 const getProcessIcon = (item) => {
     return item.type === 1 ? 'i-hugeicons-workflow-square-03' : 'i-hugeicons-workflow-square-06'
 }
 
+//流程类型切换
 const fixedTypeClick = (item) => {
     item.type = item.type === 1 ? 2 : 1
 }
 
+//新增流程
 const fixedAddClick = () => {
     fixedData.value.push({
         type: 1,
@@ -201,6 +209,7 @@ const fixedAddClick = () => {
     })
 }
 
+//删除流程
 const fixedDelClick = (item, index) => {
     HcDelMsg({
         title: '确认删除任务流程?',
@@ -214,6 +223,7 @@ const fixedDelClick = (item, index) => {
     })
 }
 
+//角色列表
 const signUserList = ref([])
 const getAllRoleList = async () => {
     const { contractId } = getObjValue(dataInfo.value)
@@ -221,6 +231,7 @@ const getAllRoleList = async () => {
     signUserList.value = getArrValue(data)
 }
 
+//角色被点击
 const roleItem = ref({})
 const roleItemClick = (item) => {
     roleItem.value = item
@@ -228,6 +239,7 @@ const roleItemClick = (item) => {
     positionList.value = deepClone(arr)
 }
 
+//岗位搜索
 const positionKey = ref('')
 const positionList = ref([])
 const positionSearch = () => {
@@ -241,12 +253,14 @@ const positionSearch = () => {
     positionList.value = arr.filter(({ roleName }) => roleName.toLowerCase().includes(key.toLowerCase()))
 }
 
+//岗位被点击
 const positionItem = ref({})
 const positionItemClick = (item) => {
     positionItem.value = item
     setSignPfxUser(item.signPfxFileList)
 }
 
+//设置任务人数据
 const alphabet = Array.from({ length: 26 }, (_, i) => String.fromCharCode(65 + i))
 const setSignPfxUser = (data) => {
     const list = deepClone(data)
@@ -261,10 +275,12 @@ const setSignPfxUser = (data) => {
     }))
 }
 
+//中文转姓氏拼音
 const getFirstLetter = (name) => {
     return pinyin(name.charAt(0), { pattern: 'first', toneType: 'none', surname: 'head' }).charAt(0).toUpperCase()
 }
 
+//搜索任务人
 const signPfxFileData = ref([])
 const signUserKey = ref('')
 const signPfxFileList = ref([])
@@ -285,6 +301,7 @@ const signUserSearch = () => {
     }))
 }
 
+//滚动到相关位置
 const scrollRef = ref(null)
 const alphabetClick = (key) => {
     const ids = `hc-sign-pfx-file-item-${key}`
@@ -293,6 +310,7 @@ const alphabetClick = (key) => {
     scrollRef.value?.setScrollTop(dom.offsetTop - 20)
 }
 
+//任务人被点击
 const signUserItemClick = ({ certificateUserId, certificateUserName }) => {
     const arr = fixedData.value, index = fixedIndex.value
     const list = getArrValue(arr[index]?.userList)
@@ -301,6 +319,7 @@ const signUserItemClick = ({ certificateUserId, certificateUserName }) => {
     fixedItem.value = fixedData.value[index]
 }
 
+//删除选择的任务人
 const fixedItemUserListDel = (index) => {
     const arr = fixedData.value, i = fixedIndex.value
     const list = getArrValue(arr[i]?.userList)
@@ -309,15 +328,17 @@ const fixedItemUserListDel = (index) => {
     fixedItem.value = fixedData.value[i]
 }
 
+//单个流程保存
 const singleSaveClick = () => {
     const arr = getArrValue(fixedItem.value?.userList)
     if (arr.length <= 0) {
         window.$message.warning('请选择对应的任务人员')
         return
     }
-    window.$message.success('保存成功')
+    window.$message.success('保存成功,全部完成后,请点击确定')
 }
 
+//确定选择
 const confirmLoading = ref(false)
 const confirmClick = async () => {
     const list = fixedData.value
@@ -340,6 +361,7 @@ const confirmClick = async () => {
     modalClose()
 }
 
+//关闭窗口
 const modalClose = () => {
     isShow.value = false
     emit('close')