Browse Source

perf: 修改内置插件任务名

disable-role
song 4 years ago
parent
commit
11913968a5
  1. 3
      CHANGELOG.md
  2. 1
      src/components/InputSearch/InputSearch.vue
  3. 2
      src/components/Plugin/Plugin.vue
  4. 4
      src/components/TimeLine/component/TimeBox.vue
  5. 2
      src/components/Title/Title.vue
  6. 3
      src/components/Title/components/CreateTask.vue
  7. 1
      src/pages/project/project.vue
  8. 2
      src/plugins/p-subproject/p-subproject.vue
  9. 2
      src/plugins/p-subtasks/p-subtasks.vue
  10. 33
      src/plugins/p-task-title/p-task-title.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-10-22)
# 0.1.0 (2021-10-26)
### 🌟 新功能
范围|描述|commitId
@ -55,6 +55,7 @@
- | 添加医院项目下的问卷悬浮按钮 | e68e633
- | 添加子任务插件 子项目插件 | 7bda7e2
- | 添加时间轴上下滚动 | 2b81bbc
- | 添加禁用角色 | 732684d
- | 添加项目排序 | a0b491b
- | 点击日历日期查询项目列表 | c458385
- | 细节调整,添加project-webview | 4d9050b

1
src/components/InputSearch/InputSearch.vue

@ -33,7 +33,6 @@ export default {
methods: {
search(e) {
let val = e.detail.value;
console.log('val: ', val);
this.$emit('searchPrevTask', val);
// let arr = [];

2
src/components/Plugin/Plugin.vue

@ -22,7 +22,7 @@
<view v-else @click="setStorage">
<!-- <plugin-default /> -->
<!-- <component :task="task" :is="pluginComponent"></component> -->
<p-task-title :task="task" v-if="pluginId === '1'" />
<p-task-title :task="task" :param="param" v-if="pluginId === '1'" />
<p-task-description :task="task" v-if="pluginId === '2'" />
<p-task-duration-delay :task="task" v-if="pluginId === '3'" />
<p-task-start-time-delay :task="task" v-if="pluginId === '4'" />

4
src/components/TimeLine/component/TimeBox.vue

@ -48,12 +48,12 @@
<Plugin
:class="[`row-span-${plugin.row}`, `col-span-${plugin.col}`]"
:task="task"
:key="plugin.pluginTaskId"
:key="pluginIndex"
:plugin-task-id="plugin.pluginTaskId"
:plugin-id="plugin.pluginId"
:param="plugin.param"
:style-type="styleType || 0"
v-for="plugin in row"
v-for="(plugin, pluginIndex) in row"
/>
</view>
</view>

2
src/components/Title/Title.vue

@ -101,7 +101,6 @@ export default {
onBack() {
// eslint-disable-next-line no-undef
const pages = getCurrentPages(); //
console.log('历史pages: ', pages.length);
if (pages.length > 1) {
uni.webView.navigateBack();
} else {
@ -120,7 +119,6 @@ export default {
},
//
openIndex() {
console.log(111);
uni.webView.reLaunch({ url: `/pages/index/index?u=${this.userId}` });
},

3
src/components/Title/components/CreateTask.vue

@ -268,7 +268,6 @@ export default {
//
handleChange(data) {
console.log('data', data);
this.processTaskId = data.detailId;
},
//
@ -400,14 +399,12 @@ export default {
if (res.planStart - 0 > item.planStart - 0) {
if (res.planStart - 0 <= oldTasks[i + 1].planStart - 0) {
oldTasks.splice(i + 1, 0, res);
console.log('res: ', res);
return;
}
}
}
}
// TODO:
console.log('oldTasks: ', oldTasks);
this.updateTasks([...oldTasks]);
},
},

1
src/pages/project/project.vue

@ -354,7 +354,6 @@ export default {
this.$t.ui.showToast('缺少项目信息参数'); // id
} else {
if (options.p !== this.$t.storage.getStorageSync('projectId')) {
console.log('切项目了');
this.$t.storage.setStorageSync('roleId', '');
}
// TODO

2
src/plugins/p-subproject/p-subproject.vue

@ -1,7 +1,7 @@
<template>
<!-- 子项目插件 -->
<view>
<view v-for="item in sonProject" :key="item.detailId">
<view v-for="(item, index) in sonProject" :key="index">
<span class="text-xs text-blue-500" @click="openProject(item)">{{ item.name }}</span>
</view>
</view>

2
src/plugins/p-subtasks/p-subtasks.vue

@ -1,6 +1,6 @@
<template>
<view>
<view v-for="item in sonTask" :key="item.detailId">
<view v-for="(item, index) in sonTask" :key="index">
<span class="text-xs text-gray-500">{{ item.name }}</span>
</view>
</view>

33
src/plugins/p-task-title/p-task-title.vue

@ -1,9 +1,15 @@
<template>
<!-- 任务名插件 -->
<view>{{ task.name }}</view>
<!-- <view>{{ task.name }}</view> -->
<view class="flex justify-between items-center" @click="postMsg(param)">
<view class="flex-1">{{ task.name }}</view>
<img style="height: 16px" src="https://www.tall.wiki/staticrec/photos/right.png" />
</view>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
name: 'p-task-title',
props: {
@ -11,6 +17,31 @@ export default {
type: Object,
default: () => {},
},
param: { type: String, default: '' },
},
computed: {
...mapGetters('user', ['userId']),
...mapGetters('project', ['projectId']),
},
methods: {
// PC
postMsg(param) {
/* #ifdef H5 */
if (param) {
const data = JSON.parse(param);
if (data && data.url) {
const url = `${data.url}?u=${this.userId}&p=${this.projectId}&t=${this.task.id}`;
const msg = {
event: 'openDetail',
data: url,
};
top.postMessage(msg, '*');
}
}
/* #endif */
},
},
};
</script>

Loading…
Cancel
Save