解决 task 数据显示异常

This commit is contained in:
icssoa 2022-02-24 09:42:07 +08:00
parent ca6d5365dd
commit bff76769b0
2 changed files with 1177 additions and 1168 deletions

View File

@ -214,13 +214,13 @@
</template>
<script lang="ts">
import { computed, defineComponent, onMounted, reactive } from "vue";
import { computed, defineComponent, inject, onMounted, reactive } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import Draggable from "vuedraggable/src/vuedraggable";
import { checkPerm } from "/$/base";
import { ContextMenu } from "@cool-vue/crud";
import Cron from "../components/cron";
import { useCool } from "/@/cool";
import { useRefs } from "/@/cool";
export default defineComponent({
name: "task",
@ -231,7 +231,8 @@ export default defineComponent({
},
setup() {
const { refs, setRefs, service } = useCool();
const { refs, setRefs } = useRefs();
const service = inject<any>("service");
//
const list = reactive<any[]>([
@ -394,7 +395,6 @@ export default defineComponent({
{
label: "名称",
prop: "name",
value: info.name,
component: {
name: "el-input",
props: {
@ -409,7 +409,7 @@ export default defineComponent({
{
label: "类型",
prop: "taskType",
value: info.taskType || 0,
value: 0,
component: {
name: "el-select",
options: [
@ -440,7 +440,6 @@ export default defineComponent({
hidden: ({ scope }: any) => {
return scope.taskType == 1;
},
value: info.cron,
component: {
name: "slot-cron"
},
@ -452,7 +451,6 @@ export default defineComponent({
{
label: "次数",
prop: "limit",
value: info.limit,
hidden: ({ scope }: any) => {
return scope.taskType == 0;
},
@ -467,7 +465,6 @@ export default defineComponent({
{
label: "间隔(秒)",
prop: "every",
value: info.every,
hidden: ({ scope }: any) => {
return scope.taskType == 0;
},
@ -486,7 +483,6 @@ export default defineComponent({
{
label: "service",
prop: "service",
value: info.service,
component: {
name: "el-input",
props: {
@ -497,29 +493,31 @@ export default defineComponent({
{
label: "开始时间",
prop: "startDate",
value: info.startDate || "",
hidden: ({ scope }: any) => {
return scope.taskType == 1;
},
component: {
name: "el-date-picker",
props: {
type: "datetime"
type: "datetime",
"value-format": "YYYY-MM-DD HH:mm:ss"
}
}
},
{
label: "结束时间",
prop: "endDate",
value: info.endDate || "",
component: {
name: "el-date-picker",
props: {
type: "datetime"
type: "datetime",
"value-format": "YYYY-MM-DD HH:mm:ss"
}
}
},
{
label: "备注",
prop: "remark",
value: info.remark,
component: {
name: "el-input",
props: {
@ -530,7 +528,6 @@ export default defineComponent({
{
label: "状态",
prop: "status",
value: info.status === 0 ? 0 : 1,
component: {
name: "el-radio-group",
options: [
@ -546,6 +543,9 @@ export default defineComponent({
}
}
],
form: {
...info
},
on: {
submit: (data: any, { close, done }: any) => {
if (!data.limit) {

2315
yarn.lock

File diff suppressed because it is too large Load Diff