Merge branch 'master' into dev
Showing
1 changed file
with
27 additions
and
82 deletions
... | @@ -29,80 +29,24 @@ | ... | @@ -29,80 +29,24 @@ |
29 | </div> | 29 | </div> |
30 | </template> | 30 | </template> |
31 | <script> | 31 | <script> |
32 | // 定时任务 | 32 | // 定时任务 |
33 | import data from "./data" | 33 | import data from "./data" |
34 | import sjsbTask from '@/api/sjsbTask.js' | 34 | import sjsbTask from '@/api/sjsbTask.js' |
35 | import tableMixin from '@/mixins/tableMixin.js' | 35 | import tableMixin from '@/mixins/tableMixin.js' |
36 | import addTask from '../components/addTask.vue' | 36 | import addTask from '../components/addTask.vue' |
37 | export default { | 37 | export default { |
38 | name: "timedTask", | 38 | name: "timedTask", |
39 | mixins: [tableMixin], | 39 | mixins: [tableMixin], |
40 | components: { | 40 | components: { |
41 | addTask | 41 | addTask |
42 | }, | 42 | }, |
43 | data () { | 43 | data () { |
44 | return { | 44 | return { |
45 | taskData: null, | 45 | taskData: null, |
46 | isDialog: false, | 46 | isDialog: false, |
47 | form: { | 47 | form: { |
48 | jobName: '', | 48 | jobName: '', |
49 | currentPage: 1 | 49 | currentPage: 1 |
50 | }, | ||
51 | selectionList: [], | ||
52 | tableData: { | ||
53 | columns: [{ | ||
54 | label: '序号', | ||
55 | type: 'index', | ||
56 | width: '50', | ||
57 | index: this.indexMethod, | ||
58 | }].concat(data.columns()).concat([ | ||
59 | { | ||
60 | label: "操作", | ||
61 | width: 380, | ||
62 | render: (h, scope) => { | ||
63 | return ( | ||
64 | <div> | ||
65 | <el-button type="text" | ||
66 | size="mini" | ||
67 | v-show={scope.row.jobStatus === 0} | ||
68 | class='btnColor' | ||
69 | onClick={() => { this.handleActive(scope.row) }}>激活 | ||
70 | </el-button> | ||
71 | <el-button type="text" | ||
72 | size="mini" | ||
73 | v-show={scope.row.jobStatus === -1} | ||
74 | class='btnColor' | ||
75 | onClick={() => { this.recover(scope.row) }}>恢复 | ||
76 | </el-button> | ||
77 | <el-button type="text" | ||
78 | size="mini" | ||
79 | class='successColor' | ||
80 | onClick={() => { this.handleEdit(scope.row) }}>编辑 | ||
81 | </el-button> | ||
82 | <el-button type="text" | ||
83 | size="mini" | ||
84 | class='successColor' | ||
85 | v-show={scope.row.jobStatus !== -1} | ||
86 | onClick={() => { this.handleDel(scope.row) }}>删除 | ||
87 | </el-button> | ||
88 | </div> | ||
89 | ); | ||
90 | }, | ||
91 | }, | ||
92 | ]), | ||
93 | data: [] | ||
94 | }, | ||
95 | pageData: { | ||
96 | total: 0, | ||
97 | pageSize: 15, | ||
98 | current: 1, | ||
99 | }, | ||
100 | } | ||
101 | }, | ||
102 | methods: { | ||
103 | handleAdd () { | ||
104 | this.taskData = null | ||
105 | this.isDialog = true | ||
106 | }, | 50 | }, |
107 | selectionList: [], | 51 | selectionList: [], |
108 | tableData: { | 52 | tableData: { |
... | @@ -114,29 +58,29 @@ | ... | @@ -114,29 +58,29 @@ |
114 | }].concat(data.columns()).concat([ | 58 | }].concat(data.columns()).concat([ |
115 | { | 59 | { |
116 | label: "操作", | 60 | label: "操作", |
117 | width: 380, | 61 | width: 230, |
118 | render: (h, scope) => { | 62 | render: (h, scope) => { |
119 | return ( | 63 | return ( |
120 | <div> | 64 | <div> |
121 | <el-button type="text" | 65 | <el-button type="text" |
66 | size="mini" | ||
122 | v-show={scope.row.jobStatus === 0} | 67 | v-show={scope.row.jobStatus === 0} |
123 | class='btnColor' | 68 | class='btnColor' |
124 | icon="el-icon-video-pause" | ||
125 | onClick={() => { this.handleActive(scope.row) }}>激活 | 69 | onClick={() => { this.handleActive(scope.row) }}>激活 |
126 | </el-button> | 70 | </el-button> |
127 | <el-button type="text" | 71 | <el-button type="text" |
72 | size="mini" | ||
128 | v-show={scope.row.jobStatus === -1} | 73 | v-show={scope.row.jobStatus === -1} |
129 | class='btnColor' | 74 | class='btnColor' |
130 | icon="el-icon-video-pause" | ||
131 | onClick={() => { this.recover(scope.row) }}>恢复 | 75 | onClick={() => { this.recover(scope.row) }}>恢复 |
132 | </el-button> | 76 | </el-button> |
133 | <el-button type="text" | 77 | <el-button type="text" |
134 | icon="el-icon-edit" | 78 | size="mini" |
135 | class='btnColor' | 79 | class='successColor' |
136 | onClick={() => { this.handleEdit(scope.row) }}>编辑 | 80 | onClick={() => { this.handleEdit(scope.row) }}>编辑 |
137 | </el-button> | 81 | </el-button> |
138 | <el-button type="text" | 82 | <el-button type="text" |
139 | icon="el-icon-delete" | 83 | size="mini" |
140 | class='successColor' | 84 | class='successColor' |
141 | v-show={scope.row.jobStatus !== -1} | 85 | v-show={scope.row.jobStatus !== -1} |
142 | onClick={() => { this.handleDel(scope.row) }}>删除 | 86 | onClick={() => { this.handleDel(scope.row) }}>删除 |
... | @@ -152,8 +96,9 @@ | ... | @@ -152,8 +96,9 @@ |
152 | total: 0, | 96 | total: 0, |
153 | pageSize: 15, | 97 | pageSize: 15, |
154 | current: 1, | 98 | current: 1, |
155 | }, | 99 | } |
156 | }, | 100 | } |
101 | }, | ||
157 | methods: { | 102 | methods: { |
158 | handleAdd () { | 103 | handleAdd () { |
159 | this.taskData = null | 104 | this.taskData = null | ... | ... |
-
Please register or sign in to post a comment