Browse Source

fix: 消息id

test2
xuesinan 3 years ago
parent
commit
f79918b249
  1. 1
      CHANGELOG.md
  2. 2
      components/Roles/Roles.vue
  3. 10
      components/TimeLine/component/TimeBox.vue
  4. 6
      pages/project/project.vue
  5. 19
      plugins/p-deliver-check/check-form-modal.vue
  6. 4
      plugins/p-deliver-check/p-deliver-check.vue
  7. 6
      plugins/p-deliver-upload/p-deliver-upload.vue
  8. 23
      plugins/p-deliver/p-deliver.vue

1
CHANGELOG.md

@ -119,6 +119,7 @@
- | 交付物消息提示 | [880023a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/880023a)
交付物 | 修复检查人选择组件之间相互影响的bug | [435c0bd](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/435c0bd)
交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889)
- | 解决打卡插件下拉选项不显示的问题 | [86d3fba](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/86d3fba)
- | 解决默认角色不是第一个时显示出错问题 | [8dba578](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dba578)
- | 解决warning | [dcb0079](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/dcb0079)
- | 没有新消息双击按照上一个角色的任务id跳转的问题 | [eade2dd](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/eade2dd)

2
components/Roles/Roles.vue

@ -111,6 +111,7 @@ watchEffect(() => {
if (item.task) {
item.task.forEach(task => {
task.remindNum = 0;
task.msgId = '';
if (task.plugins) {
task.plugins.forEach(pluginArr => {
@ -122,6 +123,7 @@ watchEffect(() => {
if (item.role.id === remind_data.data.roleId) {
if (remind_data.data.taskId === task.id) {
task.remindNum++;
task.msgId = remind.id;
}
if (remind_data.data.taskId === task.id && remind_data.data.pluginId === plugin.pluginTaskId) {

10
components/TimeLine/component/TimeBox.vue

@ -38,16 +38,16 @@
<view :key="pIndex" v-for="(row, pIndex) in task.plugins">
<view class="grid grid-cols-1" v-if="row.length">
<Plugin
v-for="plugin in row"
:key="plugin.pluginTaskId"
:class="[`row-span-${plugin.row}`, `col-span-${plugin.col}`]"
:task="task"
:key="plugin.pluginTaskId"
:plugin-info="plugin"
:plugin-task-id="plugin.pluginTaskId"
:business-plugin-id="plugin.businessPluginId"
:plugin-id="plugin.pluginId"
:param="plugin.param"
:style-type="data.styleType || 0"
v-for="plugin in row"
/>
</view>
</view>
@ -72,9 +72,9 @@ import Skeleton from '@/components/Skeleton/Skeleton.vue';
const props = defineProps({
tasks: {
type: Array,
default: () => []
}
})
default: () => [],
},
});
const data = reactive({
currentComponent: '',

6
pages/project/project.vue

@ -28,9 +28,9 @@
<!-- <u-button @click="$store.commit('setTheme', 'theme-test')">测试切换主题</u-button> -->
</view>
<u-button style="position: fixed; bottom: 100px" @click="changeModal">
{{ timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式' }}
</u-button>
<u-button style="position: fixed; bottom: 100px" @click="changeModal">{{
timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式'
}}</u-button>
</theme>
</template>

19
plugins/p-deliver-check/check-form-modal.vue

@ -38,29 +38,16 @@ import { quickWords } from '@/config/deliver';
const props = defineProps({
data: { type: Object, default: {} },
msgId: { default: '', type: String }
msgId: { default: '', type: String },
});
const emits = defineEmits(['hide', 'submit-end']);
const store = useStore();
const remindData = computed(() => store.state.socket.remindData); //
const words = computed(() => quickWords[props.data.mode]); //
const projectId = computed(() => store.getters['project/projectId']);
const task = inject('task');
const commit = ref(''); //
const score = ref(100); //
let msgId = ref(null);
watch(remindData, () => {
remindData.value.forEach(remind => {
const remind_data = JSON.parse(remind.data);
if (remind_data.data.taskId === task.id) {
msgId.value = remind.id;
}
})
})
/**
* 提交评审信息
* 提交成功后隐藏modal 重置表单控件
@ -76,9 +63,9 @@ async function handleSubmit(mode) {
type: mode === 'RESOLVE' ? 1 : 2,
remark: commit.value,
score: mode === 'RESOLVE' ? score.value : '',
msgId: msgId.value
msgId: task.msgId,
};
await uni.$u.api.checkDeliver(param);
handleHide(); // +
uni.$ui.showToast('审核信息提交成功');

4
plugins/p-deliver-check/p-deliver-check.vue

@ -90,10 +90,6 @@ import { ref, reactive, inject } from 'vue';
import dayjs from 'dayjs';
import checkFormModal from './check-form-modal.vue';
// const props = defineProps({
// msgId: { default: '', type: String }
// });
const deliverData = inject('deliver');
defineEmits(['check-success']);
const collapsed = ref(false); // /

6
plugins/p-deliver-upload/p-deliver-upload.vue

@ -82,10 +82,6 @@ import { useStore } from 'vuex';
import { UPLOAD_URL } from '@/config/index';
import { UPLOAD_EXTENSION } from '@/config/deliver';
const props = defineProps({
msgId: { default: '', type: String }
});
const deliver = inject('deliver');
const task = inject('task');
const store = useStore();
@ -139,7 +135,7 @@ async function submit() {
deliverId: deliver.value.deliverId,
fileList: [linkValue.value],
checkerList,
msgId: props.msgId
msgId: task.msgId,
};
await uni.$u.api.submitDeliverInfo(param);
uni.$ui.showToast('提交交付物信息成功');

23
plugins/p-deliver/p-deliver.vue

@ -2,17 +2,10 @@
<view>
<!-- 上传提交 v-if="isMine && deliver" -->
<!-- TODO: 2022年春节为了演示所有人都能看到交付物插件 -->
<p-deliver-upload
v-if="deliver"
:msgId="msgId"
@upload-success="getDeliverData"
class="p-2"
@edit-success="getDeliverData"
></p-deliver-upload>
<p-deliver-upload v-if="deliver" @upload-success="getDeliverData" class="p-2" @edit-success="getDeliverData"></p-deliver-upload>
<p-deliver-check
v-if="deliver && deliver.details && deliver.details.length"
:msgId="msgId"
@check-success="getDeliverData"
class="p-2"
></p-deliver-check>
@ -28,23 +21,11 @@ const task = inject('task');
const pluginInfo = inject('pluginInfo');
const deliver = ref(null); //
const isMine = computed(() => store.getters['role/isMine']); //
const remindData = computed(() => store.state.socket.remindData); //
// const remindData = computed(() => store.state.socket.remindData); //
deliver.value = pluginInfo && pluginInfo.data ? JSON.parse(pluginInfo.data) : null;
provide('deliver', deliver);
const msgId = ref(null);
watch(remindData, () => {
remindData.value.forEach(remind => {
const remind_data = JSON.parse(remind.data);
if (remind_data.data.taskId === task.id) {
msgId.value = remind.id;
}
});
});
// id
async function getDeliverData() {
try {

Loading…
Cancel
Save