Rap 原分销系统代码Web
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

2125 行
71KB

  1. <template>
  2. <div class="app-container">
  3. <div style="margin-bottom:10px">
  4. <el-button type="success" @click="addBtn">新增</el-button>
  5. <el-button type="info" @click="goSearchLogs">日志</el-button>
  6. </div>
  7. <!--搜索-->
  8. <el-form class="mt_15" ref="form" inline size="small">
  9. <el-form-item label="任务名称">
  10. <el-input v-model.trim="searchParm.jobName" clearable placeholder="任务名称"></el-input>
  11. </el-form-item>
  12. <el-date-picker
  13. v-model.trim="searchTime"
  14. type="daterange"
  15. range-separator=":"
  16. start-placeholder="开始日期"
  17. end-placeholder="结束日期"
  18. style="width:270px"
  19. ></el-date-picker>
  20. <el-form-item label="状态">
  21. <el-select v-model.trim="searchParm.isPause" placeholder="请选择">
  22. <el-option
  23. v-for="item in isPauseList"
  24. :key="item.value"
  25. :label="item.label"
  26. :value="item.value"
  27. ></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item>
  31. <el-button type="primary" @click="goSearchByCondition">搜索</el-button>
  32. <el-button type="warning" @click="resetForm">重置</el-button>
  33. </el-form-item>
  34. </el-form>
  35. <!--表格渲染-->
  36. <el-table
  37. ref="table"
  38. border
  39. size="small"
  40. :data="list"
  41. :header-cell-style="{textAlign:'center'}"
  42. :cell-style="{textAlign:'center'}"
  43. >
  44. <el-table-column label="序号" type="index" width="50" />
  45. <el-table-column label="任务ID" prop="jobId" />
  46. <el-table-column label="任务名称" prop="jobName" />
  47. <el-table-column label="SpringBean名称" prop="beanName" />
  48. <el-table-column label="方法名称" prop="methodName" />
  49. <el-table-column label="参数" prop="params">
  50. <template slot-scope="scope">
  51. <el-button type="text" @click="showParams(scope.row)">查看参数</el-button>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="cron表达式" prop="cronExpression" />
  55. <el-table-column label="运行状态" prop="isPause">
  56. <template slot-scope="scope">{{ scope.row.isPause | getStatus}}</template>
  57. </el-table-column>
  58. <el-table-column label="描述" prop="description" />
  59. <el-table-column label="创建时间" prop="createTime" />
  60. <el-table-column label="操作" width="310">
  61. <template slot-scope="scope">
  62. <!-- <el-button type="info" @click="modifyStatus(scope.row.jobId)">恢复</el-button> -->
  63. <el-button
  64. type="info"
  65. @click="modifyStatus(scope.row.jobId)"
  66. >{{scope.row.isPause ?'恢复':'暂停'}}</el-button>
  67. <el-button type="primary" @click="executionById(scope.row.jobId)">执行</el-button>
  68. <el-button type="warning" @click="editById(scope.row)">修改</el-button>
  69. <el-button type="danger" @click="delById(scope.row.jobId)">删除</el-button>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <!--分页-->
  74. <div class="mt_15">
  75. <el-pagination
  76. @size-change="handleSizeChange"
  77. @current-change="handleCurrentChange"
  78. :current-page="searchParm.page"
  79. :page-sizes="[10, 20, 30, 40, 50]"
  80. :page-size="searchParm.pageSize"
  81. layout="total, sizes, prev, pager, next, jumper"
  82. :total="total"
  83. ></el-pagination>
  84. </div>
  85. <!--新增弹窗-->
  86. <el-dialog :visible.sync="dialogAddVisible" :title="dialogAddTitle" center width="45%">
  87. <div class="dialog-content">
  88. <el-form ref="addParm" size="small" :model="addParm" :rules="rules" label-width="130px">
  89. <el-form-item label="任务名称" prop="jobName">
  90. <el-input v-model.trim="addParm.jobName" clearable></el-input>
  91. </el-form-item>
  92. <el-form-item label="SpringBean名称" hidden prop="beanName">
  93. <el-input v-model.trim="editParm.beanName" clearable></el-input>
  94. </el-form-item>
  95. <el-form-item label="方法名称" hidden prop="methodName">
  96. <el-input v-model.trim="editParm.methodName" clearable></el-input>
  97. </el-form-item>
  98. <el-form-item label="描述" prop="description">
  99. <el-input v-model.trim="addParm.description" clearable></el-input>
  100. </el-form-item>
  101. <el-form-item label="cron表达式" prop="cronExpression">
  102. <el-input v-model.trim="addParm.cronExpression" clearable></el-input>
  103. </el-form-item>
  104. <el-form-item label="子任务ID" prop="subTask">
  105. <el-input v-model.trim="addParm.subTask" clearable></el-input>
  106. </el-form-item>
  107. <el-form-item label="负责人" prop="personInCharge">
  108. <el-input v-model.trim="addParm.personInCharge" clearable></el-input>
  109. </el-form-item>
  110. <el-form-item label="报警邮箱" prop="email">
  111. <el-input v-model.trim="addParm.email" clearable></el-input>
  112. </el-form-item>
  113. <el-form-item label="失败后暂停" prop="pauseAfterFailure">
  114. <el-select v-model.trim="addParm.pauseAfterFailure" placeholder="请选择">
  115. <el-option
  116. v-for="item in pauseAfterFailureList"
  117. :key="item.value"
  118. :label="item.label"
  119. :value="item.value"
  120. ></el-option>
  121. </el-select>`
  122. </el-form-item>
  123. <el-form-item label="运行状态" prop="isPause">
  124. <el-select v-model.trim="addParm.isPause" placeholder="请选择">
  125. <el-option
  126. v-for="item in isPauseList"
  127. :key="item.value"
  128. :label="item.label"
  129. :value="item.value"
  130. ></el-option>
  131. </el-select>
  132. </el-form-item>
  133. <el-form-item label="设备名称" prop="rebotName">
  134. <el-input v-model.trim="addParm.rebotName" disabled="true" style="width:200px" />
  135. <el-button
  136. type="primary"
  137. icon="el-icon-search"
  138. @click="goSearchRebot"
  139. style="width:130px"
  140. >请选择设备</el-button>
  141. </el-form-item>
  142. <el-form-item label="应用名称" prop="applyId">
  143. <el-select v-model.trim="addParm.applyId" @change="applyClick" placeholder="请选择">
  144. <el-option
  145. v-for="item in applys"
  146. :key="item.name"
  147. :label="item.name"
  148. :value="item.id"
  149. ></el-option>
  150. </el-select>
  151. </el-form-item>
  152. <!-- 先选择应用 后才能选择这个 根据应用调用不同的对应的 请求参数 分页查询 -->
  153. <el-form-item label="脚本参数" prop="paramsType">
  154. <el-radio-group v-model.trim="addParm.paramsType" @change="changeCheckRange">
  155. <el-radio :label="'1'">自定义输入</el-radio>
  156. <el-radio v-if="addParm.applyId==2" :label="'2'">速卖通-刷单</el-radio>
  157. <el-radio v-if="addParm.applyId==3" :label="'3'">速卖通-刷补</el-radio>
  158. <el-radio v-if="addParm.applyId==4" :label="'4'">速卖通-好评</el-radio>
  159. <el-radio v-if="addParm.applyId==5" :label="'5'">速卖通-收藏</el-radio>
  160. <el-radio v-if="addParm.applyId==6" :label="'6'">敦煌-加购</el-radio>
  161. <el-radio v-if="addParm.applyId==7" :label="'7'">敦煌-好评</el-radio>
  162. <el-radio v-if="addParm.applyId==8" :label="'8'">敦煌-抓单</el-radio>
  163. </el-radio-group>
  164. </el-form-item>
  165. <el-form-item label="自定义参数" v-if="labelVal === '1'">
  166. <div id="app">
  167. <el-form class="base-form" ref="baseForm" :model="baseForm">
  168. <el-table
  169. ref="table-input"
  170. class="table"
  171. highlight-current-row
  172. :data="baseForm.demoList"
  173. @row-click="selectItem"
  174. >
  175. <el-table-column label="参数名称">
  176. <template slot-scope="scope">
  177. <el-form-item :prop="'demoList.'+scope.$index+'.name'" class="all">
  178. <el-input v-model.trim="scope.row.name" placeholder="请输入" :disabled="true"></el-input>
  179. </el-form-item>
  180. </template>
  181. </el-table-column>
  182. <el-table-column label="参数值">
  183. <template slot-scope="scope">
  184. <el-form-item :prop="'demoList.'+scope.$index+'.value'" class="all">
  185. <el-input v-model.trim="scope.row.value" placeholder="请输入"></el-input>
  186. </el-form-item>
  187. </template>
  188. </el-table-column>
  189. <el-table-column label="参数类型">
  190. <template slot-scope="scope">
  191. <el-form-item :prop="'demoList.'+scope.$index+'.type'" class="all">
  192. <el-input v-model.trim="scope.row.type" placeholder="请输入" :disabled="true"></el-input>
  193. </el-form-item>
  194. </template>
  195. </el-table-column>
  196. <!-- <el-table-column prop label="操作">
  197. <template>
  198. <div class="flex-c-a">
  199. <el-button type="primary" @click="addLine()">增加</el-button>
  200. <el-button type="danger">删除</el-button>
  201. </div>
  202. </template>
  203. </el-table-column>-->
  204. </el-table>
  205. </el-form>
  206. </div>
  207. </el-form-item>
  208. <el-form-item label="速卖通-刷单" v-if="labelVal === '2'">
  209. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  210. <el-button
  211. type="primary"
  212. icon="el-icon-search"
  213. @click="goSearchClickFarm"
  214. style="width:130px"
  215. >选择刷单信息</el-button>
  216. </el-form-item>
  217. <el-form-item label="速卖通-刷补" v-if="labelVal === '3'">
  218. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  219. <el-button
  220. type="primary"
  221. icon="el-icon-search"
  222. @click="goSearchClickFarmSupplyMent"
  223. style="width:130px"
  224. >选择刷单信息</el-button>
  225. </el-form-item>
  226. <el-form-item label="速卖通-好评" v-if="labelVal === '4'">
  227. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  228. <el-button
  229. type="primary"
  230. icon="el-icon-search"
  231. @click="goSearchWellReceived"
  232. style="width:130px"
  233. >选择订单信息</el-button>
  234. </el-form-item>
  235. <el-form-item label="速卖通-收藏" v-if="labelVal === '5'">
  236. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  237. <el-button
  238. type="primary"
  239. icon="el-icon-search"
  240. @click="goSearchBrowse"
  241. style="width:130px"
  242. >选择收藏信息</el-button>
  243. </el-form-item>
  244. <el-form-item label="敦煌-加购" v-if="labelVal === '6'">
  245. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  246. <el-button
  247. type="primary"
  248. icon="el-icon-search"
  249. @click="dhGoSearchCarFarm"
  250. style="width:130px"
  251. >选择刷单信息</el-button>
  252. </el-form-item>
  253. <el-form-item label="敦煌-好评" v-if="labelVal === '7'">
  254. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  255. <el-button
  256. type="primary"
  257. icon="el-icon-search"
  258. @click="dhGoSearchWellReceived"
  259. style="width:130px"
  260. >选择订单信息</el-button>
  261. </el-form-item>
  262. <el-form-item label="敦煌-抓单" v-if="labelVal === '8'">
  263. <el-input v-model.trim="item" disabled="true" style="width:200px" />
  264. <el-button
  265. type="primary"
  266. icon="el-icon-search"
  267. @click="dhGoSearchClickFarmOrder"
  268. style="width:130px"
  269. >选择刷单信息</el-button>
  270. </el-form-item>
  271. </el-form>
  272. </div>
  273. <span slot="footer">
  274. <el-button type="info" @click="sureAddCancle('addParm')">取消</el-button>
  275. <el-button type="primary" @click="sureAdd('addParm')">确认</el-button>
  276. </span>
  277. </el-dialog>
  278. <!--修改弹窗-->
  279. <el-dialog :visible.sync="dialogEditVisible" :title="dialogEditTitle" center width="45%">
  280. <div class="dialog-content">
  281. <el-form ref="editParm" size="small" :model="editParm" :rules="rules" label-width="130px">
  282. <el-form-item label="任务名称" prop="jobName">
  283. <el-input v-model.trim="editParm.jobName" clearable></el-input>
  284. </el-form-item>
  285. <el-form-item label="描述" prop="description">
  286. <el-input v-model.trim="editParm.description" clearable></el-input>
  287. </el-form-item>
  288. <el-form-item label="SpringBean名称" hidden prop="beanName">
  289. <el-input v-model.trim="editParm.beanName" clearable></el-input>
  290. </el-form-item>
  291. <el-form-item label="方法名称" hidden prop="methodName">
  292. <el-input v-model.trim="editParm.methodName" hidden clearable></el-input>
  293. </el-form-item>
  294. <el-form-item label="cron表达式" prop="cronExpression">
  295. <el-input v-model.trim="editParm.cronExpression" clearable></el-input>
  296. </el-form-item>
  297. <el-form-item label="子任务ID" prop="subTask">
  298. <el-input v-model.trim="editParm.subTask" clearable></el-input>
  299. </el-form-item>
  300. <el-form-item label="负责人" prop="personInCharge">
  301. <el-input v-model.trim="editParm.personInCharge" clearable></el-input>
  302. </el-form-item>
  303. <el-form-item label="报警邮箱" prop="email">
  304. <el-input v-model.trim="editParm.email" clearable></el-input>
  305. </el-form-item>
  306. <el-form-item label="失败后暂停" prop="pauseAfterFailure">
  307. <el-select v-model.trim="editParm.pauseAfterFailure" placeholder="请选择">
  308. <el-option
  309. v-for="item in pauseAfterFailureList"
  310. :key="item.value"
  311. :label="item.label"
  312. :value="item.value"
  313. ></el-option>
  314. </el-select>`
  315. </el-form-item>
  316. <el-form-item label="运行状态" prop="isPause">
  317. <el-select v-model.trim="editParm.isPause" placeholder="请选择">
  318. <el-option
  319. v-for="item in isPauseList"
  320. :key="item.value"
  321. :label="item.label"
  322. :value="item.value"
  323. ></el-option>
  324. </el-select>
  325. </el-form-item>
  326. <el-form-item label="设备名称" prop="rebotName">
  327. <el-input v-model.trim="editParm.rebotName" style="width:200px" />
  328. <el-button
  329. type="primary"
  330. icon="el-icon-search"
  331. @click="goSearchRebot"
  332. style="width:130px"
  333. >请选择设备</el-button>
  334. </el-form-item>
  335. <el-form-item label="应用名称" prop="applyId">
  336. <el-select v-model.trim="editParm.applyId" @change="applyClick" placeholder="请选择">
  337. <el-option
  338. v-for="item in applys"
  339. :key="item.name"
  340. :label="item.name"
  341. :value="item.id"
  342. ></el-option>
  343. </el-select>
  344. </el-form-item>
  345. <el-form-item label="脚本参数" prop="paramsType">
  346. <el-radio-group v-model.trim="editParm.paramsType" @change="changeCheckRange">
  347. <el-radio :label="1">自定义输入</el-radio>
  348. <el-radio v-if="editParm.applyId==2" :label="2">速卖通-刷单</el-radio>
  349. <el-radio v-if="editParm.applyId==3" :label="3">速卖通-刷补</el-radio>
  350. <el-radio v-if="editParm.applyId==4" :label="4">速卖通-好评</el-radio>
  351. <el-radio v-if="editParm.applyId==5" :label="5">速卖通-收藏</el-radio>
  352. <el-radio v-if="editParm.applyId==6" :label="6">敦煌-加购</el-radio>
  353. <el-radio v-if="editParm.applyId==7" :label="7">敦煌-好评</el-radio>
  354. <el-radio v-if="editParm.applyId==8" :label="8">敦煌-抓单</el-radio>
  355. </el-radio-group>
  356. </el-form-item>
  357. <el-form-item label="刷单信息" v-if="editParm.paramsType == 1">
  358. <div id="app">
  359. <el-form class="base-form" ref="baseForm" :model="baseForm">
  360. <el-table
  361. ref="table-input"
  362. class="table"
  363. highlight-current-row
  364. :data="baseForm.demoList"
  365. @row-click="selectItem"
  366. >
  367. <el-table-column label="参数名称">
  368. <template slot-scope="scope">
  369. <el-form-item :prop="'demoList.'+scope.$index+'.name'" class="all">
  370. <el-input v-model.trim="scope.row.name" placeholder="请输入" :disabled="true"></el-input>
  371. </el-form-item>
  372. </template>
  373. </el-table-column>
  374. <el-table-column label="参数值">
  375. <template slot-scope="scope">
  376. <el-form-item :prop="'demoList.'+scope.$index+'.value'" class="all">
  377. <el-input v-model.trim="scope.row.value" placeholder="请输入"></el-input>
  378. </el-form-item>
  379. </template>
  380. </el-table-column>
  381. <el-table-column label="参数类型">
  382. <template slot-scope="scope">
  383. <el-form-item :prop="'demoList.'+scope.$index+'.type'" class="all">
  384. <el-input v-model.trim="scope.row.type" placeholder="请输入" :disabled="true"></el-input>
  385. </el-form-item>
  386. </template>
  387. </el-table-column>
  388. <!-- <el-table-column prop label="操作">
  389. <template>
  390. <div class="flex-c-a">
  391. <el-button type="primary" @click="addLine()">增加</el-button>
  392. <el-button type="danger">删除</el-button>
  393. </div>
  394. </template>
  395. </el-table-column>-->
  396. </el-table>
  397. </el-form>
  398. </div>
  399. </el-form-item>
  400. <el-form-item label="刷单信息" v-if="editParm.paramsType == 2">
  401. <el-input v-model.trim="item" style="width:200px" />
  402. <el-button
  403. type="primary"
  404. icon="el-icon-search"
  405. @click="goSearchClickFarm"
  406. style="width:130px"
  407. >选择刷单信息</el-button>
  408. </el-form-item>
  409. <el-form-item label="刷单补录信息" v-if="editParm.paramsType === 3">
  410. <el-input v-model.trim="item" style="width:200px" />
  411. <el-button
  412. type="primary"
  413. icon="el-icon-search"
  414. @click="goSearchClickFarmSupplyMent"
  415. style="width:130px"
  416. >选择刷单信息</el-button>
  417. </el-form-item>
  418. <el-form-item label="订单信息" v-if="editParm.paramsType === 4">
  419. <el-input v-model.trim="item" style="width:200px" />
  420. <el-button
  421. type="primary"
  422. icon="el-icon-search"
  423. @click="goSearchWellReceived"
  424. style="width:130px"
  425. >选择订单信息</el-button>
  426. </el-form-item>
  427. <el-form-item label="收藏信息" v-if="editParm.paramsType === 5">
  428. <el-input v-model.trim="item" style="width:200px" />
  429. <el-button
  430. type="primary"
  431. icon="el-icon-search"
  432. @click="goSearchBrowse"
  433. style="width:130px"
  434. >选择收藏信息</el-button>
  435. </el-form-item>
  436. <el-form-item label="敦煌-加购" v-if="editParm.paramsType === 6">
  437. <el-input v-model.trim="item" style="width:200px" />
  438. <el-button
  439. type="primary"
  440. icon="el-icon-search"
  441. @click="dhGoSearchCarFarm"
  442. style="width:130px"
  443. >选择刷单信息</el-button>
  444. </el-form-item>
  445. <el-form-item label="敦煌-好评" v-if="editParm.paramsType === 7">
  446. <el-input v-model.trim="item" style="width:200px" />
  447. <el-button
  448. type="primary"
  449. icon="el-icon-search"
  450. @click="dhGoSearchWellReceived"
  451. style="width:130px"
  452. >选择订单信息</el-button>
  453. </el-form-item>
  454. <el-form-item label="敦煌-抓单" v-if="editParm.paramsType === 8">
  455. <el-input v-model.trim="item" style="width:200px" />
  456. <el-button
  457. type="primary"
  458. icon="el-icon-search"
  459. @click="dhGoSearchClickFarmOrder"
  460. style="width:130px"
  461. >选择刷单信息</el-button>
  462. </el-form-item>
  463. </el-form>
  464. </div>
  465. <span slot="footer">
  466. <el-button type="info" @click="sureEditCancle('editParm')">取消</el-button>
  467. <el-button type="primary" @click="sureEdit('editParm')">确认</el-button>
  468. </span>
  469. </el-dialog>
  470. <!--日志弹窗-->
  471. <el-dialog
  472. width="75%"
  473. :visible.sync="dialogLogsListVisible"
  474. :title="dialogLogsListTitle"
  475. center
  476. append-to-body
  477. >
  478. <!-- 搜索日志 -->
  479. <el-form class="mt_15" ref="form" inline size="small">
  480. <el-form-item label="任务名称">
  481. <el-input v-model.trim="searchLogsParm.jobName" clearable placeholder="任务名称"></el-input>
  482. </el-form-item>
  483. <el-date-picker
  484. v-model.trim="searchLogsTime"
  485. type="daterange"
  486. range-separator=":"
  487. start-placeholder="开始日期"
  488. end-placeholder="结束日期"
  489. style="width:270px"
  490. ></el-date-picker>
  491. <el-form-item label="状态">
  492. <el-input v-model.trim="searchLogsParm.isSuccess" clearable placeholder="状态"></el-input>
  493. </el-form-item>
  494. <el-form-item>
  495. <el-button type="primary" @click="goSearchLogsByCondition">搜索</el-button>
  496. <el-button type="warning" @click="resetLogsForm">重置</el-button>
  497. </el-form-item>
  498. </el-form>
  499. <!--表格渲染-->
  500. <el-table
  501. ref="table"
  502. border
  503. size="small"
  504. :data="logsList"
  505. :header-cell-style="{textAlign:'center'}"
  506. :cell-style="{textAlign:'center'}"
  507. >
  508. <el-table-column label="任务名称" prop="jobName" />
  509. <el-table-column label="Bean名称" prop="beanName" />
  510. <el-table-column label="执行方法" prop="methodName" />
  511. <el-table-column label="参数">
  512. <template slot-scope="scope">
  513. <el-button type="text" @click="showParams(scope.row)">查看参数</el-button>
  514. </template>
  515. </el-table-column>
  516. <el-table-column label="cron表达式" prop="cronExpression" />
  517. <el-table-column label="异常详情" prop="exceptionDetail">
  518. <template slot-scope="scope">
  519. <el-button type="text" @click="showDetail(scope.row)">查看异常详情</el-button>
  520. </template>
  521. </el-table-column>
  522. <el-table-column label="耗时(毫秒)" prop="time" />
  523. <el-table-column label="状态" prop="isSuccess">
  524. <template slot-scope="scope">{{ scope.row.isSuccess | getLogIsSuccess}}</template>
  525. </el-table-column>
  526. <el-table-column label="创建日期" prop="createTime" />
  527. </el-table>
  528. <!--分页-->
  529. <div class="mt_15">
  530. <el-pagination
  531. @size-change="handleSizeChange"
  532. @current-change="handleCurrentChange"
  533. :current-page="searchLogsParm.page"
  534. :page-sizes="[10, 20, 30, 40, 50]"
  535. :page-size="searchLogsParm.pageSize"
  536. layout="total, sizes, prev, pager, next, jumper"
  537. :total="logsTotal"
  538. ></el-pagination>
  539. </div>
  540. </el-dialog>
  541. <!--设备选择弹窗-->
  542. <el-dialog
  543. width="75%"
  544. :visible.sync="dialogRebotListVisible"
  545. :title="dialogRebotListTitle"
  546. center
  547. append-to-body
  548. >
  549. <!--搜索-->
  550. <el-form class="mt_15" ref="form" inline size="small">
  551. <el-form-item label="机器人账号">
  552. <el-input v-model.trim="searchRebotParm.accountName" clearable placeholder="机器人账号"></el-input>
  553. </el-form-item>
  554. <el-form-item label="uuid">
  555. <el-input v-model.trim="searchRebotParm.robotClientUuid" clearable placeholder="uuid"></el-input>
  556. </el-form-item>
  557. <el-form-item>
  558. <el-button type="primary" @click="goSearchRebot">搜索</el-button>
  559. <el-button type="warning" @click="resetRebotForm">重置</el-button>
  560. </el-form-item>
  561. </el-form>
  562. <!--表格渲染-->
  563. <el-table
  564. ref="table"
  565. border
  566. size="small"
  567. :data="rebotList"
  568. :header-cell-style="{textAlign:'center'}"
  569. :cell-style="{textAlign:'center'}"
  570. >
  571. <el-table-column label="序号" type="index" width="50" />
  572. <el-table-column label="机器人账号" prop="accountName" />
  573. <el-table-column label="uuid信息" prop="robotClientUuid" />
  574. <el-table-column label="状态" prop="status">
  575. <template slot-scope="scope">{{ scope.row.status | getRebotStatus}}</template>
  576. </el-table-column>
  577. <el-table-column label="创建时间" prop="createdAt" />
  578. <el-table-column label="修改时间" prop="updatedAt" />
  579. <el-table-column label="操作" width="220">
  580. <template slot-scope="scope">
  581. <el-button
  582. type="success"
  583. @click="pickRebot(scope.row)"
  584. v-if="rebotName !== scope.row.accountName"
  585. >选中</el-button>
  586. <div v-if="rebotName === scope.row.accountName">已选中</div>
  587. </template>
  588. </el-table-column>
  589. </el-table>
  590. <!--分页-->
  591. <div class="mt_15">
  592. <el-pagination
  593. @size-change="handleSizeChange"
  594. @current-change="handleCurrentChange"
  595. :current-page="searchRebotParm.page"
  596. :page-sizes="[10, 20, 30, 40, 50]"
  597. :page-size="searchRebotParm.pageSize"
  598. layout="total, sizes, prev, pager, next, jumper"
  599. :total="this.rebotTotal"
  600. ></el-pagination>
  601. </div>
  602. </el-dialog>
  603. <!--刷单信息弹窗-->
  604. <el-dialog
  605. width="75%"
  606. :visible.sync="dialogParamListVisible"
  607. :title="dialogParamListTitle"
  608. center
  609. append-to-body
  610. >
  611. <el-form class="mt_15" ref="form" inline size="small">
  612. <el-form-item label="关键词">
  613. <el-input v-model.trim="searchParamParm.keyWord" clearable placeholder="关键词"></el-input>
  614. </el-form-item>
  615. <el-form-item label="Item">
  616. <el-input v-model.trim="searchParamParm.item" clearable></el-input>
  617. </el-form-item>
  618. <el-form-item label="店铺名称">
  619. <el-input v-model.trim="searchParamParm.shopName" clearable></el-input>
  620. </el-form-item>
  621. <el-form-item label="支付订单ID">
  622. <el-input v-model.trim="searchParamParm.payOrderId" clearable></el-input>
  623. </el-form-item>
  624. <el-form-item>
  625. <el-button type="primary" @click="goClickFarmSearch">搜索</el-button>
  626. <el-button type="warning" @click="goClickFarmResetForm">重置</el-button>
  627. </el-form-item>
  628. </el-form>
  629. <!--表格渲染-->
  630. <el-table
  631. ref="table"
  632. border
  633. size="small"
  634. :data="paramList"
  635. :header-cell-style="{textAlign:'center'}"
  636. :cell-style="{textAlign:'center'}"
  637. >
  638. <el-table-column label="国家" prop="country" align="center" />
  639. <el-table-column label="账号" prop="account" align="center" />
  640. <el-table-column label="平台" prop="platformName" align="center" />
  641. <el-table-column label="商品属性" prop="paramsType" align="center">
  642. <template slot-scope="scope">
  643. {{ scope.row.paramsType | getparamsType}}
  644. </template>
  645. </el-table-column>
  646. <el-table-column label="店铺名称" prop="shopName" align="center" />
  647. <el-table-column label="关键词" prop="keyWord" align="center" />
  648. <el-table-column label="数量" prop="number" align="center" />
  649. <el-table-column label="规格" prop="specification" align="center" />
  650. <el-table-column label="颜色" prop="color" align="center" />
  651. <el-table-column label="Item" prop="item" align="center" />
  652. <el-table-column label="状态" prop="status" align="center">
  653. <template slot-scope="scope">{{ scope.row.status | getFarmingStatus}}</template>
  654. </el-table-column>
  655. <el-table-column label="创建时间" prop="createdAt" align="center" />
  656. <el-table-column label="修改时间" prop="updatedAt" align="center" />
  657. <el-table-column label="操作" width="220">
  658. <template slot-scope="scope">
  659. <el-button
  660. type="success"
  661. @click="pickParam(scope.row)"
  662. v-if="item !== scope.row.item"
  663. >选中</el-button>
  664. <div v-if="item === scope.row.item">已选中</div>
  665. </template>
  666. </el-table-column>
  667. </el-table>
  668. <!--分页-->
  669. <div class="mt_15">
  670. <el-pagination
  671. @size-change="clickHandleSizeChange"
  672. @current-change="clickHandleCurrentChange"
  673. :current-page="searchParamParm.page"
  674. :page-sizes="[10, 20, 30, 40, 50]"
  675. :page-size="searchParamParm.pageSize"
  676. layout="total, sizes, prev, pager, next, jumper"
  677. :total="paramTotal"
  678. ></el-pagination>
  679. </div>
  680. </el-dialog>
  681. <!--敦煌加购信息弹窗-->
  682. <el-dialog
  683. width="75%"
  684. :visible.sync="dialogParamDhListVisible"
  685. :title="dialogParamDhListTitle"
  686. center
  687. append-to-body
  688. >
  689. <el-form class="mt_15" ref="form" inline size="small">
  690. <el-form-item label="商品参数">
  691. <el-select v-model.trim="searchParm.paramsType" placeholder="请选择">
  692. <el-option
  693. v-for="item in searchParamsTypeList"
  694. :key="item.name"
  695. :label="item.name"
  696. :value="item.id">
  697. </el-option>
  698. </el-select>
  699. </el-form-item>
  700. <el-form-item label="国家">
  701. <el-input v-model.trim="searchParm.country" clearable></el-input>
  702. </el-form-item>
  703. <el-form-item label="账号">
  704. <el-input v-model.trim="searchParm.account" clearable></el-input>
  705. </el-form-item>
  706. <el-form-item label="状态">
  707. <el-select v-model.trim="searchParm.status" placeholder="请选择">
  708. <el-option
  709. v-for="item in statusDhList"
  710. :key="item.name"
  711. :label="item.name"
  712. :value="item.id">
  713. </el-option>
  714. </el-select>
  715. </el-form-item>
  716. <el-form-item>
  717. <el-button type="primary" @click="goSearch">搜索</el-button>
  718. <el-button type="warning" @click="resetForm">重置</el-button>
  719. </el-form-item>
  720. </el-form>
  721. <!--表格渲染-->
  722. <el-table ref="table" border size="small" :data="dhAddCarList" :header-cell-style="{textAlign:'center'}">
  723. <el-table-column label="商品属性" prop="paramsType" align="center">
  724. <template slot-scope="scope">
  725. {{ scope.row.paramsType | getparamsType}}
  726. </template>
  727. </el-table-column>
  728. <el-table-column label="国家" prop="country" align="center"/>
  729. <el-table-column label="账号" prop="account" align="center"/>
  730. <el-table-column label="公司名称" prop="companyName" align="center"/>
  731. <el-table-column label="加购商品" prop="carGoodIds" align="center"/>
  732. <el-table-column label="状态" prop="status" align="center">
  733. <template slot-scope="scope">
  734. {{ scope.row.status | getDhStatus}}
  735. </template>
  736. </el-table-column>
  737. <el-table-column label="创建时间" prop="createdAt" align="center"/>
  738. <el-table-column label="修改时间" prop="updatedAt" align="center"/>
  739. <el-table-column label="操作" width="220">
  740. <template slot-scope="scope">
  741. <el-button
  742. type="success"
  743. @click="dhAddCarParam(scope.row)"
  744. v-if="item !== scope.row.item"
  745. >选中</el-button>
  746. <div v-if="item === scope.row.item">已选中</div>
  747. </template>
  748. </el-table-column>
  749. </el-table>
  750. <!--分页-->
  751. <div class="mt_15">
  752. <el-pagination
  753. @size-change="handleSizeChange"
  754. @current-change="handleCurrentChange"
  755. :current-page="searchParm.page"
  756. :page-sizes="[10, 20, 30, 40, 50]"
  757. :page-size="searchParm.pageSize"
  758. layout="total, sizes, prev, pager, next, jumper"
  759. :total="dhAddCarTotal">
  760. </el-pagination>
  761. </div>
  762. </el-dialog>
  763. <!--敦煌加购-好评信息弹窗-->
  764. <el-dialog
  765. width="75%"
  766. :visible.sync="dialogParamDhWellReceivedVisible"
  767. :title="dialogParamDhWellReceivedTitle"
  768. center
  769. append-to-body
  770. >
  771. <el-form class="mt_15" ref="form" inline size="small">
  772. <el-form-item label="订单id">
  773. <el-input v-model.trim="searchParm.orderId" clearable></el-input>
  774. </el-form-item>
  775. <el-form-item>
  776. <el-button type="primary" @click="dhGoSearchWellReceived">搜索</el-button>
  777. <el-button type="warning" @click="resetDhWellReceivedForm">重置</el-button>
  778. </el-form-item>
  779. </el-form>
  780. <!--表格渲染-->
  781. <el-table ref="table" border size="small" :data="dhAddCarList" :header-cell-style="{textAlign:'center'}">
  782. <el-table-column label="类型" prop="type" align="center">
  783. <template slot-scope="scope">
  784. {{ scope.row.type | getparamsOrderType}}
  785. </template>
  786. </el-table-column>
  787. <el-table-column label="总金额" prop="amount" align="center"/>
  788. <el-table-column label="店铺名称" prop="shop" align="center"/>
  789. <el-table-column label="订单id" prop="orderId" align="center"/>
  790. <el-table-column label="订单时间" prop="orderDate" align="center"/>
  791. <el-table-column label="状态" prop="status" align="center">
  792. <template slot-scope="scope">
  793. {{ scope.row.status | getOrderStatus}}
  794. </template>
  795. </el-table-column>
  796. <el-table-column label="创建时间" prop="createdAt" align="center"/>
  797. <el-table-column label="修改时间" prop="updatedAt" align="center"/>
  798. <el-table-column label="操作" width="220">
  799. <template slot-scope="scope">
  800. <el-button
  801. type="success"
  802. @click="dhAddCarOrderParam(scope.row)"
  803. v-if="item !== scope.row.item"
  804. >选中</el-button>
  805. <div v-if="item === scope.row.item">已选中</div>
  806. </template>
  807. </el-table-column>
  808. </el-table>
  809. <!--分页-->
  810. <div class="mt_15">
  811. <el-pagination
  812. @size-change="handleSizeChange"
  813. @current-change="handleCurrentChange"
  814. :current-page="searchParm.page"
  815. :page-sizes="[10, 20, 30, 40, 50]"
  816. :page-size="searchParm.pageSize"
  817. layout="total, sizes, prev, pager, next, jumper"
  818. :total="dhAddCarTotal">
  819. </el-pagination>
  820. </div>
  821. </el-dialog>
  822. <!--订单信息弹窗-->
  823. <el-dialog width="75%" :visible.sync="dialogWellReceivedVisible" :title="dialogWellReceivedTitle" center append-to-body>
  824. <el-form class="mt_15" ref="form" inline size="small">
  825. <el-form-item label="账号">
  826. <el-input v-model.trim="searchParm.account" clearable placeholder='账号'></el-input>
  827. </el-form-item>
  828. <el-form-item label="订单ID">
  829. <el-input v-model.trim="searchParm.orderId" clearable placeholder='orderId'></el-input>
  830. </el-form-item>
  831. <el-form-item>
  832. <el-button type="primary" @click="goSearch">搜索</el-button>
  833. <el-button type="warning" @click="resetForm">重置</el-button>
  834. </el-form-item>
  835. </el-form>
  836. <!--表格渲染-->
  837. <el-table ref="table" border size="small" :data="wellReceivedList" :header-cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}">
  838. <el-table-column label="序号" type="index" width="50" />
  839. <el-table-column label="平台名称" prop="platformName" />
  840. <el-table-column label="公司名称" prop="companyName" />
  841. <el-table-column label="总金额" prop="amount" />
  842. <el-table-column label="店铺名称" prop="shop" />
  843. <el-table-column label="店铺名称" prop="orderId" />
  844. <el-table-column label="评论" prop="comment"/>
  845. <el-table-column label="状态" prop="status" align="center">
  846. <template slot-scope="scope">
  847. {{ scope.row.status | getOrderStatus}}
  848. </template>
  849. </el-table-column>
  850. <el-table-column label="创建时间" prop="createdAt" />
  851. <el-table-column label="修改时间" prop="updatedAt" />
  852. <el-table-column label="操作" width="220">
  853. <template slot-scope="scope">
  854. <el-button
  855. type="success"
  856. @click="wallReceived(scope.row)"
  857. v-if="item !== scope.row.id"
  858. >选中</el-button>
  859. <div v-if="item === scope.row.id">已选中</div>
  860. </template>
  861. </el-table-column>
  862. </el-table>
  863. <!--分页-->
  864. <div class="mt_15">
  865. <el-pagination
  866. @size-change="clickHandleSizeChange"
  867. @current-change="clickHandleCurrentChange"
  868. :current-page="searchParamParm.page"
  869. :page-sizes="[10, 20, 30, 40, 50]"
  870. :page-size="searchParamParm.pageSize"
  871. layout="total, sizes, prev, pager, next, jumper"
  872. :total="paramTotal"
  873. ></el-pagination>
  874. </div>
  875. </el-dialog>
  876. <!--浏览收藏信息弹窗-->
  877. <el-dialog width="75%" :visible.sync="dialogBrowseVisible" :title="dialogBrowseTitle" center append-to-body>
  878. <!--搜索-->
  879. <el-form class="mt_15" ref="form" inline size="small">
  880. <el-form-item label="账号">
  881. <el-input v-model.trim="searchParm.account" clearable placeholder='关键词'></el-input>
  882. </el-form-item>
  883. <el-form-item label="收藏链接">
  884. <el-input v-model.trim="searchParm.linkUrl" clearable></el-input>
  885. </el-form-item>
  886. <el-form-item label="状态">
  887. <el-select v-model.trim="searchParm.status" placeholder="请选择">
  888. <el-option
  889. v-for="item in statusBrowseList"
  890. :key="item.name"
  891. :label="item.name"
  892. :value="item.id">
  893. </el-option>
  894. </el-select>
  895. </el-form-item>
  896. <el-form-item>
  897. <el-button type="primary" @click="goSearch">搜索</el-button>
  898. <el-button type="warning" @click="resetForm">重置</el-button>
  899. </el-form-item>
  900. </el-form>
  901. <!--表格渲染-->
  902. <el-table ref="table" border size="small" :data="broseList" :header-cell-style="{textAlign:'center'}">
  903. <el-table-column label="序号" type="index" width="50" />
  904. <el-table-column label="买家ID" prop="buyerId" align="center"/>
  905. <el-table-column label="账号" prop="account" align="center"/>
  906. <el-table-column label="国家" prop="country" align="center"/>
  907. <el-table-column label="收藏链接" prop="linkUrl" align="center"/>
  908. <el-table-column label="状态描述" prop="paymentResults" align="center"/>
  909. <el-table-column label="状态" prop="status" align="center">
  910. <template slot-scope="scope">
  911. {{ scope.row.status | getStatus}}
  912. </template>
  913. </el-table-column>
  914. <el-table-column label="创建时间" prop="createdAt" align="center"/>
  915. <el-table-column label="修改时间" prop="updatedAt" align="center"/>
  916. <el-table-column label="操作" width="220">
  917. <template slot-scope="scope">
  918. <el-button
  919. type="success"
  920. @click="brose(scope.row)"
  921. v-if="item !== scope.row.id"
  922. >选中</el-button>
  923. <div v-if="item === scope.row.id">已选中</div>
  924. </template>
  925. </el-table-column>
  926. </el-table>
  927. <!--分页-->
  928. <div class="mt_15">
  929. <el-pagination
  930. @size-change="handleSizeChange"
  931. @current-change="handleCurrentChange"
  932. :current-page="searchParm.page"
  933. :page-sizes="[10, 20, 30, 40, 50]"
  934. :page-size="searchParm.pageSize"
  935. layout="total, sizes, prev, pager, next, jumper"
  936. :total="total">
  937. </el-pagination>
  938. </div>
  939. </el-dialog>
  940. <!--参数详情-->
  941. <el-dialog
  942. :title="dialogParamTitle"
  943. :visible.sync="dialogParamVisible"
  944. width="30%"
  945. center
  946. style="overflow: hidden"
  947. >
  948. <div style="overflow-y: auto; height: 310px">
  949. <json-viewer :value="paramJsonData" :expand-depth="5" copyable boxed sort></json-viewer>
  950. </div>
  951. <span slot="footer" class="dialog-footer">
  952. <el-button type="primary" @click="dialogParamVisible = false">确定</el-button>
  953. </span>
  954. </el-dialog>
  955. <!--异常详情-->
  956. <el-dialog :title="dialogExceTitle" :visible.sync="dialogExceVisible" center width="30%">
  957. <div v-text="this.exceptionDetail" />
  958. </el-dialog>
  959. </div>
  960. </template>
  961. <script>
  962. import {
  963. getList,
  964. add,
  965. editById,
  966. delById,
  967. getById,
  968. modifyStatus,
  969. executionById,
  970. getLogsList,
  971. getWellReceivedList,
  972. getBrowseDataList,
  973. getDhCarList
  974. } from "@/api/group/quartzJob";
  975. import { getAll } from "@/api/group/apply";
  976. import { getFreeList } from "@/api/group/rebot";
  977. import { getClickFarmList } from "@/api/group/clickfarming";
  978. import { getCarOrderlist } from "@/api/group/dhAddCarOrder";
  979. import Vue from "vue";
  980. import JsonViewer from "vue-json-viewer";
  981. Vue.use(JsonViewer);
  982. export default {
  983. filters: {
  984. getStatus: function(value) {
  985. if (value == 1) {
  986. return "已暂停";
  987. } else if (value == 0) {
  988. return "运行中";
  989. }
  990. },
  991. getLogIsSuccess: function(value) {
  992. if (value == 1) {
  993. return "成功";
  994. } else if (value == 0) {
  995. return "失败";
  996. }
  997. },
  998. getRebotStatus: function(value) {
  999. if (value == 0) {
  1000. return "未占用";
  1001. } else if (value == 1) {
  1002. return "已占用";
  1003. }
  1004. },
  1005. getFarmingStatus: function(value) {
  1006. if (value == 1) {
  1007. return "待执行";
  1008. } else if (value == 2) {
  1009. return "执行中";
  1010. } else if (value == 3) {
  1011. return "执行成功";
  1012. } else if (value == 4) {
  1013. return "执行失败异常";
  1014. } else if (value == 5) {
  1015. return "待支付异常";
  1016. } else if (value == 6) {
  1017. return "支付成功异常";
  1018. } else {
  1019. return "执行失败";
  1020. }
  1021. },
  1022. getparamsType: function (value) {
  1023. if(value == 1) {
  1024. return '关键词';
  1025. } else if (value == 2) {
  1026. return '链接';
  1027. }
  1028. },
  1029. getparamsOrderType: function (value) {
  1030. if(value == 1) {
  1031. return '导入';
  1032. } else if (value == 2) {
  1033. return '刷单';
  1034. }
  1035. },
  1036. getOrderStatus: function (value) {
  1037. // 状态 1.待执行 2.执行中 3.执行成功 4.执行失败
  1038. if(value == 1) {
  1039. return '待执行';
  1040. } else if (value == 2) {
  1041. return '执行中';
  1042. } else if (value == 3) {
  1043. return '执行成功';
  1044. } else if(value == 4) {
  1045. return '执行失败';
  1046. } else {
  1047. return '执行失败';
  1048. }
  1049. },
  1050. getDhStatus: function (value) {
  1051. // 状态 1.待执行 2.执行中 3.加购成功 4.加购失败 5.下单成功 6.支付成功 7.抓单成功 8.抓单失败
  1052. if(value == 1) {
  1053. return '待执行';
  1054. } else if (value == 2) {
  1055. return '执行中';
  1056. } else if (value == 3) {
  1057. return '加购成功';
  1058. } else if(value == 4) {
  1059. return '加购失败';
  1060. } else if(value == 5) {
  1061. return '下单成功';
  1062. } else if(value == 6) {
  1063. return '待抓单';
  1064. } else if(value == 7) {
  1065. return '抓单中';
  1066. } else if(value == 8) {
  1067. return '抓单成功';
  1068. } else if(value == 9) {
  1069. return '抓单失败';
  1070. } else {
  1071. return '执行失败';
  1072. }
  1073. }
  1074. },
  1075. // 数据
  1076. data() {
  1077. return {
  1078. searchParm: {
  1079. page: 1,
  1080. pageSize: 10,
  1081. sort: "job_id",
  1082. order: "desc",
  1083. jobName: null,
  1084. isPause: null,
  1085. sTime: null,
  1086. eTime: null,
  1087. commentBoolean: false,
  1088. inCatchorder:null
  1089. },
  1090. searchLogsParm: {
  1091. page: 1,
  1092. pageSize: 10,
  1093. sort: "log_id",
  1094. order: "desc",
  1095. jobName: null,
  1096. isSuccess: null,
  1097. sTime: null,
  1098. eTime: null
  1099. },
  1100. searchRebotParm: {
  1101. page: 1,
  1102. pageSize: 10,
  1103. sort: "id",
  1104. order: "desc",
  1105. accountName: null,
  1106. robotClientUuid: null
  1107. },
  1108. searchParamParm: {
  1109. page: 1,
  1110. pageSize: 10,
  1111. sort: "created_at",
  1112. order: "desc",
  1113. keyWord: null,
  1114. type: null,
  1115. status: null,
  1116. item: null,
  1117. shopName: null,
  1118. payOrderId: null,
  1119. inStatusList:1,
  1120. account:null,
  1121. status:null,
  1122. linkUrl:null,
  1123. type:1,
  1124. platformId:null,
  1125. orderId:null
  1126. },
  1127. rebotName: "",
  1128. logsTotal: 0,
  1129. rebotTotal: 0,
  1130. paramTotal: 0,
  1131. total: 0,
  1132. logsList: [],
  1133. list: [],
  1134. labelVal: "0",
  1135. baseForm: {
  1136. demoList: [
  1137. {
  1138. name: null,
  1139. value: null,
  1140. type: null
  1141. }
  1142. ]
  1143. },
  1144. newParams: {
  1145. name: "",
  1146. value: "",
  1147. type: ""
  1148. },
  1149. item: "",
  1150. index: 0,
  1151. //新增、修改弹窗判断:1新增、2修改
  1152. isEdit: 0,
  1153. rebotList: [],
  1154. paramList: [],
  1155. dhAddCarList: [],
  1156. dhAddCarTotal:0,
  1157. wellReceivedList:[],
  1158. broseList:[],
  1159. applys: [],
  1160. searchTime: "",
  1161. searchLogsTime: "",
  1162. paramJsonData: "",
  1163. params: [],
  1164. taskParam: {
  1165. name: null,
  1166. value: null,
  1167. type: null
  1168. },
  1169. requestParams: {
  1170. accountName: null,
  1171. applyId: null,
  1172. params: null
  1173. },
  1174. exceptionDetail: "",
  1175. dialogAddVisible: false,
  1176. dialogAddTitle: "新增窗口",
  1177. dialogEditVisible: false,
  1178. dialogEditTitle: "修改窗口",
  1179. dialogImportVisible: false,
  1180. dialogLogsListTitle: "操作日志",
  1181. dialogLogsListVisible: false,
  1182. dialogRebotListTitle: "设备列表",
  1183. dialogRebotListVisible: false,
  1184. dialogParamListTitle: "刷单信息列表",
  1185. dialogParamListVisible: false,
  1186. dialogParamDhListTitle: "敦煌加购列表",
  1187. dialogParamDhListVisible: false,
  1188. dialogParamDhWellReceivedTitle: "敦煌好评列表",
  1189. dialogParamDhWellReceivedVisible: false,
  1190. dialogWellReceivedTitle: "订单信息列表",
  1191. dialogWellReceivedVisible: false,
  1192. dialogBrowseTitle: "浏览收藏列表",
  1193. dialogBrowseVisible: false,
  1194. dialogParamVisible: false,
  1195. dialogParamTitle: "参数详情",
  1196. dialogExceVisible: false,
  1197. dialogExceTitle: "异常详情",
  1198. dialogParamInputVisible: false,
  1199. dialogParamInputTitle: "参数输入窗口",
  1200. pauseAfterFailureList: [
  1201. {
  1202. value: 1,
  1203. label: "是"
  1204. },
  1205. {
  1206. value: 0,
  1207. label: "否"
  1208. }
  1209. ],
  1210. isPauseList: [
  1211. {
  1212. value: 1,
  1213. label: "已暂停"
  1214. },
  1215. {
  1216. value: 0,
  1217. label: "运行中"
  1218. }
  1219. ],
  1220. logIsSuccess: [
  1221. {
  1222. value: 0,
  1223. label: "失败"
  1224. },
  1225. {
  1226. value: 1,
  1227. label: "成功"
  1228. }
  1229. ],
  1230. statusBrowseList: [
  1231. {
  1232. value: 1,
  1233. label: "待执行"
  1234. },
  1235. {
  1236. value: 2,
  1237. label: "执行中"
  1238. },
  1239. {
  1240. value: 3,
  1241. label: "执行成功"
  1242. },
  1243. {
  1244. value: 4,
  1245. label: "执行失败"
  1246. }
  1247. ],
  1248. statusDhList:[
  1249. {
  1250. id: null,
  1251. name: '全部'
  1252. },
  1253. {
  1254. id: 1,
  1255. name: '待执行'
  1256. },
  1257. {
  1258. id: 2,
  1259. name: '执行中',
  1260. },
  1261. {
  1262. id: 3,
  1263. name: '加购成功'
  1264. },
  1265. {
  1266. id: 4,
  1267. name: '加购失败'
  1268. },{
  1269. id:5,
  1270. name:"下单成功"
  1271. },{
  1272. id:6,
  1273. name:"支付成功"
  1274. },{
  1275. id:7,
  1276. name:"抓单成功"
  1277. },{
  1278. id:8,
  1279. name:"支付抓单失败成功"
  1280. }],
  1281. searchParamsTypeList:[
  1282. {
  1283. id: null,
  1284. name: '全部'
  1285. },
  1286. {
  1287. id: 1,
  1288. name: '关键词'
  1289. },
  1290. {
  1291. id: 2,
  1292. name: '链接',
  1293. },
  1294. ],
  1295. addListDemo: [],
  1296. addParm: {
  1297. jobId: null,
  1298. jobName: null,
  1299. description: null,
  1300. beanName: null,
  1301. methodName: null,
  1302. cronExpression: null,
  1303. subTask: null,
  1304. personInCharge: null,
  1305. email: null,
  1306. pauseAfterFailure: null,
  1307. isPause: null,
  1308. rebotName: null,
  1309. applyId: null,
  1310. params: null,
  1311. paramsType: null,
  1312. paramId: null,
  1313. item: null
  1314. },
  1315. editParm: {
  1316. jobId: null,
  1317. jobName: null,
  1318. description: null,
  1319. beanName: null,
  1320. methodName: null,
  1321. cronExpression: null,
  1322. subTask: null,
  1323. personInCharge: null,
  1324. email: null,
  1325. pauseAfterFailure: null,
  1326. isPause: null,
  1327. params: null,
  1328. paramsType: null,
  1329. item: null,
  1330. applyId: null,
  1331. rebotName: null
  1332. },
  1333. testTest: null,
  1334. testTestStr: "",
  1335. rules: {
  1336. jobName: [
  1337. { required: true, message: "请输入任务名称", trigger: "blur" }
  1338. ],
  1339. description: [
  1340. { required: true, message: "请输入任务描述", trigger: "blur" }
  1341. ],
  1342. // beanName: [
  1343. // { required: true, message: '请输入SpringBean名称', trigger: 'blur' }
  1344. // ],
  1345. // methodName: [
  1346. // { required: true, message: '请输入方法名称', trigger: 'blur' }
  1347. // ],
  1348. cronExpression: [
  1349. { required: true, message: "请输入cron表达式", trigger: "blur" }
  1350. ],
  1351. personInCharge: [
  1352. { required: true, message: "请输入负责人", trigger: "blur" }
  1353. ],
  1354. pauseAfterFailure: [
  1355. { required: true, message: "请选择失败后是否暂停", trigger: "blur" }
  1356. ],
  1357. isPause: [
  1358. { required: true, message: "请选择运行状态", trigger: "blur" }
  1359. ],
  1360. rebotName: [{ required: true, message: "请选择设备", trigger: "blur" }],
  1361. applyId: [{ required: true, message: "请选择应用", trigger: "blur" }],
  1362. params: [{ required: true, message: "请输入脚本参数", trigger: "blur" }]
  1363. },
  1364. paramsRules: {
  1365. name: [
  1366. {
  1367. required: true,
  1368. message: "请输入参数名称",
  1369. trigger: "blur"
  1370. }
  1371. ],
  1372. value: [
  1373. {
  1374. required: true,
  1375. message: "请输入参数值",
  1376. trigger: "blur"
  1377. }
  1378. ],
  1379. type: [
  1380. {
  1381. required: true,
  1382. message: "请输入参数类型",
  1383. trigger: "blur"
  1384. }
  1385. ]
  1386. }
  1387. };
  1388. },
  1389. // 调用
  1390. created() {
  1391. this.goSearch();
  1392. },
  1393. //方法
  1394. methods: {
  1395. changeCheckRange(val) {
  1396. this.labelVal = val;
  1397. this.editParm.paramsType = val;
  1398. },
  1399. goInputParam() {
  1400. if (
  1401. this.baseForm.demoList[0].name == "" ||
  1402. this.baseForm.demoList[0].type == "" ||
  1403. this.baseForm.demoList[0].value == ""
  1404. ) {
  1405. console.log(this.baseForm.demoList);
  1406. this.$message.error("参数不能为空");
  1407. } else {
  1408. console.log(this.baseForm.demoList);
  1409. this.requestParams.params = this.baseForm.demoList;
  1410. this.dialogParamInputVisible = false;
  1411. this.$message.success("参数输入成功");
  1412. }
  1413. },
  1414. showDetail(data) {
  1415. if (data.exceptionDetail == null || data.exceptionDetail == "") {
  1416. this.$alert("无异常", "异常详情", {
  1417. confirmButtonText: "确定",
  1418. closeOnClickModal: true,
  1419. closeOnPressEscape: true
  1420. });
  1421. } else {
  1422. this.dialogExceVisible = true;
  1423. this.exceptionDetail = data.exceptionDetail;
  1424. }
  1425. },
  1426. showParams(data) {
  1427. console.log(data);
  1428. if (data.params == null || data.params == "") {
  1429. this.$alert("无参数", "参数详情", {
  1430. confirmButtonText: "确定",
  1431. closeOnClickModal: true,
  1432. closeOnPressEscape: true
  1433. });
  1434. } else {
  1435. this.paramJsonData = JSON.parse(data.params);
  1436. this.dialogParamVisible = true;
  1437. }
  1438. },
  1439. applyClick(value) {
  1440. this.requestParams.applyId = value;
  1441. console.log(this.requestParams);
  1442. },
  1443. //重置
  1444. resetForm() {
  1445. this.searchParm.jobName = null;
  1446. this.searchParm.isPause = null;
  1447. this.searchParm.sTime = null;
  1448. this.searchParm.eTime = null;
  1449. this.searchTime = null;
  1450. this.goSearch();
  1451. },
  1452. resetLogsForm() {
  1453. this.searchLogsParm.jobName = null;
  1454. this.searchLogsParm.isSuccess = null;
  1455. this.searchLogsParm.sTime = null;
  1456. this.searchLogsParm.eTime = null;
  1457. this.searchLogsTime = null;
  1458. this.goSearchLogs();
  1459. },
  1460. resetRebotForm() {
  1461. this.searchRebotParm.accountName = null;
  1462. this.searchRebotParm.robotClientUuid = null;
  1463. this.goSearchRebot();
  1464. },
  1465. resetParams() {
  1466. this.requestParams.params = null;
  1467. this.baseForm.demoList = [
  1468. {
  1469. name: "",
  1470. value: "",
  1471. type: ""
  1472. }
  1473. ];
  1474. this.$message.warning("重置成功");
  1475. },
  1476. // 查询
  1477. goSearchByCondition() {
  1478. this.searchParm.sTime = this.searchTime[0];
  1479. this.searchParm.eTime = this.searchTime[1];
  1480. console.log(this.searchParm);
  1481. this.goSearch();
  1482. },
  1483. goSearch() {
  1484. this.searchParm.page = 1;
  1485. this.getAllApply();
  1486. this.getDataList();
  1487. },
  1488. goClickFarmSearch() {
  1489. this.searchParamParm.page = 1;
  1490. this.getClickFarmDataList();
  1491. },
  1492. //重置
  1493. goClickFarmResetForm() {
  1494. this.searchParamParm.keyWord = null;
  1495. this.searchParamParm.item = null;
  1496. this.searchParamParm.shopName = null;
  1497. this.searchParamParm.payOrderId = null;
  1498. this.searchParamParm.status = null;
  1499. this.goClickFarmSearch();
  1500. },
  1501. // 分页获取表格数据-刷单信息
  1502. getClickFarmDataList(){
  1503. getClickFarmList(this.searchParamParm).then(res => {
  1504. if(res.code==200) {
  1505. this.paramList = res.data.list;
  1506. this.paramTotal = res.data.total;
  1507. console.log("paramTotal:" + paramTotal);
  1508. }
  1509. }).catch(err => {
  1510. console.log(err)
  1511. })
  1512. },
  1513. // 分页敦煌加购
  1514. getDhAddCarDataList() {
  1515. getDhCarList(this.searchParamParm).then(res => {
  1516. if(res.code==200) {
  1517. this.dhAddCarList = res.data.list;
  1518. this.dhAddCarTotal = res.data.total;
  1519. console.log("paramTotal:" + paramTotal);
  1520. }
  1521. }).catch(err => {
  1522. console.log(err)
  1523. })
  1524. },
  1525. // 分页敦煌好评
  1526. carOrderlist(){
  1527. getCarOrderlist(this.searchParamParm).then(res => {
  1528. if(res.code==200) {
  1529. this.dhAddCarList = res.data.list;
  1530. this.dhAddCarTotal = res.data.total;
  1531. console.log("paramTotal:" + paramTotal);
  1532. }
  1533. }).catch(err => {
  1534. console.log(err)
  1535. })
  1536. },
  1537. // 分页获取表格数据-订单信息
  1538. getWellReceivedDataList(){
  1539. getWellReceivedList(this.searchParamParm).then(res => {
  1540. if(res.code==200) {
  1541. this.wellReceivedList = res.data.list;
  1542. this.paramTotal = res.data.total;
  1543. console.log("paramTotal:" + paramTotal);
  1544. }
  1545. }).catch(err => {
  1546. console.log(err)
  1547. })
  1548. },
  1549. // 分页获取收藏-列表信息
  1550. getBrowseDataSearchList() {
  1551. getBrowseDataList(this.searchParamParm).then(res => {
  1552. if(res.code==200) {
  1553. this.broseList = res.data.list;
  1554. this.paramTotal = res.data.total;
  1555. console.log("paramTotal:" + paramTotal);
  1556. }
  1557. }).catch(err => {
  1558. console.log(err)
  1559. })
  1560. },
  1561. goSearchLogsByCondition() {
  1562. this.searchLogsParm.sTime = this.searchLogsTime[0];
  1563. this.searchLogsParm.eTime = this.searchLogsTime[1];
  1564. this.goSearchLogs();
  1565. },
  1566. goSearchLogs() {
  1567. this.dialogLogsListVisible = true;
  1568. this.searchLogsParm.page = 1;
  1569. this.getLogsDataList();
  1570. },
  1571. goSearchRebot() {
  1572. this.dialogRebotListVisible = true;
  1573. this.searchRebotParm.page = 1;
  1574. this.getRebotDataList();
  1575. },
  1576. // 速卖通-刷单
  1577. goSearchClickFarm() {
  1578. this.dialogParamListVisible = true;
  1579. this.searchParamParm.page = 1;
  1580. this.searchParamParm.inStatusList=1;
  1581. this.searchParamParm.status = null;
  1582. this.searchParamParm.type = 1;
  1583. this.searchParamParm.platformId = 2;
  1584. this.getClickFarmDataList();
  1585. },
  1586. // 速卖通-刷单补录
  1587. goSearchClickFarmSupplyMent() {
  1588. this.dialogParamListVisible = true;
  1589. this.searchParamParm.page = 1;
  1590. this.searchParamParm.inStatusList=null;
  1591. this.searchParamParm.status = 5;
  1592. this.searchParamParm.type = 1;
  1593. this.searchParamParm.platformId = 2;
  1594. this.getClickFarmDataList();
  1595. },
  1596. // 速卖通-好评
  1597. goSearchWellReceived() {
  1598. this.dialogWellReceivedVisible = true;
  1599. this.searchParamParm.page = 1;
  1600. this.searchParamParm.status = 1;
  1601. this.searchParamParm.type = 1;
  1602. this.searchParamParm.commentBoolean = true;
  1603. this.searchParamParm.platformId = 2;
  1604. this.getWellReceivedDataList();
  1605. },
  1606. // 速卖通-浏览收藏
  1607. goSearchBrowse(){
  1608. this.dialogBrowseVisible = true;
  1609. this.searchParamParm.page = 1;
  1610. this.searchParamParm.inStatusList = 1;
  1611. this.searchParamParm.platformId = 2;
  1612. this.getBrowseDataSearchList();
  1613. },
  1614. // 敦煌-加购
  1615. dhGoSearchCarFarm() {
  1616. this.dialogParamDhListVisible = true;
  1617. this.dialogParamDhListTitle = "敦煌加购";
  1618. this.searchParamParm.page = 1;
  1619. this.searchParamParm.inStatusList=1;
  1620. this.getDhAddCarDataList();
  1621. },
  1622. // 敦煌-好评
  1623. dhGoSearchWellReceived() {
  1624. this.dialogParamDhWellReceivedVisible = true;
  1625. this.searchParamParm.page = 1;
  1626. this.searchParamParm.type = 2;
  1627. this.searchParamParm.inStatusList=1;
  1628. this.searchParamParm.orderId = this.searchParm.orderId;
  1629. this.carOrderlist();
  1630. },
  1631. // 敦煌-抓单
  1632. dhGoSearchClickFarmOrder() {
  1633. this.dialogParamDhListVisible = true;
  1634. this.dialogParamDhListTitle = "敦煌抓单";
  1635. this.searchParamParm.page = 1;
  1636. this.searchParamParm.inStatusList=2;
  1637. this.getDhAddCarDataList();
  1638. },
  1639. // 分页获取表格数据
  1640. getDataList() {
  1641. getList(this.searchParm)
  1642. .then(res => {
  1643. if (res.code == 200) {
  1644. this.list = res.data.list;
  1645. this.total = res.data.total;
  1646. }
  1647. })
  1648. .catch(err => {
  1649. console.log(err);
  1650. });
  1651. },
  1652. getLogsDataList() {
  1653. getLogsList(this.searchLogsParm)
  1654. .then(res => {
  1655. console.log(res);
  1656. if (res.code == 200) {
  1657. this.logsList = res.data.list;
  1658. this.logsTotal = res.data.total;
  1659. }
  1660. })
  1661. .catch(err => {
  1662. console.log(err);
  1663. });
  1664. },
  1665. getRebotDataList() {
  1666. getFreeList(this.searchRebotParm)
  1667. .then(res => {
  1668. console.log(res);
  1669. if (res.code == 200) {
  1670. this.rebotList = res.data.list;
  1671. this.rebotTotal = res.data.total;
  1672. }
  1673. })
  1674. .catch(err => {
  1675. console.log(err);
  1676. });
  1677. },
  1678. getAllApply() {
  1679. getAll().then(res => {
  1680. if (res.code == 200) {
  1681. this.applys = res.data;
  1682. }
  1683. });
  1684. },
  1685. // 新增
  1686. addBtn() {
  1687. this.buyerId = null;
  1688. this.addParm = {
  1689. id: null,
  1690. jobId: null,
  1691. jobName: null,
  1692. description: null,
  1693. beanName: null,
  1694. methodName: null,
  1695. cronExpression: null,
  1696. subTask: null,
  1697. personInCharge: null,
  1698. email: null,
  1699. pauseAfterFailure: null,
  1700. isPause: null,
  1701. params: null,
  1702. paramsType: null,
  1703. applyId: null,
  1704. rebotName: null
  1705. };
  1706. this.baseForm.demoList = [
  1707. {
  1708. name: "id",
  1709. value: "",
  1710. type: "str"
  1711. },
  1712. {
  1713. name: "country",
  1714. value: "",
  1715. type: "str"
  1716. },
  1717. {
  1718. name: "account",
  1719. value: "",
  1720. type: "str"
  1721. },
  1722. {
  1723. name: "pwd",
  1724. value: "",
  1725. type: "str"
  1726. },
  1727. {
  1728. name: "keyWord",
  1729. value: "",
  1730. type: "str"
  1731. },
  1732. {
  1733. name: "number",
  1734. value: "",
  1735. type: "str"
  1736. },
  1737. {
  1738. name: "specification",
  1739. value: "",
  1740. type: "str"
  1741. },
  1742. {
  1743. name: "color",
  1744. value: "",
  1745. type: "str"
  1746. },
  1747. {
  1748. name: "item",
  1749. value: "",
  1750. type: "str"
  1751. },
  1752. {
  1753. name: "vpnShare",
  1754. value: "",
  1755. type: "str"
  1756. }
  1757. ];
  1758. this.item = "";
  1759. this.rebotName = "";
  1760. this.labelVal = "0";
  1761. this.requestParams.applyId = "";
  1762. this.requestParams.accountName = "";
  1763. this.requestParams.params = "";
  1764. this.addParm.params = JSON.stringify(this.requestParams);
  1765. this.isEdit = 1;
  1766. this.dialogAddVisible = true;
  1767. this.$refs.addParm.clearValidate();
  1768. },
  1769. sureAdd(addParm) {
  1770. this.$refs[addParm].validate((valid) => {
  1771. if (valid) {
  1772. this.$refs.addParm.clearValidate();
  1773. if (this.requestParams.accountName == "undefined" || this.requestParams.accountName == null || this.requestParams.accountName == "" || this.requestParams.accountName == "null" ){
  1774. this.requestParams.accountName = this.rebotName;
  1775. }
  1776. this.requestParams.applyId = this.addParm.applyId;
  1777. if (this.labelVal == 1) {
  1778. this.requestParams.params = this.baseForm.demoList;
  1779. }
  1780. this.addParm.params = JSON.stringify(this.requestParams);
  1781. console.log(this.addParm);
  1782. add(this.addParm)
  1783. .then(res => {
  1784. if (res.code == 200) {
  1785. this.dialogAddVisible = false;
  1786. this.$message.success("新增成功!");
  1787. this.getDataList();
  1788. } else if (res.code == -1) {
  1789. this.$message.warning(res.message);
  1790. }
  1791. })
  1792. .catch(err => {
  1793. console.log(err);
  1794. });
  1795. } else {
  1796. console.log('error submit!!');
  1797. return false;
  1798. }
  1799. });
  1800. },
  1801. sureAddCancle(addParm) {
  1802. this.dialogAddVisible=flase;
  1803. this.$refs.addParm.clearValidate();
  1804. },
  1805. // 根据id删除
  1806. delById(id) {
  1807. this.$confirm("确认删除?", "提示", {
  1808. confirmButtonText: "确定",
  1809. cancelButtonText: "取消",
  1810. type: "warning"
  1811. })
  1812. .then(() => {
  1813. delById({ id })
  1814. .then(res => {
  1815. if (res.code == 200) {
  1816. this.$message.success("删除成功!");
  1817. this.getDataList();
  1818. }
  1819. })
  1820. .catch(err => {
  1821. console.log(err);
  1822. });
  1823. })
  1824. .catch(() => {
  1825. this.$message.info("取消删除");
  1826. });
  1827. },
  1828. executionById(id) {
  1829. executionById({ id })
  1830. .then(res => {
  1831. if (res.code == 200) {
  1832. this.$message.success("执行成功");
  1833. this.getDataList;
  1834. } else {
  1835. this.$message.error("执行失败");
  1836. }
  1837. })
  1838. .catch(err => {
  1839. console.log(err);
  1840. });
  1841. },
  1842. // 修改
  1843. editById(data) {
  1844. getById({ id: data.jobId })
  1845. .then(res => {
  1846. if (res.code == 200) {
  1847. this.editParm.jobId = res.data.jobId;
  1848. this.editParm.jobName = res.data.jobName;
  1849. this.editParm.description = res.data.description;
  1850. this.editParm.beanName = res.data.beanName;
  1851. this.editParm.methodName = res.data.methodName;
  1852. this.editParm.cronExpression = res.data.cronExpression;
  1853. this.editParm.subTask = res.data.subTask;
  1854. this.editParm.personInCharge = res.data.personInCharge;
  1855. this.editParm.email = res.data.email;
  1856. this.editParm.pauseAfterFailure = res.data.pauseAfterFailure;
  1857. this.editParm.isPause = res.data.isPause;
  1858. this.editParm.params = res.data.params;
  1859. this.labelVal = res.data.paramsType;
  1860. this.editParm.paramsType = res.data.paramsType;
  1861. this.requestParams = JSON.parse(this.editParm.params);
  1862. this.editParm.rebotName = this.requestParams.accountName;
  1863. this.editParm.applyId = this.requestParams.applyId;
  1864. if (res.data.paramsType == 1) {
  1865. this.item = null;
  1866. this.baseForm.demoList = this.requestParams.params;
  1867. } else if (res.data.paramsType == 2) {
  1868. if (this.requestParams.params[8].value != null) {
  1869. this.item = this.requestParams.params[8].value;
  1870. }
  1871. this.baseForm.demoList = [
  1872. {
  1873. name: "id",
  1874. value: "",
  1875. type: "str"
  1876. },
  1877. {
  1878. name: "country",
  1879. value: "",
  1880. type: "str"
  1881. },
  1882. {
  1883. name: "account",
  1884. value: "",
  1885. type: "str"
  1886. },
  1887. {
  1888. name: "pwd",
  1889. value: "",
  1890. type: "str"
  1891. },
  1892. {
  1893. name: "keyWord",
  1894. value: "",
  1895. type: "str"
  1896. },
  1897. {
  1898. name: "number",
  1899. value: "",
  1900. type: "str"
  1901. },
  1902. {
  1903. name: "specification",
  1904. value: "",
  1905. type: "str"
  1906. },
  1907. {
  1908. name: "color",
  1909. value: "",
  1910. type: "str"
  1911. },
  1912. {
  1913. name: "item",
  1914. value: "",
  1915. type: "str"
  1916. },
  1917. {
  1918. name: "vpnShare",
  1919. value: "",
  1920. type: "str"
  1921. }
  1922. ];
  1923. }
  1924. this.isEdit = 2;
  1925. this.dialogEditVisible = true;
  1926. // this.$refs.editParm.clearValidate();
  1927. }
  1928. })
  1929. .catch(err => {
  1930. console.log(err);
  1931. });
  1932. },
  1933. // 确认修改
  1934. sureEdit(editParm) {
  1935. this.$refs[editParm].validate((valid) => {
  1936. if (valid) {
  1937. this.$refs.editParm.clearValidate();
  1938. this.requestParams.accountName = this.editParm.rebotName;
  1939. this.requestParams.applyId = this.editParm.applyId;
  1940. if (this.labelVal == 1) {
  1941. this.requestParams.params = this.baseForm.demoList;
  1942. }
  1943. this.editParm.params = JSON.stringify(this.requestParams);
  1944. editById(this.editParm)
  1945. .then(res => {
  1946. if (res.code == 200) {
  1947. this.dialogEditVisible = false;
  1948. this.$message.success("修改成功!");
  1949. this.getDataList();
  1950. } else if (res.code == -1) {
  1951. this.$message.warning(res.message);
  1952. }
  1953. })
  1954. .catch(err => {
  1955. console.log(err);
  1956. });
  1957. } else {
  1958. console.log('error submit!!');
  1959. return false;
  1960. }
  1961. });
  1962. },
  1963. sureEditCancle(editParm) {
  1964. this.dialogEditVisible=flase;
  1965. this.$refs.editParm.clearValidate();
  1966. },
  1967. modifyStatus(id) {
  1968. modifyStatus({ id })
  1969. .then(res => {
  1970. if (res.code == 200) {
  1971. this.$message.success("更改成功!");
  1972. this.getDataList();
  1973. }
  1974. })
  1975. .catch(err => {
  1976. console.log(err);
  1977. });
  1978. },
  1979. pickRebot(data) {
  1980. if(this.dialogAddVisible == true) {
  1981. this.addParm.rebotName = data.accountName;
  1982. }
  1983. if (this.dialogEditVisible == true) {
  1984. this.editParm.rebotName = data.accountName;
  1985. }
  1986. this.requestParams.accountName = data.accountName;
  1987. this.dialogRebotListVisible = false;
  1988. this.$message.success("选择成功");
  1989. },
  1990. pickParam(data) {
  1991. this.requestParams.params = data.id;
  1992. this.item = data.id;
  1993. this.dialogParamListVisible = false;
  1994. this.$message.success("选择成功");
  1995. },
  1996. dhAddCarParam(data) {
  1997. this.requestParams.params = data.id;
  1998. this.item = data.id;
  1999. this.dialogParamDhListVisible = false;
  2000. this.$message.success("选择成功");
  2001. },
  2002. // 敦煌好评
  2003. dhAddCarOrderParam(data) {
  2004. this.requestParams.params = data.id;
  2005. this.item = data.id;
  2006. this.dialogParamDhWellReceivedVisible = false;
  2007. this.$message.success("选择成功");
  2008. },
  2009. wallReceived(data) {
  2010. console.log(this.requestParams);
  2011. this.requestParams.params = data.id;
  2012. this.item = data.id;
  2013. this.dialogWellReceivedVisible = false;
  2014. this.$message.success("选择成功");
  2015. },
  2016. brose(data) {
  2017. console.log(this.requestParams);
  2018. this.requestParams.params = data.id;
  2019. this.item = data.id;
  2020. this.dialogBrowseVisible = false;
  2021. this.$message.success("选择成功");
  2022. },
  2023. // 分页
  2024. handleSizeChange(val) {
  2025. console.log(`每页 ${val} 条`);
  2026. this.searchParm.pageSize = val;
  2027. this.getDataList();
  2028. },
  2029. handleCurrentChange(val) {
  2030. console.log(`当前页: ${val}`);
  2031. this.searchParm.page = val;
  2032. this.getDataList();
  2033. },
  2034. clickHandleSizeChange(val) {
  2035. console.log(`每页 ${val} 条`);
  2036. this.searchParamParm.pageSize = val;
  2037. this.getDataList();
  2038. },
  2039. clickHandleCurrentChange(val) {
  2040. console.log(`当前页: ${val}`);
  2041. this.searchParamParm.page = val;
  2042. this.getDataList();
  2043. },
  2044. // 选中某一行修改或移除
  2045. selectItem(row, column, event) {
  2046. this.selectedFundRow = row;
  2047. if (event.target.innerText == "删除") {
  2048. this.removeFundBtn(this.selectedFundRow);
  2049. }
  2050. },
  2051. // 删除指定行
  2052. removeFundBtn(params) {
  2053. this.baseForm.demoList = this.baseForm.demoList.filter(ele => {
  2054. var flag = false;
  2055. // 如果不一致,则保留该行
  2056. for (const key in params) {
  2057. if (ele[key] != params[key]) {
  2058. flag = true;
  2059. break;
  2060. }
  2061. }
  2062. return flag;
  2063. });
  2064. // 如果全部删除后没有可以点击的一行了,需要加一行空行
  2065. if (!this.baseForm.demoList.length) {
  2066. this.addLine();
  2067. }
  2068. },
  2069. // 增加一个空行, 用于录入或显示第一行
  2070. addLine() {
  2071. const newParams = {
  2072. name: "",
  2073. value: "",
  2074. type: ""
  2075. };
  2076. this.index++;
  2077. this.baseForm.demoList.push(newParams);
  2078. }
  2079. }
  2080. };
  2081. </script>
  2082. <style rel="stylesheet/scss" lang="scss" scoped>
  2083. </style>