f322caaf4e791aeef16ef99583c272e1d21885b0.svn-base 23 KB

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