index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <div class="app-container">
  3. <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
  4. <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
  5. <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
  6. </div>
  7. <div class="filter-container">
  8. <el-select v-model="getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
  9. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  10. </el-select>
  11. <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
  12. <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
  13. </el-select>
  14. <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="monthrange" style="width: 250px;top:-3px;" format="yyyy-MM" value-format="yyyy-MM" range-separator="至" start-placeholder="盘点日期" end-placeholder="盘点日期" />
  15. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  16. <el-button class="filter-item" type="info" icon="el-icon-tickets" style="" @click="handleDownloadTemp">模板</el-button>
  17. <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
  18. <el-button class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
  19. </el-upload>
  20. <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
  21. <el-button class="filter-item" type="primary" icon="el-icon-edit" @click="handleDelete">批量删除</el-button>
  22. </div>
  23. <el-table
  24. :key="tableKey"
  25. v-loading="listLoading"
  26. element-loading-text="给我一点时间"
  27. :data="list"
  28. border
  29. fit
  30. highlight-current-row
  31. style="width: 100%;"
  32. :row-style="rowStyle"
  33. :cell-style="cellStyle"
  34. class="elTable"
  35. @selection-change="handleSelectionChange"
  36. :max-height="myHeight"
  37. >
  38. <el-table-column type="selection" width="55" />
  39. <el-table-column label="序号" align="center" type="index" width="50px">
  40. <template slot-scope="scope">
  41. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="牧场" align="center" prop="pastureName" />
  45. <el-table-column label="部门" align="center" prop="departmentName" />
  46. <el-table-column label="资产编号" align="center" prop="assetCode" />
  47. <el-table-column label="资产名称" align="center" prop="eqName" />
  48. <el-table-column label="设备内部编号" align="center" prop="eqCode" />
  49. <el-table-column label="实物入账日期" align="center" prop="rzdate" />
  50. <el-table-column label="计量单位" align="center" prop="unit" />
  51. <el-table-column label="规格" align="center" prop="specification" />
  52. <el-table-column label="资产数量" align="center" prop="quantity" />
  53. <el-table-column label="资产原值" sortable align="center" prop="yuanzhi" />
  54. <el-table-column label="实际盘点数" sortable align="center" prop="count" />
  55. <el-table-column label="盈亏量" sortable align="center" prop="profit" />
  56. <el-table-column label="有无标签" sortable align="center" prop="tag" />
  57. <el-table-column label="导入日期" sortable align="center" prop="importdate" />
  58. <el-table-column label="盘点时间" sortable align="center" prop="inventorydate" />
  59. <el-table-column label="盘点人" sortable align="center" prop="checkTakerName" />
  60. <el-table-column label="备注" sortable align="center" prop="remark" />
  61. <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
  62. <template slot-scope="{row}">
  63. <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
  64. <el-button type="danger" size="mini" @click="form_delete(row)">删除</el-button>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
  69. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="80%">
  70. <div class="app-change">
  71. <el-form ref="seeTemp" :model="see.temp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px" @click.native.prevent @submit.native.prevent>
  72. <el-row>
  73. <el-col :span="6">
  74. <el-form-item label="牧场:" prop="pastureName">
  75. <el-input ref="pastureName" v-model="see.temp.pastureName" placeholder="牧场" disabled />
  76. </el-form-item>
  77. </el-col>
  78. <el-col :span="6">
  79. <el-form-item label="部门:" prop="departmentName">
  80. <el-input ref="departmentName" v-model="see.temp.departmentName" placeholder="部门" disabled />
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. <el-row>
  85. <el-col :span="6">
  86. <el-form-item label="资产编号:" prop="eqCode">
  87. <el-input ref="eqCode" v-model="see.temp.eqCode" placeholder="资产编号" disabled />
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="6">
  91. <el-form-item label="资产名称:" prop="eqName">
  92. <el-input ref="eqName" v-model="see.temp.eqName" placeholder="资产名称" disabled />
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="6">
  96. <el-form-item label="设备内部编号:" prop="assetCode">
  97. <el-input ref="assetCode" v-model="see.temp.assetCode" placeholder="设备内部编号" disabled />
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="6">
  101. <el-form-item label="实物入账日期:" prop="rzdate">
  102. <el-input ref="rzdate" v-model="see.temp.rzdate" placeholder="实物入账日期" disabled />
  103. </el-form-item>
  104. </el-col>
  105. </el-row>
  106. <el-row>
  107. <el-col :span="6">
  108. <el-form-item label="计量单位:" prop="unit">
  109. <el-input ref="unit" v-model="see.temp.unit" placeholder="计量单位" disabled />
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="6">
  113. <el-form-item label="规格:" prop="specification">
  114. <el-input ref="specification" v-model="see.temp.specification" placeholder="规格" disabled />
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="6">
  118. <el-form-item label="资产数量:" prop="quantity">
  119. <el-input ref="quantity" v-model="see.temp.quantity" placeholder="资产数量" disabled />
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="6">
  123. <el-form-item label="资产原值:" prop="yuanzhi">
  124. <el-input ref="yuanzhi" v-model="see.temp.yuanzhi" placeholder="资产原值" disabled />
  125. </el-form-item>
  126. </el-col>
  127. </el-row>
  128. <el-row>
  129. <el-col :span="6">
  130. <el-form-item label="实际盘点数:" prop="count">
  131. <el-input ref="count" v-model="see.temp.count" placeholder="实际盘点数" disabled />
  132. </el-form-item>
  133. </el-col>
  134. <el-col :span="6">
  135. <el-form-item label="盈亏量:" prop="profit">
  136. <el-input ref="profit" v-model="see.temp.profit" placeholder="盈亏量" disabled />
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="6">
  140. <el-form-item label="有无标签:" prop="tag">
  141. <el-input ref="tag" v-model="see.temp.tag" placeholder="有无标签" disabled />
  142. </el-form-item>
  143. </el-col>
  144. <el-col :span="6">
  145. <el-form-item label="导入日期:" prop="importdate">
  146. <el-input ref="importdate" v-model="see.temp.importdate" placeholder="导入日期" disabled />
  147. </el-form-item>
  148. </el-col>
  149. </el-row>
  150. <el-row>
  151. <el-col :span="6">
  152. <el-form-item label="盘点时间:" prop="inventorydate">
  153. <el-input ref="inventorydate" v-model="see.temp.inventorydate" placeholder="盘点时间" disabled />
  154. </el-form-item>
  155. </el-col>
  156. <el-col :span="6">
  157. <el-form-item label="盘点人:" prop="checkTakerName">
  158. <el-input ref="checkTakerName" v-model="see.temp.checkTakerName" placeholder="盘点人" disabled />
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="6">
  162. <el-form-item label="备注:" prop="remark">
  163. <el-input ref="remark" v-model="see.temp.remark" placeholder="备注" disabled />
  164. </el-form-item>
  165. </el-col>
  166. </el-row>
  167. </el-form>
  168. <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
  169. <el-button @click="dialogFormVisible = false;">关闭</el-button>
  170. </div>
  171. </div>
  172. </el-dialog>
  173. </div>
  174. </div>
  175. </template>
  176. <script>
  177. import { GetDataByName, GetDataByNames,checkButtons,postJson,getJson } from '@/api/common'
  178. import { parseTime, json2excel } from '@/utils/index.js'
  179. import Pagination from '@/components/Pagination'
  180. import { MessageBox } from 'element-ui'
  181. import Cookies from 'js-cookie'
  182. import { getToken } from '@/utils/auth'
  183. export default {
  184. inject: ['reload'],
  185. name: 'Assetinventory',
  186. components: { Pagination },
  187. data() {
  188. return {
  189. tableKey: 0,
  190. list: [],
  191. total: 0,
  192. listLoading: true,
  193. getdataListParm: {
  194. name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
  195. parammaps: { pastureId: parseInt(Cookies.get('pastureid')), inputDatetime: '', startTime: '', stopTime: '', departmentId: '' }
  196. },
  197. isAssetinventorySee: [], isBasicsCard: [], isBasicsUpdate: [], isBasicsDel: [], isBasicsDel2: [], isBasic: [], isBasicSH: [], isBasicExamine: [],
  198. requestParams: [
  199. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': "18" }}
  200. ],
  201. getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
  202. findAllPasture: [], findAllDepart: [],
  203. selectionList:[],
  204. textMap: { see: '查看设备信息' },
  205. dialogFormVisible: false,
  206. dialogStatus: '',
  207. see:{
  208. temp:{}
  209. },
  210. isPercentage:false,
  211. uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
  212. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  213. cellStyle: { padding: 0 + 'px' },
  214. myHeight:document.documentElement.clientHeight - 85- 150
  215. }
  216. },
  217. computed: {
  218. headers() {
  219. return {
  220. // 设置token
  221. token: getToken()
  222. }
  223. },
  224. uploadData() {
  225. return {
  226. // importParams: '牧场,部门, 资产编号, 资产名称, 设备内部编号, 实物入账日期, 计量单位, 规格, 资产数量, 资产原值, 实际盘点数, 盈亏量, 有无标签, 备注',
  227. // sheetname: 'SheetJS'
  228. }
  229. },
  230. // 设置上传地址
  231. uploadExcelUrl() {
  232. // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
  233. return process.env.VUE_APP_BASE_API + 'authdata/stock/import'
  234. }
  235. },
  236. created() {
  237. // this.get_buttons()
  238. this.get_table_data()
  239. },
  240. methods: {
  241. // get_buttons() {
  242. // // 新增
  243. // const AssetinventorySee = 'asset:assetinventory:see'
  244. // const isAssetinventorySee = checkButtons(this.$store.state.user.buttons, AssetinventorySee)
  245. // this.isAssetinventorySee = isAssetinventorySee
  246. // },
  247. get_select_list() {
  248. GetDataByNames(this.requestParams).then(response => {
  249. if (response.data.list !== null) {
  250. this.findAllPasture = response.data.findAllPasture.list
  251. this.getDepartDownList()
  252. }
  253. })
  254. },
  255. getDepartDownList() {
  256. GetDataByName(this.getDepartParam).then(response => {
  257. this.findAllDepart = response.data.list
  258. })
  259. },
  260. get_table_data() {
  261. this.listLoading = true
  262. if (this.getdataListParm.parammaps.inputDatetime == null || this.getdataListParm.parammaps.inputDatetime == []) {
  263. this.getdataListParm.parammaps.inputDatetime = ''
  264. this.getdataListParm.parammaps.startTime = ''
  265. this.getdataListParm.parammaps.stopTime = ''
  266. } else {
  267. this.getdataListParm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0],'{y}-{m}')+'-01'
  268. this.getdataListParm.parammaps.stopTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1],'{y}-{m}')+ '-31'
  269. }
  270. // if( this.getdataListParm.parammaps.startTime == undefined){ this.getdataListParm.parammaps.startTime = ''}
  271. // if( this.getdataListParm.parammaps.stopTime == undefined){ this.getdataListParm.parammaps.stopTime = ''}
  272. if( this.getdataListParm.parammaps.departmentId == undefined){ this.getdataListParm.parammaps.departmentId = ''}
  273. let url ='/authdata/stock/list?'
  274. let data = 'offset=' + this.getdataListParm.offset
  275. + '&pagecount=' + this.getdataListParm.pagecount
  276. + '&pastureId=' + this.getdataListParm.parammaps.pastureId
  277. + '&departmentId=' + this.getdataListParm.parammaps.departmentId
  278. + '&startdate=' + this.getdataListParm.parammaps.startTime
  279. + '&enddate=' + this.getdataListParm.parammaps.stopTime
  280. getJson(url,data).then(response => {
  281. console.log('table数据', response.data.list)
  282. if (response.data.list !== null) {
  283. this.list = response.data.list
  284. this.pageNum = 1
  285. this.pageSize = response.data.pagecount
  286. } else {
  287. this.list = []
  288. }
  289. this.total = response.data.count
  290. setTimeout(() => {
  291. this.listLoading = false
  292. }, 100)
  293. this.get_select_list()
  294. })
  295. },
  296. changePastureName(item) {
  297. this.getDepartParam.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
  298. this.getdataListParm.parammaps.departmentId = ''
  299. this.getDepartDownList()
  300. },
  301. handleSelectionChange(item) {
  302. this.selectionList = item
  303. },
  304. form_search() {
  305. if (this.getdataListParm.parammaps.inputDatetime == null) {
  306. this.getdataListParm.parammaps.inputDatetime = ''
  307. this.getdataListParm.parammaps.startTime = ''
  308. this.getdataListParm.parammaps.stopTime = ''
  309. } else {
  310. this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
  311. this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
  312. }
  313. this.getdataListParm.offset = 1
  314. this.get_table_data()
  315. },
  316. form_see(row){
  317. this.see.temp = Object.assign({}, row) // copy obj
  318. this.dialogStatus = 'see'
  319. this.dialogFormVisible = true
  320. },
  321. form_delete(row){
  322. MessageBox.confirm('确认删除此信息?', {
  323. confirmButtonText: '确认',
  324. cancelButtonText: '取消',
  325. type: 'warning'
  326. }).then(() => {
  327. let url = 'authdata/stock/del'
  328. let data = {
  329. id:[row.id]
  330. }
  331. postJson(url,data).then(response => {
  332. if (response.msg !== 'fail') {
  333. this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
  334. this.get_table_data()
  335. } else {
  336. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  337. }
  338. })
  339. })
  340. },
  341. handleDelete(){
  342. if(this.selectionList.length == 0){
  343. this.$message({ type: 'error', message: '请选择要删除的信息!', duration: 2000 })
  344. return false
  345. }
  346. let array = []
  347. this.selectionList.forEach((item)=>{
  348. array.push(item.id)
  349. })
  350. let str = '确认删除选择的'+ array.length+ '条信息?'
  351. MessageBox.confirm(str, {
  352. confirmButtonText: '确认',
  353. cancelButtonText: '取消',
  354. type: 'warning'
  355. }).then(() => {
  356. let url = 'authdata/stock/del'
  357. let data = {
  358. id:array
  359. }
  360. postJson(url,data).then(response => {
  361. if (response.msg !== 'fail') {
  362. this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
  363. this.get_table_data()
  364. } else {
  365. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  366. }
  367. })
  368. })
  369. },
  370. handleDownloadTemp(){
  371. const elecExcelDatas = [
  372. {
  373. tHeader: ['序号','牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注' ],
  374. filterVal: ['','','', '', '', '', '', '', '', '', '', '', '', '', ''],
  375. tableDatas: [],
  376. sheetName: '资产盘点模板'
  377. }
  378. ]
  379. json2excel(elecExcelDatas, '资产盘点模板', true, 'xlsx')
  380. },
  381. handleDownload() {
  382. this.$alert('设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  383. this.isPercentage = true
  384. this.percentage = 1
  385. var timer = setInterval(() => {
  386. this.percentage += 5
  387. if (this.percentage > 95) {
  388. this.percentage = 99
  389. clearInterval(timer)
  390. }
  391. this.percentage = this.percentage
  392. }, 1000)
  393. if (this.getdataListParm.parammaps.inputDatetime == null || this.getdataListParm.parammaps.inputDatetime == []) {
  394. this.getdataListParm.parammaps.inputDatetime = ''
  395. this.getdataListParm.parammaps.startTime = ''
  396. this.getdataListParm.parammaps.stopTime = ''
  397. } else {
  398. this.getdataListParm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0],'{y}-{m}')+'-01'
  399. this.getdataListParm.parammaps.stopTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1],'{y}-{m}')+ '-31'
  400. }
  401. if( this.getdataListParm.parammaps.departmentId == undefined){ this.getdataListParm.parammaps.departmentId = ''}
  402. let url ='/authdata/stock/list?'
  403. let data = 'offset=' + this.getdataListParm.offset
  404. + '&pagecount='+9999999
  405. + '&pastureId=' + this.getdataListParm.parammaps.pastureId
  406. + '&departmentId=' + this.getdataListParm.parammaps.departmentId
  407. + '&startdate=' + this.getdataListParm.parammaps.startTime
  408. + '&enddate=' + this.getdataListParm.parammaps.stopTime
  409. getJson(url,data).then(response => {
  410. var downLoadList = response.data.list
  411. if (response.data.list !== '') {
  412. this.percentage = 99
  413. setTimeout(() => {
  414. this.isPercentage = false
  415. }, 2000)
  416. }
  417. const elecExcelDatas = [
  418. {
  419. tHeader: ['牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签','导入日期','盘点日期','盘点人', '备注'],
  420. filterVal: ['pastureName','departmentName', 'eqCode', 'eqName', 'assetCode', 'rzdate', 'unit', 'specification', 'quantity', 'yuanzhi', 'count', 'profit', 'tag', 'importdate', 'inventorydate', 'checkTakerName', 'remark'],
  421. tableDatas: downLoadList,
  422. sheetName: '资产盘点'
  423. }
  424. ]
  425. json2excel(elecExcelDatas, '资产盘点', true, 'xlsx')
  426. })
  427. },
  428. // 导入
  429. beforeImportExcel(file) {
  430. const isLt2M = file.size / 1024 / 1024 < 10
  431. if (!isLt2M) {
  432. this.$message.error('上传文件大小不能超过 10MB!')
  433. }
  434. return isLt2M
  435. },
  436. handleImportExcelSuccess(res, file) {
  437. if (res.msg === 'ok') {
  438. this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
  439. if (res.data.err_count > 0) {
  440. this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
  441. import('@/vendor/Export2Excel').then(excel => {
  442. const list1 = res.data.result
  443. const tHeader = [
  444. '牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注','报错信息'
  445. ]
  446. const filterVal = [
  447. '牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注','error_msg'
  448. ]
  449. const data1 = this.formatJson(filterVal, list1)
  450. excel.export_json_to_excel({
  451. header: tHeader,
  452. data: data1,
  453. filename: '资产盘点模板报错信息',
  454. autoWidth: true,
  455. bookType: 'xlsx'
  456. })
  457. })
  458. }
  459. } else {
  460. this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
  461. }
  462. },
  463. formatJson(filterVal, jsonData) {
  464. return jsonData.map(v =>
  465. filterVal.map(j => {
  466. if (j === 'timestamp') {
  467. return parseTime(v[j])
  468. } else {
  469. return v[j]
  470. }
  471. })
  472. )
  473. },
  474. formatJsonTemp(filterVal, jsonData) {
  475. return jsonData.map(v =>
  476. filterVal.map(j => {
  477. if (j === 'timestamp') { return parseTime(v[j]) } else { return v[j] } })
  478. )
  479. },
  480. }
  481. }
  482. </script>
  483. <style lang="scss" scoped>
  484. .el-autocomplete-suggestion li{
  485. padding:0 3px!important;
  486. }
  487. .el-table .warning-row {
  488. background: oldlace;
  489. }
  490. .el-table .success-row {
  491. background: #f0f9eb;
  492. }
  493. </style>