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

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

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

24
src/views/work/Alarm.vue

@ -180,30 +180,10 @@
</el-row>
<el-row
style="margin-top: 10px"
v-if="
showData.files != undefined && showData.files.length > 0
"
v-if="showData.files != undefined && showData.files.length > 0"
>
<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-row>
</el-form>

Loading…
Cancel
Save