ab1bccb8 by renchao@pashanhoo.com

chore:配置修改

1 parent 89d12179
1 { 1 {
2 "TITLE": "汉中市数据上报系统", 2 "TITLE": "汉中市数据上报系统",
3 "THEME": "sb", 3 "THEME": "sb",
4 "CODE": "BDCJGPT", 4 "CODE": "BDCSBPT",
5 "SERVERAPI": "/bdcsjsb", 5 "SERVERAPI": "/bdcsjsb",
6 "calcHeight": 160, 6 "calcHeight": 160,
7 "MANAGEMENTAPI": "http://192.168.2.38:8090/management" 7 "MANAGEMENTAPI": "http://192.168.2.38:8090/management"
......
...@@ -20,7 +20,9 @@ router.beforeEach(async (to, from, next) => { ...@@ -20,7 +20,9 @@ router.beforeEach(async (to, from, next) => {
20 localStorage.removeItem("token"); 20 localStorage.removeItem("token");
21 next(); 21 next();
22 } else { 22 } else {
23 window.document.documentElement.setAttribute("data-theme", 'blue'); 23 setTimeout(() => {
24 window.document.documentElement.setAttribute("data-theme", 'blue');
25 }, 20)
24 let code = Vue.prototype.BASE_API.CODE 26 let code = Vue.prototype.BASE_API.CODE
25 //判断token是否存在 27 //判断token是否存在
26 const hasToken = localStorage.getItem("token"); 28 const hasToken = localStorage.getItem("token");
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
2 <div class="timedTask from-clues"> 2 <div class="timedTask from-clues">
3 <div class="from-clues-header"> 3 <div class="from-clues-header">
4 <el-form ref="form" :model="form" label-width="80px"> 4 <el-form ref="form" :model="form" label-width="80px">
5 <el-form-item v-if="BASE_API.THEME=='jg'"> 5 <el-form-item v-if="BASE_API.THEME == 'jg'">
6 <Breadcrumb /> 6 <Breadcrumb />
7 </el-form-item> 7 </el-form-item>
8 <el-row> 8 <el-row class="mb-5">
9 <el-col :span="6"> 9 <el-col :span="6">
10 <el-form-item label="搜索标题"> 10 <el-form-item label="搜索标题">
11 <el-input v-model="form.jobName" placeholder="标题"></el-input> 11 <el-input v-model="form.jobName" placeholder="标题"></el-input>
...@@ -29,227 +29,227 @@ ...@@ -29,227 +29,227 @@
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 v-show={scope.row.jobStatus === 0}
67 class='btnColor'
68 icon="el-icon-video-pause"
69 onClick={() => { this.handleActive(scope.row) }}>激活
70 </el-button>
71 <el-button type="text"
72 v-show={scope.row.jobStatus === -1}
73 class='btnColor'
74 icon="el-icon-video-pause"
75 onClick={() => { this.recover(scope.row) }}>恢复
76 </el-button>
77 <el-button type="text"
78 icon="el-icon-edit"
79 class='btnColor'
80 onClick={() => { this.handleEdit(scope.row) }}>编辑
81 </el-button>
82 <el-button type="text"
83 icon="el-icon-delete"
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 resetSe () { 51 selectionList: [],
108 this.form.jobName = '' 52 tableData: {
109 this.featchData() 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 v-show={scope.row.jobStatus === 0}
67 class='btnColor'
68 icon="el-icon-video-pause"
69 onClick={() => { this.handleActive(scope.row) }}>激活
70 </el-button>
71 <el-button type="text"
72 v-show={scope.row.jobStatus === -1}
73 class='btnColor'
74 icon="el-icon-video-pause"
75 onClick={() => { this.recover(scope.row) }}>恢复
76 </el-button>
77 <el-button type="text"
78 icon="el-icon-edit"
79 class='btnColor'
80 onClick={() => { this.handleEdit(scope.row) }}>编辑
81 </el-button>
82 <el-button type="text"
83 icon="el-icon-delete"
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: []
110 }, 94 },
111 async featchData () { 95 pageData: {
112 try { 96 total: 0,
113 this.form = Object.assign(this.form, this.formData) 97 pageSize: 15,
114 let { result } = await sjsbTask.getTaskListByName(this.form) 98 current: 1,
115 this.tableData.data = result.list
116 } catch (error) {
117 this.message = error
118 }
119 }, 99 },
120 recover (row) { 100 }
121 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', { 101 },
122 confirmButtonText: '确定', 102 methods: {
123 cancelButtonText: '取消', 103 handleAdd () {
124 type: 'warning', 104 this.taskData = null
125 }) 105 this.isDialog = true
126 .then(() => { 106 },
127 sjsbTask.recover(row.jobId) 107 resetSe () {
128 .then((res) => { 108 this.form.jobName = ''
129 if ((res.code = 200)) { 109 this.featchData()
130 this.$message({ 110 },
131 type: 'success', 111 async featchData () {
132 message: res.message, 112 try {
133 }) 113 this.form = Object.assign(this.form, this.formData)
134 this.featchData() 114 let { result } = await sjsbTask.getTaskListByName(this.form)
135 } 115 this.tableData.data = result.list
136 }) 116 } catch (error) {
137 .catch((error) => { 117 this.message = error
138 this.$alert(error, '提示', { 118 }
139 confirmButtonText: '确定', 119 },
140 type: 'error' 120 recover (row) {
121 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
122 confirmButtonText: '确定',
123 cancelButtonText: '取消',
124 type: 'warning',
125 })
126 .then(() => {
127 sjsbTask.recover(row.jobId)
128 .then((res) => {
129 if ((res.code = 200)) {
130 this.$message({
131 type: 'success',
132 message: res.message,
141 }) 133 })
134 this.featchData()
135 }
136 })
137 .catch((error) => {
138 this.$alert(error, '提示', {
139 confirmButtonText: '确定',
140 type: 'error'
142 }) 141 })
143 })
144 .catch(() => {
145 this.$message({
146 type: 'info',
147 message: '已取消',
148 }) 142 })
143 })
144 .catch(() => {
145 this.$message({
146 type: 'info',
147 message: '已取消',
149 }) 148 })
150 },
151
152 handleActive (row) {
153 this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
154 confirmButtonText: '确定',
155 cancelButtonText: '取消',
156 type: 'warning',
157 }) 149 })
158 .then(() => { 150 },
159 sjsbTask.active(row.jobId) 151
160 .then((res) => { 152 handleActive (row) {
161 if ((res.code = 200)) { 153 this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
162 this.$message({ 154 confirmButtonText: '确定',
163 type: 'success', 155 cancelButtonText: '取消',
164 message: res.message, 156 type: 'warning',
165 }) 157 })
166 this.featchData() 158 .then(() => {
167 } 159 sjsbTask.active(row.jobId)
168 }) 160 .then((res) => {
169 .catch((error) => { 161 if ((res.code = 200)) {
170 this.$alert(error, '提示', { 162 this.$message({
171 confirmButtonText: '确定', 163 type: 'success',
172 type: 'error' 164 message: res.message,
173 }) 165 })
166 this.featchData()
167 }
168 })
169 .catch((error) => {
170 this.$alert(error, '提示', {
171 confirmButtonText: '确定',
172 type: 'error'
174 }) 173 })
175 })
176 .catch(() => {
177 this.$message({
178 type: 'info',
179 message: '已取消',
180 }) 174 })
175 })
176 .catch(() => {
177 this.$message({
178 type: 'info',
179 message: '已取消',
181 }) 180 })
182 },
183 // 暂停
184 handleSuspend (row) {
185 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
186 confirmButtonText: '确定',
187 cancelButtonText: '取消',
188 type: 'warning',
189 }) 181 })
190 .then(() => { 182 },
191 sjsbTask.pauseJob(row.id) 183 // 暂停
192 .then((res) => { 184 handleSuspend (row) {
193 if ((res.code = 200)) { 185 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
194 this.$message({ 186 confirmButtonText: '确定',
195 type: 'success', 187 cancelButtonText: '取消',
196 message: res.message, 188 type: 'warning',
197 }) 189 })
198 this.featchData() 190 .then(() => {
199 } 191 sjsbTask.pauseJob(row.id)
200 }) 192 .then((res) => {
201 .catch((error) => { 193 if ((res.code = 200)) {
202 this.$alert(error, '提示', { 194 this.$message({
203 confirmButtonText: '确定', 195 type: 'success',
204 type: 'error' 196 message: res.message,
205 }) 197 })
198 this.featchData()
199 }
200 })
201 .catch((error) => {
202 this.$alert(error, '提示', {
203 confirmButtonText: '确定',
204 type: 'error'
206 }) 205 })
207 })
208 .catch(() => {
209 this.$message({
210 type: 'info',
211 message: '已取消',
212 }) 206 })
207 })
208 .catch(() => {
209 this.$message({
210 type: 'info',
211 message: '已取消',
213 }) 212 })
214 },
215 handleEdit (row) {
216 this.taskData = row
217 this.isDialog = true
218 },
219 handleDel (row) {
220 this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
221 confirmButtonText: '确定',
222 cancelButtonText: '取消',
223 type: 'warning',
224 }) 213 })
225 .then(() => { 214 },
226 sjsbTask.sjsbTaskRemove(row.jobId) 215 handleEdit (row) {
227 .then((res) => { 216 this.taskData = row
228 if ((res.code = 200)) { 217 this.isDialog = true
229 this.$message({ 218 },
230 type: 'success', 219 handleDel (row) {
231 message: res.message, 220 this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
232 }) 221 confirmButtonText: '确定',
233 this.featchData() 222 cancelButtonText: '取消',
234 } 223 type: 'warning',
235 }) 224 })
236 .catch((error) => { 225 .then(() => {
237 this.$alert(error, '提示', { 226 sjsbTask.sjsbTaskRemove(row.jobId)
238 confirmButtonText: '确定', 227 .then((res) => {
239 type: 'error' 228 if ((res.code = 200)) {
229 this.$message({
230 type: 'success',
231 message: res.message,
240 }) 232 })
233 this.featchData()
234 }
235 })
236 .catch((error) => {
237 this.$alert(error, '提示', {
238 confirmButtonText: '确定',
239 type: 'error'
241 }) 240 })
242 })
243 .catch(() => {
244 this.$message({
245 type: 'info',
246 message: '已取消',
247 }) 241 })
242 })
243 .catch(() => {
244 this.$message({
245 type: 'info',
246 message: '已取消',
248 }) 247 })
249 } 248 })
250 } 249 }
251 } 250 }
251 }
252 </script> 252 </script>
253 <style scoped lang="scss"> 253 <style scoped lang="scss">
254 @import "~@/styles/mixin.scss"; 254 // @import "~@/styles/mixin.scss";
255 </style> 255 </style>
......