Browse Source

修复回复通知功能

main
wxc 1 year ago
parent
commit
50b841e11f
  1. 7
      src/components/alarm/reply.vue
  2. 12
      src/components/home/work/index.vue
  3. 4
      src/components/home/work/my-todo.vue
  4. 24
      src/views/work/Alarm.vue

7
src/components/alarm/reply.vue

@ -31,11 +31,11 @@
:autosize="{ minRows: 5 }" :autosize="{ minRows: 5 }"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item <el-form-item
label="附件" label="附件"
> >
<file-upload /> <file-upload v-model:files="formData.replyFiles" />
</el-form-item> --> </el-form-item>
</el-form> </el-form>
<footer class="flex end"> <footer class="flex end">
<el-button @click="emit('close')" size="large">取消</el-button> <el-button @click="emit('close')" size="large">取消</el-button>
@ -66,6 +66,7 @@ async function handleSumbit() {
await formRef.value.validate(); await formRef.value.validate();
formData.value.id = props.data.id formData.value.id = props.data.id
await alarmNotificationReply(formData.value); await alarmNotificationReply(formData.value);
formData.value = {}
feedback.msgSuccess("操作成功"); feedback.msgSuccess("操作成功");
emit('close') emit('close')
emit('update') emit('update')

12
src/components/home/work/index.vue

@ -8,7 +8,7 @@
<span class="tab-nav-title" v-else>我的待办</span> <span class="tab-nav-title" v-else>我的待办</span>
</template> </template>
<div v-loading="loading" class="pt-20"> <div v-loading="loading" class="pt-20">
<home-work-my-todo :data="todos" @refresh="getList" /> <home-work-my-todo :data="todos" @update="getList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -20,7 +20,7 @@
<span class="tab-nav-title" v-else>即将到期</span> <span class="tab-nav-title" v-else>即将到期</span>
</template> </template>
<div v-loading="loading" class="mt-20"> <div v-loading="loading" class="mt-20">
<home-work-my-todo :data="todoToExpires" @refresh="getList" /> <home-work-my-todo :data="todoToExpires" @update="getList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="third"> <el-tab-pane name="third">
@ -40,7 +40,7 @@
<span class="tab-nav-title" v-else>通知提醒</span> <span class="tab-nav-title" v-else>通知提醒</span>
</template> </template>
<div v-loading="loading" class="pt-20"> <div v-loading="loading" class="pt-20">
<home-work-my-alarm :data="alarms" /> <home-work-my-alarm :data="alarms" @update="getAlarmList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -71,17 +71,23 @@ function getList() {
todoToExpires.value = data.records.filter(item => item.remainingDuration < 43200) todoToExpires.value = data.records.filter(item => item.remainingDuration < 43200)
loading.value = false loading.value = false
}); });
}
function getAlarmList() {
loading.value = true
alarmNotificationPageByTodo({ alarmNotificationPageByTodo({
current: 1, current: 1,
size: 100, size: 100,
}).then((data) => { }).then((data) => {
alarms.value = data.records; alarms.value = data.records;
myAlarmTotal.value = data.total myAlarmTotal.value = data.total
loading.value = false
}); });
} }
onMounted(() => { onMounted(() => {
getList(); getList();
getAlarmList();
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

4
src/components/home/work/my-todo.vue

@ -178,7 +178,7 @@ const props = defineProps({
}, },
}); });
const emit = defineEmits(["refresh"]); const emit = defineEmits(["update"]);
const ALL_LABEL = "全部"; const ALL_LABEL = "全部";
const tabs = ref([ const tabs = ref([
@ -239,7 +239,7 @@ function handleAction(row) {
const addShow = ref(false); const addShow = ref(false);
function handleUpdate() { function handleUpdate() {
emit('refresh') emit('update')
} }
</script> </script>

24
src/views/work/Alarm.vue

@ -180,30 +180,10 @@
</el-row> </el-row>
<el-row <el-row
style="margin-top: 10px" style="margin-top: 10px"
v-if=" v-if="showData.files != undefined && showData.files.length > 0"
showData.files != undefined && showData.files.length > 0
"
> >
<el-form-item label="问题附件"> <el-form-item label="问题附件">
<div
v-for="(item, index) in showData.files"
:key="index"
style="margin-top: 10px"
>
<el-image
:preview-src-list="previewList"
style="
width: 100px;
height: 100px;
margin-right: 8px;
"
:initial-index="index"
:src="item.path"
fit="cover"
:hide-on-click-modal="true"
:lazy="true"
/>
</div>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>

Loading…
Cancel
Save