fc5880da07980bb94395e9fa9a955d707e044d9c.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-button v-if="isRoleEdit" class="success" @click="handleCreate">新增</el-button>
  5. <el-button v-if="isRoleEdit" class="danger" @click="handleDelete">删除</el-button>
  6. </div>
  7. <div class="search">
  8. <el-input v-model="table.getdataListParm.parammaps.eqcode" placeholder="TMR设备编号" style="width: 180px;" class="filter-item" clearable />
  9. <el-select v-model="table.getdataListParm.parammaps.classname" filterable placeholder="TMR设备类型" class="filter-item" style="width: 140px;" clearable>
  10. <el-option v-for="item in typeList" :key="item.id" :label="item.label" :value="item.label" />
  11. </el-select>
  12. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
  13. <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
  14. </el-select>
  15. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  16. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  17. </div>
  18. <div class="table">
  19. <el-table
  20. :key="table.tableKey"
  21. v-loading="table.listLoading"
  22. element-loading-text="给我一点时间"
  23. :data="table.list"
  24. border
  25. fit
  26. highlight-current-row
  27. style="width: 100%;"
  28. :row-style="rowStyle"
  29. :cell-style="cellStyle"
  30. class="elTable table-fixed"
  31. @selection-change="handleSelectionChange"
  32. >
  33. <el-table-column type="selection" align="center" width="50" />
  34. <el-table-column label="序号" align="center" type="index" width="50px">
  35. <template slot-scope="scope">
  36. <span>{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="TMR设备编号" min-width="150px" align="center">
  40. <template slot-scope="scope">
  41. <span v-if="scope.row.NoEdit">{{ scope.row.eqcode }}</span>
  42. <el-input v-if="scope.row.Edit" v-model="scope.row.eqcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" maxlength="32" />
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="TMR设备名称" min-width="150px" align="center">
  46. <template slot-scope="scope">
  47. <span v-if="scope.row.NoEdit">{{ scope.row.tname }}</span>
  48. <el-input v-if="scope.row.Edit" v-model="scope.row.tname" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" maxlength="32" />
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="数据采集卡编号" min-width="150px" align="center">
  52. <template slot-scope="scope">
  53. <span v-if="scope.row.NoEdit">{{ scope.row.datacaptureno }}</span>
  54. <el-input v-if="scope.row.Edit" v-model="scope.row.datacaptureno" type="number" step="0.01" style="width:95%;padding:10px 0;" />
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="TMR设备类型" min-width="200px" align="center">
  58. <template slot-scope="scope">
  59. <span v-if="scope.row.NoEdit">{{ scope.row.tclassname }}</span>
  60. <el-select v-if="scope.row.Edit" v-model="scope.row.tclassid" filterable placeholder="TMR设备类型" class="filter-item" style="width:95%;padding:10px 0;" @change="changeType">
  61. <el-option v-for="item in typeList" :key="item.id" :label="item.label" :value="item.value" />
  62. </el-select>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="最大搅拌量(KG)" min-width="150px" align="center">
  66. <template slot-scope="scope">
  67. <span v-if="scope.row.NoEdit">{{ scope.row.maxstirfeed }}</span>
  68. <el-input v-if="scope.row.Edit" v-model="scope.row.maxstirfeed" style="width: 80%;" />
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="备注" min-width="110px" align="center">
  72. <template slot-scope="scope">
  73. <span v-if="scope.row.NoEdit">{{ scope.row.remark }}</span>
  74. <el-input v-if="scope.row.Edit" v-model="scope.row.remark" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:10px 0;" />
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="是否启用" min-width="110px" align="center">
  78. <template slot-scope="scope">
  79. <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
  83. <template slot-scope="{row}">
  84. <!-- 新增 -->
  85. <el-button v-if="row.isCreate && isRoleEdit" :disabled="isokDisable" class="miniSuccess" @click="createData(row)">保存</el-button>
  86. <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" @click="createCancel(row)">取消</el-button>
  87. <!-- 编辑 -->
  88. <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  89. <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" @click="handleRowDelete(row)">删除</el-button>
  90. <!-- 编辑保存 -->
  91. <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" class="miniSuccess" @click="updateData(row)">保存</el-button>
  92. <el-button v-if="row.isUpdateSave && isRoleEdit" class="minCancel" @click="updateCancel(row)">取消</el-button>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
  97. </div>
  98. </div>
  99. </template>
  100. <script>
  101. import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons } from '@/api/common'
  102. import Cookies from 'js-cookie'
  103. import Pagination from '@/components/Pagination'
  104. import { MessageBox } from 'element-ui'
  105. export default {
  106. name: 'EquipmentTMR',
  107. components: { Pagination },
  108. data() {
  109. return {
  110. isRoleEdit: [],
  111. requestParams: [
  112. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['TMR设备类型'] }
  113. ],
  114. typeList: [], // TMR设备类型
  115. enableList: [{ id: 1, name: '是' }, { id: 0, name: '否' }], // 是否启用
  116. table: {
  117. getdataListParm: {
  118. name: 'getTMRList',
  119. page: 1,
  120. offset: 1,
  121. pagecount: 10,
  122. returntype: 'Map',
  123. parammaps: {
  124. pastureid: Cookies.get('pastureid'),
  125. eqcode: '',
  126. classname: '',
  127. enable: '',
  128. eqtype: '1'
  129. }
  130. },
  131. tableKey: 0,
  132. list: [],
  133. total: 0,
  134. listLoading: true,
  135. temp: {}
  136. },
  137. requestParam: {},
  138. isokDisable: false,
  139. selectList: [],
  140. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  141. cellStyle: { padding: 0 + 'px' }
  142. }
  143. },
  144. created() {
  145. this.getList()
  146. this.getDownList()
  147. this.getButtons()
  148. },
  149. methods: {
  150. getButtons() {
  151. const Edit = 'EquipmentTMR'
  152. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  153. this.isRoleEdit = isRoleEdit
  154. console.log(this.isRoleEdit)
  155. },
  156. getDownList() {
  157. GetDataByNames(this.requestParams).then(response => {
  158. this.typeList = response.data.getDictByName.list
  159. })
  160. },
  161. getList() {
  162. this.table.listLoading = true
  163. GetDataByName(this.table.getdataListParm).then(response => {
  164. console.log('table数据', response.data.list)
  165. if (response.data.list !== null) {
  166. for (let i = 0; i < response.data.list.length; i++) {
  167. this.$set(response.data.list[i], 'Edit', false) // 编辑
  168. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  169. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  170. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  171. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  172. }
  173. this.table.list = response.data.list
  174. this.table.pageNum = response.data.pageNum
  175. this.table.pageSize = response.data.pageSize
  176. this.table.total = response.data.total
  177. } else {
  178. this.table.list = []
  179. }
  180. setTimeout(() => {
  181. this.table.listLoading = false
  182. }, 100)
  183. })
  184. },
  185. handleEnableChange() {
  186. console.log('点击了是否启用')
  187. },
  188. handleSearch() {
  189. console.log('点击了查询')
  190. this.table.getdataListParm.offset = 1
  191. this.getList()
  192. },
  193. handleRefresh() {
  194. console.log('点击了重置')
  195. this.table.getdataListParm.parammaps.eqcode = ''
  196. this.table.getdataListParm.parammaps.classname = ''
  197. this.table.getdataListParm.parammaps.enable = ''
  198. this.table.getdataListParm.parammaps.eqtype = '1'
  199. this.table.getdataListParm.offset = 1
  200. this.getList()
  201. },
  202. handleCreate() {
  203. console.log('点击了新增')
  204. // 编辑true/不可编辑false
  205. // 新增操true,编辑false,编辑保存false
  206. for (let i = 0; i < this.table.list.length; i++) {
  207. if (this.table.list[i].Edit == true) {
  208. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  209. return false
  210. }
  211. }
  212. this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'eqcode': '', 'tname': '', 'datacaptureno': '', 'tclassid': '', 'maxstirfeed': '' })
  213. },
  214. changeType(item) {
  215. this.table.temp.tclassname = this.typeList.find(obj => obj.value === item).label
  216. },
  217. createData(row) {
  218. console.log('点击了新增保存', row)
  219. this.table.temp.pastureid = Cookies.get('pastureid')
  220. this.table.temp.eqcode = row.eqcode
  221. this.table.temp.tname = row.tname
  222. this.table.temp.datacaptureno = row.datacaptureno
  223. this.table.temp.tclassid = row.tclassid
  224. this.table.temp.tclassname = this.table.temp.tclassname
  225. this.table.temp.maxstirfeed = row.maxstirfeed
  226. this.table.temp.enable = row.enable
  227. this.table.temp.remark = row.remark
  228. // 检验用户名称/角色是否为空
  229. if (this.table.temp.eqcode == '' && this.table.temp.tname == '' && this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  230. this.$message({ type: 'error', message: 'TMR设备编号/TMR设备名称/数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  231. return false
  232. } else if (this.table.temp.tname == '' && this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  233. this.$message({ type: 'error', message: 'TMR设备名称/数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  234. return false
  235. } else if (this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  236. this.$message({ type: 'error', message: '数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  237. return false
  238. } else if (this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  239. this.$message({ type: 'error', message: 'TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  240. return false
  241. } else if (this.table.temp.eqcode == '') {
  242. this.$message({ type: 'error', message: 'TMR设备编号不能为空', duration: 2000 })
  243. return false
  244. } else if (this.table.temp.tname == '') {
  245. this.$message({ type: 'error', message: 'TMR设备名称不能为空', duration: 2000 })
  246. return false
  247. } else if (this.table.temp.datacaptureno == '') {
  248. this.$message({ type: 'error', message: '数据采集卡编号不能为空', duration: 2000 })
  249. return false
  250. } else if (this.table.temp.tclassid == '') {
  251. this.$message({ type: 'error', message: '设备类型不能为空', duration: 2000 })
  252. return false
  253. } else if (this.table.temp.maxstirfeed == '') {
  254. this.$message({ type: 'error', message: '最大搅拌量不能为空', duration: 2000 })
  255. return false
  256. }
  257. const datacaptureno = /^([0-9]|(1[0-5]))$/
  258. if (!datacaptureno.test(parseFloat(this.table.temp.datacaptureno))) {
  259. this.$message({ type: 'error', message: '数据采集卡请输入0-15之间整数', duration: 2000 })
  260. return false
  261. }
  262. const maxstirfeed = /^[1-9]\d*$/
  263. if (!maxstirfeed.test(parseFloat(this.table.temp.maxstirfeed))) {
  264. this.$message({ type: 'error', message: '最大搅拌量请输入正整数', duration: 2000 })
  265. return false
  266. }
  267. const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
  268. if (pattern.test(this.table.temp.eqcode)) {
  269. this.$message({ type: 'error', message: 'TMR设备编号不可输入特殊字符', duration: 2000 })
  270. return false
  271. }
  272. if (pattern.test(this.table.temp.tname)) {
  273. this.$message({ type: 'error', message: 'TMR设备名称不可输入特殊字符', duration: 2000 })
  274. return false
  275. }
  276. this.isokDisable = true
  277. setTimeout(() => {
  278. this.isokDisable = false
  279. }, 1000)
  280. this.requestParam.name = 'insertTMR'
  281. this.requestParam.parammaps = this.table.temp
  282. PostDataByName(this.requestParam).then(response => {
  283. console.log('新增保存发送参数', this.requestParam)
  284. if (response.msg !== 'fail') {
  285. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  286. this.getList()
  287. } else {
  288. failproccess(response, this.$notify)
  289. }
  290. })
  291. },
  292. createCancel(row) {
  293. console.log('点击了新增取消')
  294. for (let i = 0; i < this.table.list.length; i++) {
  295. if (row.myId === this.table.list[i].myId) {
  296. var listIndex = this.table.list.indexOf(this.table.list[i])
  297. }
  298. if (listIndex > -1) {
  299. this.table.list.splice(listIndex, 1)
  300. return
  301. }
  302. }
  303. },
  304. handleUpdate(row) {
  305. for (let i = 0; i < this.table.list.length; i++) {
  306. if (this.table.list[i].Edit == true) {
  307. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  308. return false
  309. }
  310. }
  311. // 编辑true,不可编辑false
  312. row.Edit = true
  313. row.NoEdit = false
  314. // 新增false,编辑false,编辑保存true
  315. row.isCreate = false
  316. row.isUpdate = false
  317. row.isUpdateSave = true
  318. row.tclassid = String(row.tclassid)
  319. this.table.temp.tclassid = row.tclassid
  320. this.table.temp.tclassname = row.tclassname
  321. },
  322. updateData(row) {
  323. console.log('点击了编辑保存', row)
  324. this.table.temp.pastureid = Cookies.get('pastureid')
  325. this.table.temp.eqcode = row.eqcode
  326. this.table.temp.tname = row.tname
  327. this.table.temp.datacaptureno = row.datacaptureno
  328. this.table.temp.tclassid = row.tclassid
  329. this.table.temp.tclassname = this.table.temp.tclassname
  330. this.table.temp.maxstirfeed = row.maxstirfeed
  331. this.table.temp.enable = row.enable
  332. this.table.temp.remark = row.remark
  333. this.table.temp.id = row.id
  334. // 检验用户名称/角色是否为空
  335. if (this.table.temp.eqcode == '' && this.table.temp.tname == '' && this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  336. this.$message({ type: 'error', message: 'TMR设备编号/TMR设备名称/数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  337. return false
  338. } else if (this.table.temp.tname == '' && this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  339. this.$message({ type: 'error', message: 'TMR设备名称/数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  340. return false
  341. } else if (this.table.temp.datacaptureno == '' && this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  342. this.$message({ type: 'error', message: '数据采集卡编号/TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  343. return false
  344. } else if (this.table.temp.tclassid == '' && this.table.temp.maxstirfeed == '') {
  345. this.$message({ type: 'error', message: 'TMR设备类型/最大搅拌量不能为空', duration: 2000 })
  346. return false
  347. } else if (this.table.temp.eqcode == '') {
  348. this.$message({ type: 'error', message: 'TMR设备编号不能为空', duration: 2000 })
  349. return false
  350. } else if (this.table.temp.tname == '') {
  351. this.$message({ type: 'error', message: '设备名称不能为空', duration: 2000 })
  352. return false
  353. } else if (this.table.temp.datacaptureno == '') {
  354. this.$message({ type: 'error', message: '数据采集卡编号不能为空', duration: 2000 })
  355. return false
  356. } else if (this.table.temp.tclassid == '') {
  357. this.$message({ type: 'error', message: '设备类型不能为空', duration: 2000 })
  358. return false
  359. } else if (this.table.temp.maxstirfeed == '') {
  360. this.$message({ type: 'error', message: '最大搅拌量不能为空', duration: 2000 })
  361. return false
  362. }
  363. const datacaptureno = /^([0-9]|(1[0-5]))$/
  364. if (!datacaptureno.test(parseInt(this.table.temp.datacaptureno))) {
  365. this.$message({ type: 'error', message: '数据采集卡请输入0-15之间整数', duration: 2000 })
  366. return false
  367. }
  368. const maxstirfeed = /^[1-9]\d*$/
  369. if (!maxstirfeed.test(parseInt(this.table.temp.maxstirfeed))) {
  370. this.$message({ type: 'error', message: '最大搅拌量请输入正整数', duration: 2000 })
  371. return false
  372. }
  373. const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
  374. if (pattern.test(this.table.temp.eqcode)) {
  375. this.$message({ type: 'error', message: 'TMR设备编号不可输入特殊字符', duration: 2000 })
  376. return false
  377. }
  378. if (pattern.test(this.table.temp.tname)) {
  379. this.$message({ type: 'error', message: 'TMR设备名称不可输入特殊字符', duration: 2000 })
  380. return false
  381. }
  382. this.isokDisable = true
  383. setTimeout(() => {
  384. this.isokDisable = false
  385. }, 1000)
  386. this.requestParam.name = 'updateTMR'
  387. this.requestParam.parammaps = this.table.temp
  388. PostDataByName(this.requestParam).then(response => {
  389. console.log('新增保存发送参数', this.requestParam)
  390. if (response.msg !== 'fail') {
  391. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  392. this.getList()
  393. } else {
  394. failproccess(response, this.$notify)
  395. }
  396. })
  397. },
  398. updateCancel(row) {
  399. console.log('点击了编辑取消')
  400. // 编辑false,不可编辑true
  401. row.Edit = false
  402. row.NoEdit = true
  403. // 新增false,编辑true,编辑保存false
  404. row.isCreate = false
  405. row.isUpdate = true
  406. row.isUpdateSave = false
  407. this.getList()
  408. },
  409. // 删除
  410. handleRowDelete(row) {
  411. console.log('点击了行内删除')
  412. MessageBox.confirm('是否确认删除此信息?', {
  413. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  414. }).then(() => {
  415. this.selectList = []
  416. this.requestParam = {}
  417. this.requestParam.common = { 'returnmap': '0' }
  418. this.requestParam.data = []
  419. this.requestParam.data[0] = { 'name': 'checkDeleteTmr', 'type': 'v', 'parammaps': {
  420. 'pastureid': row.pastureid,
  421. 'id': row.id
  422. }}
  423. this.requestParam.data[1] = { 'name': 'deleteTMR', 'type': 'e', 'parammaps': {
  424. 'pastureid': row.pastureid,
  425. 'id': row.id
  426. }}
  427. ExecDataByConfig(this.requestParam).then(response => {
  428. console.log('删除保存发送参数', this.requestParam)
  429. if (response.msg === 'fail') {
  430. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  431. } else {
  432. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  433. this.getList()
  434. }
  435. })
  436. }).catch(() => {
  437. this.$message({ type: 'info', message: '已取消删除' })
  438. })
  439. },
  440. handleSelectionChange(val) {
  441. console.log('勾选数据', val)
  442. this.selectList = val
  443. },
  444. handleDelete() {
  445. console.log('点击了删除')
  446. if (this.selectList.length == 0) {
  447. this.$message({ type: 'error', message: '请选择TMR设备信息', duration: 2000 })
  448. } else {
  449. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
  450. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  451. }).then(() => {
  452. console.log(this.selectList)
  453. this.requestParam = {}
  454. this.requestParam.common = { 'returnmap': '0' }
  455. this.requestParam.data = []
  456. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  457. this.requestParam.data[0].children = []
  458. this.requestParam.data[0].children[0] = { 'name': 'checkDeleteTmr', 'type': 'v', 'parammaps': {
  459. id: '@insertSpotList.id',
  460. pastureid: '@insertSpotList.pastureid'
  461. }}
  462. this.requestParam.data[0].children[1] = { 'name': 'deleteTMR', 'type': 'e', 'parammaps': {
  463. id: '@insertSpotList.id',
  464. pastureid: '@insertSpotList.pastureid'
  465. }}
  466. ExecDataByConfig(this.requestParam).then(response => {
  467. console.log('删除保存发送参数', this.requestParam)
  468. if (response.msg === 'fail') {
  469. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  470. } else {
  471. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  472. this.getList()
  473. }
  474. })
  475. })
  476. }
  477. }
  478. }
  479. }
  480. </script>
  481. <style lang="scss" scoped>
  482. .search{margin-top:10px;}
  483. .table{margin-top:10px;}
  484. </style>