| File was renamed from src/cool/modules/taskSetting/views/taskSetting.vue |
| | |
| | | // 新增、编辑配置
|
| | | const upsert = reactive<Upsert>({
|
| | | items: [
|
| | | // {
|
| | | // }
|
| | | {
|
| | | label: "周期任务",
|
| | | prop: "crontab_rule",
|
| | | component: {
|
| | | name: "el-input"
|
| | | },
|
| | | //是否为必填项,注:接口配置字段时没有设置默认值时,都需要选择必填
|
| | | required: true
|
| | | },
|
| | | {
|
| | | label: "设备分组ID",
|
| | | prop: "group_id",
|
| | | component: {
|
| | | name: "el-input"
|
| | | },
|
| | | required: true
|
| | | },
|
| | | {
|
| | | label: "设置人",
|
| | | prop: "operator",
|
| | | component: {
|
| | | name: "el-input"
|
| | | },
|
| | | required: true
|
| | | },
|
| | | {
|
| | | label: "备注",
|
| | | prop: "remark",
|
| | | component: {
|
| | | name: "el-input"
|
| | | }
|
| | | },
|
| | | {
|
| | | label: "状态",
|
| | | prop: "status",
|
| | | component: {
|
| | | name: "el-input"
|
| | | }
|
| | | }
|
| | | ]
|
| | | });
|
| | |
|
| | |
| | | const table = reactive<Table>({
|
| | | columns: [
|
| | | {
|
| | | type: "selection",
|
| | | align: "center"
|
| | | },
|
| | | {
|
| | | label: "id",
|
| | | prop: "id"
|
| | | },
|
| | | {
|
| | | label: "设备分组ID",
|
| | | prop: "group_id"
|
| | | },
|
| | | {
|
| | | label: "任务类型",
|
| | | prop: "task_type"
|
| | | prop: "id",
|
| | | sortable: true //是否排序功能
|
| | | },
|
| | | {
|
| | | label: "周期任务",
|
| | | prop: "crontab_rule"
|
| | | },
|
| | | {
|
| | | label: "任务内容描述",
|
| | | prop: "task_content"
|
| | | },
|
| | | {
|
| | | label: "任务参数",
|
| | | prop: "task_params"
|
| | | },
|
| | | {
|
| | | label: "任务命令格式",
|
| | | prop: "task_command"
|
| | | label: "设备分组ID",
|
| | | prop: "group_id"
|
| | | },
|
| | | {
|
| | | label: "设置人",
|
| | |
| | | // crud 加载
|
| | | function onLoad({ ctx, app }: CrudLoad) {
|
| | | // 绑定 service
|
| | | ctx.service(service.taskSetting.taskSetting).done();
|
| | | ctx.service(service.business.periodicsetting).done();
|
| | | app.refresh();
|
| | | }
|
| | |
|