You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1318 lines
46 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 收藏 -->
  4. <div>
  5. <span @click="favoriteFunction()">
  6. <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
  7. </span>
  8. </div>
  9. <!-- 条件查询 -->
  10. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  11. <el-form-item :label="'BU'">
  12. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
  13. <el-option
  14. v-for = "i in userBuList"
  15. :key = "i.buNo"
  16. :label = "i.buDesc"
  17. :value = "i.buDesc">
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item :label="'项目编码:'">
  22. <el-input v-model="searchData.itemNo" clearable style="width: 120px"></el-input>
  23. </el-form-item>
  24. <el-form-item :label="'项目名称:'">
  25. <el-input v-model="searchData.itemDesc" clearable style="width: 120px"></el-input>
  26. </el-form-item>
  27. <el-form-item label="检验类型:">
  28. <el-select v-model="searchData.inspectionTypeNo" placeholder="请选择">
  29. <el-option label="全部" value=""></el-option>
  30. <el-option
  31. v-for = "i in options"
  32. :key = "i.inspectionTypeNo"
  33. :label = "i.inspectionTypeName"
  34. :value = "i.inspectionTypeNo">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item :label="' '">
  39. <el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
  40. <el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button>
  41. </el-form-item>
  42. <el-form-item :label="' '">
  43. <el-button type="primary" icon="el-icon-upload" @click="qcUpload()">导入</el-button>
  44. <download-excel
  45. :fields="fields()"
  46. :data="exportData"
  47. type="xls"
  48. :name="exportName"
  49. :header="exportHeader"
  50. :footer="exportFooter"
  51. :fetch="createExportData"
  52. :before-generate="startDownload"
  53. :before-finish="finishDownload"
  54. worksheet="导出信息"
  55. class="el-button el-button--primary el-button--medium">
  56. {{ "导出" }}
  57. </download-excel>
  58. </el-form-item>
  59. </el-form>
  60. <!-- 展示列表 -->
  61. <el-table
  62. :height="height"
  63. :data="dataList"
  64. border
  65. v-loading="dataListLoading"
  66. style="width: 100%;">
  67. <el-table-column
  68. v-for="(item,index) in columnList" :key="index"
  69. :sortable="item.columnSortable"
  70. :prop="item.columnProp"
  71. :header-align="item.headerAlign"
  72. :show-overflow-tooltip="item.showOverflowTooltip"
  73. :align="item.align"
  74. :fixed="item.fixed == '' ? false : item.fixed"
  75. :min-width="item.columnWidth"
  76. :label="item.columnLabel">
  77. <template slot-scope="scope">
  78. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  79. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column
  83. fixed="right"
  84. header-align="center"
  85. align="center"
  86. width="160"
  87. label="操作">
  88. <template slot-scope="scope">
  89. <a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a>
  90. <a v-if="!authDelete" type="text" size="small" @click="deleteModal(scope.row)">删除</a>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. <el-pagination
  95. @size-change="sizeChangeHandle"
  96. @current-change="currentChangeHandle"
  97. :current-page="pageIndex"
  98. :page-sizes="[20, 50, 100, 200, 500]"
  99. :page-size="pageSize"
  100. :total="totalPage"
  101. layout="total, sizes, prev, pager, next, jumper">
  102. </el-pagination>
  103. <!-- 新增和修改 -->
  104. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px">
  105. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  106. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  107. <el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" @change="getEquipmentNoList" style="width: 456px">
  108. <el-option
  109. v-for = "i in userBuList"
  110. :key = "i.buNo"
  111. :label = "i.buNo"
  112. :value = "i.buNo">
  113. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  114. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  115. {{ i.buDesc }}
  116. </span>
  117. </el-option>
  118. </el-select>
  119. </el-form-item>
  120. </el-form>
  121. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  122. <el-form-item label="项目名称" prop="itemDesc" :rules="rules.itemDescType">
  123. <el-input v-model="modalData.itemDesc" style="width: 143px"></el-input>
  124. </el-form-item>
  125. <el-form-item label="检验值类型" prop="valueTypeDb" :rules="rules.valueTypeDbType">
  126. <el-select filterable v-model="modalData.valueTypeDb" style="width: 143px">
  127. <el-option label="文本" value="T"></el-option>
  128. <el-option label="数字" value="N"></el-option>
  129. </el-select>
  130. </el-form-item>
  131. <el-form-item label="检验类型" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType">
  132. <el-select v-model="modalData.inspectionTypeNo" placeholder="请选择" style="width: 143px">
  133. <el-option
  134. v-for = "i in options"
  135. :key = "i.inspectionTypeNo"
  136. :label = "i.inspectionTypeName"
  137. :value = "i.inspectionTypeNo">
  138. </el-option>
  139. </el-select>
  140. </el-form-item>
  141. </el-form>
  142. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  143. <el-form-item prop="methodNo" :rules="rules.methodNoType">
  144. <span slot="label" @click="queryMethodList"><a>方法编码</a></span>
  145. <el-input v-model="modalData.methodNo" style="width: 143px"></el-input>
  146. </el-form-item>
  147. <el-form-item label="方法名称" prop="methodName" :rules="rules.methodNameType">
  148. <el-input v-model="modalData.methodName" disabled style="width: 300px"></el-input>
  149. </el-form-item>
  150. </el-form>
  151. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  152. <el-form-item>
  153. <span slot="label" @click="getBaseList(207)"><a herf="#">抽样方案编码</a></span>
  154. <el-input v-model="modalData.samplingProgrammeNo" style="width: 143px"></el-input>
  155. </el-form-item>
  156. <el-form-item label="抽样方案名称">
  157. <el-input v-model="modalData.samplingProgrammeDesc" disabled style="width: 300px"></el-input>
  158. </el-form-item>
  159. </el-form>
  160. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  161. <el-form-item>
  162. <span slot="label" @click="getBaseList(208)"><a herf="#">检验水平编码</a></span>
  163. <el-input v-model="modalData.samplingLevelNo" style="width: 143px"></el-input>
  164. </el-form-item>
  165. <el-form-item label="检验水平名称">
  166. <el-input v-model="modalData.samplingLevelDesc" disabled style="width: 300px"></el-input>
  167. </el-form-item>
  168. </el-form>
  169. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  170. <el-form-item label="参照值">
  171. <el-input v-model="modalData.defaultValue" style="width: 143px"></el-input>
  172. </el-form-item>
  173. <el-form-item label="最大值">
  174. <el-input v-if="modalData.valueTypeDb === 'T'" v-model="modalData.maxValue" type="number" disabled style="width: 143px"></el-input>
  175. <el-input v-if="modalData.valueTypeDb === 'N'" v-model="modalData.maxValue" type="number" style="width: 143px"></el-input>
  176. </el-form-item>
  177. <el-form-item label="最小值">
  178. <el-input v-if="modalData.valueTypeDb === 'T'" v-model="modalData.minValue" type="number" disabled style="width: 143px"></el-input>
  179. <el-input v-if="modalData.valueTypeDb === 'N'" v-model="modalData.minValue" type="number" style="width: 143px"></el-input>
  180. </el-form-item>
  181. </el-form>
  182. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  183. <el-form-item label="抽样数量">
  184. <el-input v-model="modalData.itemSamplingQuantity" type="number" style="width: 143px"></el-input>
  185. </el-form-item>
  186. <el-form-item label="抽样比例%">
  187. <el-input v-model="modalData.defaultSamplingProportion" type="number" style="width: 143px"></el-input>
  188. </el-form-item>
  189. <el-form-item label=" " style="margin-left: 30px">
  190. <el-checkbox v-model="modalData.collectionFlag" true-label="Y">采集标记</el-checkbox>
  191. </el-form-item>
  192. </el-form>
  193. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  194. <el-form-item label="采集数据来源">
  195. <el-select multiple v-model="modalData.collectionSourceList" style="width: 221px">
  196. <el-option label="采集数据01" value="value0"></el-option>
  197. <el-option label="采集数据02" value="value1"></el-option>
  198. <el-option label="采集数据03" value="value2"></el-option>
  199. <el-option label="采集数据04" value="value3"></el-option>
  200. <el-option label="采集数据05" value="value4"></el-option>
  201. <el-option label="采集数据06" value="value5"></el-option>
  202. <el-option label="采集数据07" value="value6"></el-option>
  203. <el-option label="采集数据08" value="value7"></el-option>
  204. <el-option label="采集数据09" value="value8"></el-option>
  205. <el-option label="采集数据10" value="value9"></el-option>
  206. <el-option label="图片采集" value="photo_value1"></el-option>
  207. </el-select>
  208. </el-form-item>
  209. <el-form-item label="采集数据方式">
  210. <el-select multiple v-model="modalData.collectionMethodList" style="width: 221px">
  211. <el-option label="PLC" value="plc"></el-option>
  212. <el-option label="文件" value="file"></el-option>
  213. <el-option label="图片" value="image"></el-option>
  214. </el-select>
  215. </el-form-item>
  216. </el-form>
  217. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  218. <el-form-item label="采集条件路径">
  219. <el-select multiple v-model="modalData.collectionConditionList" style="width: 456px">
  220. <el-option
  221. v-for = "i in equipmentNoList"
  222. :key = "i.equipmentNo"
  223. :label = "i.equipmentNo"
  224. :value = "i.equipmentNo">
  225. </el-option>
  226. </el-select>
  227. </el-form-item>
  228. </el-form>
  229. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  230. <el-button type="primary" @click="saveData()">保存</el-button>
  231. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  232. </el-footer>
  233. </el-dialog>
  234. <!-- 检验方法 -->
  235. <el-dialog title="检验方法清单" :close-on-click-modal="false" v-drag :visible.sync="methodModelFlag" width="520px">
  236. <div class="rq">
  237. <el-form :inline="true" label-position="top" :model="methodData">
  238. <el-form-item :label="'方法编码'">
  239. <el-input v-model="methodData.methodNo" clearable style="width: 120px"></el-input>
  240. </el-form-item>
  241. <el-form-item :label="'方法名称'">
  242. <el-input v-model="methodData.methodName" clearable style="width: 120px"></el-input>
  243. </el-form-item>
  244. <!-- <el-form-item :label="'检验类型'">-->
  245. <!-- <el-select v-model="methodData.inspectionTypeNo" style="width: 100px">-->
  246. <!-- <el-option-->
  247. <!-- v-for = "i in options"-->
  248. <!-- :key = "i.inspectionTypeNo"-->
  249. <!-- :label = "i.inspectionTypeName"-->
  250. <!-- :value = "i.inspectionTypeNo">-->
  251. <!-- </el-option>-->
  252. <!-- </el-select>-->
  253. <!-- </el-form-item>-->
  254. <el-form-item :label="' '">
  255. <el-button type="primary" @click="queryMethodList">查询</el-button>
  256. </el-form-item>
  257. </el-form>
  258. <el-table
  259. :height="300"
  260. :data="methodList"
  261. @row-dblclick="getRowData"
  262. border
  263. v-loading="dataListLoading"
  264. style="width: 100%;">
  265. <el-table-column
  266. v-for="(item,index) in methodDetailList" :key="index"
  267. :sortable="item.columnSortable"
  268. :prop="item.columnProp"
  269. :header-align="item.headerAlign"
  270. :show-overflow-tooltip="item.showOverflowTooltip"
  271. :align="item.align"
  272. :fixed="item.fixed==''?false:item.fixed"
  273. :min-width="item.columnWidth"
  274. :label="item.columnLabel">
  275. <template slot-scope="scope">
  276. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  277. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  278. </template>
  279. </el-table-column>
  280. </el-table>
  281. </div>
  282. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  283. <el-button type="primary" @click="methodModelFlag = false">关闭</el-button>
  284. </el-footer>
  285. </el-dialog>
  286. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  287. <!-- 导入 -->
  288. <qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload>
  289. </div>
  290. </template>
  291. <script>
  292. import {
  293. qcItemSearch, // 查询项目
  294. qcItemSave, // 新增项目
  295. qcItemUpdate, // 修改项目
  296. qcItemDelete, // 删除项目
  297. inspectionTypeSearch, // 查询检验类型
  298. queryMethodList, // 查询检验方法
  299. getSiteAndBuByUserName,
  300. getEquipmentNoList, // 获取采集条件路径
  301. } from "@/api/qc/qc.js"
  302. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  303. import Chooselist from '@/views/modules/common/Chooselist_eam'
  304. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  305. import qcUpload from "./qc_upload";
  306. export default {
  307. components: {
  308. Chooselist,
  309. qcUpload
  310. },
  311. watch: {
  312. searchData: {
  313. deep: true,
  314. handler: function (newV, oldV) {
  315. this.searchData.itemNo = this.searchData.itemNo.toUpperCase()
  316. }
  317. },
  318. modalData: {
  319. deep: true,
  320. handler: function (newV, oldV) {
  321. this.modalData.itemNo = this.modalData.itemNo.toUpperCase()
  322. }
  323. },
  324. },
  325. data () {
  326. return {
  327. // 是否收藏
  328. favorite: false,
  329. // 导出 start
  330. exportData: [],
  331. exportName: "检验项目" + this.dayjs().format('YYYYMMDDHHmmss'),
  332. exportHeader: ["检验项目"],
  333. exportFooter: [],
  334. exportList: [],
  335. // 导出 end
  336. searchData: {
  337. site: '',
  338. userName: this.$store.state.user.name,
  339. itemNo: '',
  340. itemDesc: '',
  341. itemType: 'D',
  342. inspectionTypeNo: '',
  343. buDesc: '',
  344. page: 1,
  345. limit: 10,
  346. },
  347. pageIndex: 1,
  348. pageSize: 20,
  349. totalPage: 0,
  350. height: 200,
  351. dataList: [],
  352. dataListLoading: false,
  353. modalFlag: false,
  354. modalDisableFlag: false,
  355. modalData: {
  356. site: '',
  357. bu: '',
  358. flag: '',
  359. itemNo: '',
  360. itemDesc: '',
  361. valueTypeDb: '',
  362. defaultValue: '',
  363. createdBy: this.$store.state.user.name,
  364. maxValue: '',
  365. minValue: '',
  366. itemRemark: '',
  367. itemType: 'D',
  368. methodNo: '',
  369. methodName: '',
  370. updateBy: '',
  371. inspectionTypeNo: '',
  372. itemSamplingQuantity: '',
  373. samplingProgrammeNo: '',
  374. samplingProgrammeDesc: '',
  375. samplingLevelNo: '',
  376. samplingLevelDesc: '',
  377. defaultSamplingProportion: '',
  378. collectionFlag: '',
  379. collectionSource: '',
  380. collectionSourceList: [],
  381. collectionMethod: '',
  382. collectionMethodList: [],
  383. collectionCondition: '',
  384. collectionConditionList: []
  385. },
  386. // 检验项目展示标头
  387. columnList: [
  388. {
  389. userId: this.$store.state.user.name,
  390. functionId: 301002,
  391. serialNumber: '301002TableBuDesc',
  392. tableId: "301002Table",
  393. tableName: "检验项目维护表",
  394. columnWidth: 100,
  395. columnProp: 'buDesc',
  396. headerAlign: 'center',
  397. align: "center",
  398. columnLabel: 'BU',
  399. columnHidden: false,
  400. columnImage: false,
  401. columnSortable: false,
  402. sortLv: 0,
  403. status: true,
  404. fixed: '',
  405. },
  406. {
  407. userId: this.$store.state.user.name,
  408. functionId: 301002,
  409. serialNumber: '301002TableItemNo',
  410. tableId: "301002Table",
  411. tableName: "检验项目维护表",
  412. columnWidth: 99,
  413. columnProp: 'itemNo',
  414. headerAlign: 'center',
  415. align: "center",
  416. columnLabel: '检验项目编码',
  417. columnHidden: false,
  418. columnImage: false,
  419. columnSortable: false,
  420. sortLv: 0,
  421. status: true,
  422. fixed: '',
  423. },
  424. {
  425. userId: this.$store.state.user.name,
  426. functionId: 301002,
  427. serialNumber: '301002TableItemDesc',
  428. tableId: "301002Table",
  429. tableName: "检验项目维护表",
  430. columnWidth: 85,
  431. columnProp: 'itemDesc',
  432. headerAlign: 'center',
  433. align: "center",
  434. columnLabel: '检验项目名称',
  435. columnHidden: false,
  436. columnImage: false,
  437. columnSortable: false,
  438. sortLv: 0,
  439. status: true,
  440. fixed: '',
  441. },
  442. {
  443. userId: this.$store.state.user.name,
  444. functionId: 301002,
  445. serialNumber: '301002TableMethodName',
  446. tableId: "301002Table",
  447. tableName: "检验项目维护表",
  448. columnWidth: 85,
  449. columnProp: 'methodName',
  450. headerAlign: 'center',
  451. align: "center",
  452. columnLabel: '检验方法',
  453. columnHidden: false,
  454. columnImage: false,
  455. columnSortable: false,
  456. sortLv: 0,
  457. status: true,
  458. fixed: '',
  459. },
  460. {
  461. userId: this.$store.state.user.name,
  462. functionId: 301002,
  463. serialNumber: '301002TableMethodRemark',
  464. tableId: "301002Table",
  465. tableName: "检验项目维护表",
  466. columnWidth: 85,
  467. columnProp: 'methodRemark',
  468. headerAlign: 'center',
  469. align: "center",
  470. columnLabel: '检验方法说明',
  471. columnHidden: false,
  472. columnImage: false,
  473. columnSortable: false,
  474. sortLv: 0,
  475. status: true,
  476. fixed: '',
  477. },
  478. {
  479. userId: this.$store.state.user.name,
  480. functionId: 301002,
  481. serialNumber: '301002TableValueType',
  482. tableId: "301002Table",
  483. tableName: "检验项目维护表",
  484. columnWidth: 85,
  485. columnProp: 'valueType',
  486. headerAlign: 'center',
  487. align: "center",
  488. columnLabel: '检验值类型',
  489. columnHidden: false,
  490. columnImage: false,
  491. columnSortable: false,
  492. sortLv: 0,
  493. status: true,
  494. fixed: '',
  495. },
  496. {
  497. userId: this.$store.state.user.name,
  498. functionId: 301002,
  499. serialNumber: '301002TableInspectionTypeName',
  500. tableId: "301002Table",
  501. tableName: "检验项目维护表",
  502. columnWidth: 85,
  503. columnProp: 'inspectionTypeName',
  504. headerAlign: 'center',
  505. align: "center",
  506. columnLabel: '检验类型',
  507. columnHidden: false,
  508. columnImage: false,
  509. columnSortable: false,
  510. sortLv: 0,
  511. status: true,
  512. fixed: '',
  513. },
  514. {
  515. userId: this.$store.state.user.name,
  516. functionId: 301002,
  517. serialNumber: '301002TableDefaultValue',
  518. tableId: "301002Table",
  519. tableName: "检验项目维护表",
  520. columnWidth: 85,
  521. columnProp: 'defaultValue',
  522. headerAlign: 'center',
  523. align: "right",
  524. columnLabel: '标准值',
  525. columnHidden: false,
  526. columnImage: false,
  527. columnSortable: false,
  528. sortLv: 0,
  529. status: true,
  530. fixed: '',
  531. },
  532. {
  533. userId: this.$store.state.user.name,
  534. functionId: 301002,
  535. serialNumber: '301002TableMaxValue',
  536. tableId: "301002Table",
  537. tableName: "检验项目维护表",
  538. columnWidth: 85,
  539. columnProp: 'maxValue',
  540. headerAlign: 'center',
  541. align: "right",
  542. columnLabel: '最大值',
  543. columnHidden: false,
  544. columnImage: false,
  545. columnSortable: false,
  546. sortLv: 0,
  547. status: true,
  548. fixed: '',
  549. },
  550. {
  551. userId: this.$store.state.user.name,
  552. functionId: 301002,
  553. serialNumber: '301002TableMinValue',
  554. tableId: "301002Table",
  555. tableName: "检验项目维护表",
  556. columnWidth: 85,
  557. columnProp: 'minValue',
  558. headerAlign: 'center',
  559. align: "right",
  560. columnLabel: '最小值',
  561. columnHidden: false,
  562. columnImage: false,
  563. columnSortable: false,
  564. sortLv: 0,
  565. status: true,
  566. fixed: '',
  567. },
  568. {
  569. userId: this.$store.state.user.name,
  570. functionId: 301002,
  571. serialNumber: '301002TableSamplingProgrammeDesc',
  572. tableId: "301002Table",
  573. tableName: "检验项目维护表",
  574. columnWidth: 85,
  575. columnProp: 'samplingProgrammeDesc',
  576. headerAlign: 'center',
  577. align: "center",
  578. columnLabel: '抽样方案',
  579. columnHidden: false,
  580. columnImage: false,
  581. columnSortable: false,
  582. sortLv: 0,
  583. status: true,
  584. fixed: '',
  585. },
  586. {
  587. userId: this.$store.state.user.name,
  588. functionId: 301002,
  589. serialNumber: '301002TableSamplingLevelDesco',
  590. tableId: "301002Table",
  591. tableName: "检验项目维护表",
  592. columnWidth: 85,
  593. columnProp: 'samplingLevelDesc',
  594. headerAlign: 'center',
  595. align: "center",
  596. columnLabel: '检验水平',
  597. columnHidden: false,
  598. columnImage: false,
  599. columnSortable: false,
  600. sortLv: 0,
  601. status: true,
  602. fixed: '',
  603. },
  604. {
  605. userId: this.$store.state.user.name,
  606. functionId: 301002,
  607. serialNumber: '301002TableItemSamplingQuantity',
  608. tableId: "301002Table",
  609. tableName: "检验项目维护表",
  610. columnWidth: 85,
  611. columnProp: 'itemSamplingQuantity',
  612. headerAlign: 'center',
  613. align: "right",
  614. columnLabel: '抽样数量',
  615. columnHidden: false,
  616. columnImage: false,
  617. columnSortable: false,
  618. sortLv: 0,
  619. status: true,
  620. fixed: '',
  621. },
  622. {
  623. userId: this.$store.state.user.name,
  624. functionId: 301002,
  625. serialNumber: '301002TableDefaultSamplingProportion',
  626. tableId: "301002Table",
  627. tableName: "检验项目维护表",
  628. columnWidth: 85,
  629. columnProp: 'defaultSamplingProportion',
  630. headerAlign: 'center',
  631. align: "right",
  632. columnLabel: '抽样比例',
  633. columnHidden: false,
  634. columnImage: false,
  635. columnSortable: false,
  636. sortLv: 0,
  637. status: true,
  638. fixed: '',
  639. },
  640. {
  641. userId: this.$store.state.user.name,
  642. functionId: 301002,
  643. serialNumber: '301002TableCreatedDate',
  644. tableId: "301002Table",
  645. tableName: "检验项目维护表",
  646. columnWidth: 85,
  647. columnProp: 'createdDate',
  648. headerAlign: 'center',
  649. align: "center",
  650. columnLabel: '创建时间',
  651. columnHidden: false,
  652. columnImage: false,
  653. columnSortable: false,
  654. sortLv: 0,
  655. status: true,
  656. fixed: '',
  657. },
  658. {
  659. userId: this.$store.state.user.name,
  660. functionId: 301002,
  661. serialNumber: '301002TableCreatedBy',
  662. tableId: "301002Table",
  663. tableName: "检验项目维护表",
  664. columnWidth: 85,
  665. columnProp: 'createdBy',
  666. headerAlign: 'center',
  667. align: "center",
  668. columnLabel: '创建人',
  669. columnHidden: false,
  670. columnImage: false,
  671. columnSortable: false,
  672. sortLv: 0,
  673. status: true,
  674. fixed: '',
  675. },
  676. {
  677. userId: this.$store.state.user.name,
  678. functionId: 301002,
  679. serialNumber: '301002TableUpdateDate',
  680. tableId: "301002Table",
  681. tableName: "检验项目维护表",
  682. columnWidth: 85,
  683. columnProp: 'updateDate',
  684. headerAlign: 'center',
  685. align: "center",
  686. columnLabel: '更新时间',
  687. columnHidden: false,
  688. columnImage: false,
  689. columnSortable: false,
  690. sortLv: 0,
  691. status: true,
  692. fixed: '',
  693. },
  694. {
  695. userId: this.$store.state.user.name,
  696. functionId: 301002,
  697. serialNumber: '301002TableUpdateBy',
  698. tableId: "301002Table",
  699. tableName: "检验项目维护表",
  700. columnWidth: 85,
  701. columnProp: 'updateBy',
  702. headerAlign: 'center',
  703. align: "center",
  704. columnLabel: '更新人',
  705. columnHidden: false,
  706. columnImage: false,
  707. columnSortable: false,
  708. sortLv: 0,
  709. status: true,
  710. fixed: '',
  711. },
  712. ],
  713. rules: {
  714. itemDescType:[
  715. {
  716. required: true,
  717. message: ' ',
  718. trigger: ['blur','change']
  719. }
  720. ],
  721. valueTypeDbType:[
  722. {
  723. required: true,
  724. message: ' ',
  725. trigger: ['blur','change']
  726. }
  727. ],
  728. methodNoType:[
  729. {
  730. required: true,
  731. message: ' ',
  732. trigger: ['blur','change']
  733. }
  734. ],
  735. methodNameType:[
  736. {
  737. required: true,
  738. message: ' ',
  739. trigger: ['blur','change']
  740. }
  741. ],
  742. inspectionTypeNoType:[
  743. {
  744. required: true,
  745. message: ' ',
  746. trigger: ['blur','change']
  747. }
  748. ],
  749. bu:[
  750. {
  751. required: true,
  752. message: ' ',
  753. trigger: ['blur','change']
  754. }
  755. ]
  756. },
  757. options: [],
  758. methodData: {
  759. site: '',
  760. bu: '',
  761. methodNo: '',
  762. methodName: '',
  763. inspectionTypeNo: '',
  764. inspectionTypeName: ''
  765. },
  766. methodList: [],
  767. methodModelFlag: false,
  768. methodDetailList: [
  769. {
  770. columnProp: 'methodNo',
  771. headerAlign: "center",
  772. align: "center",
  773. columnLabel: '方法编码',
  774. columnHidden: false,
  775. columnImage: false,
  776. columnSortable: false,
  777. sortLv: 0,
  778. status: true,
  779. fixed: '',
  780. },
  781. {
  782. columnProp: 'methodName',
  783. headerAlign: "center",
  784. align: "center",
  785. columnLabel: '方法名称',
  786. columnHidden: false,
  787. columnImage: false,
  788. columnSortable: false,
  789. sortLv: 0,
  790. status: true,
  791. fixed: '',
  792. },
  793. {
  794. columnProp: 'inspectionTypeName',
  795. headerAlign: "center",
  796. align: "center",
  797. columnLabel: '检验类型',
  798. columnHidden: false,
  799. columnImage: false,
  800. columnSortable: false,
  801. sortLv: 0,
  802. status: true,
  803. fixed: '',
  804. },
  805. ],
  806. userBuList: [],
  807. equipmentNoList: [],
  808. authSearch: false,
  809. authSave: false,
  810. authUpdate: false,
  811. authDelete: false,
  812. menuId: this.$route.meta.menuId,
  813. }
  814. },
  815. mounted () {
  816. this.$nextTick(() => {
  817. this.height = window.innerHeight - 180
  818. })
  819. },
  820. created () {
  821. // 按钮控制
  822. this.getButtonAuthData()
  823. // 获取用户的 site 和 bu
  824. this.getSiteAndBuByUserName()
  825. // 校验用户是否收藏
  826. this.favoriteIsOk()
  827. // 获取检验类型
  828. this.inspectionTypeSearch()
  829. // 动态列
  830. this.getTableUserColumn(this.$route.meta.menuId+'table',1)
  831. if (!this.authSearch) {
  832. // 获取数据列表
  833. this.getDataList()
  834. }
  835. },
  836. methods: {
  837. // 获取用户的bu
  838. getSiteAndBuByUserName () {
  839. let tempData = {
  840. username: this.$store.state.user.name,
  841. }
  842. getSiteAndBuByUserName(tempData).then(({data}) => {
  843. if (data.code === 0) {
  844. this.userBuList = data.rows
  845. }
  846. })
  847. },
  848. // 获取采集条件路径
  849. getEquipmentNoList () {
  850. let tempData = {
  851. bu: this.modalData.bu
  852. }
  853. getEquipmentNoList(tempData).then(({data}) => {
  854. if (data.code === 0) {
  855. this.equipmentNoList = data.rows
  856. }
  857. })
  858. },
  859. // 获取基础数据列表S
  860. getBaseList (val,type) {
  861. this.tagNo = val
  862. this.$nextTick(() => {
  863. let strVal = ''
  864. let conSql = ''
  865. if (val === 207) {
  866. strVal = this.modalData.samplingProgrammeNo
  867. if (this.modalData.bu === null || this.modalData.bu === '') {
  868. this.$message.warning("请选择BU!")
  869. return
  870. } else {
  871. conSql = " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
  872. this.$refs.baseList.init(val, strVal, conSql)
  873. }
  874. }
  875. if (val === 208) {
  876. strVal = this.modalData.samplingLevelNo
  877. if (this.modalData.bu === null || this.modalData.bu === '') {
  878. this.$message.warning("请选择BU!")
  879. return
  880. } else {
  881. conSql = " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
  882. this.$refs.baseList.init(val, strVal, conSql)
  883. }
  884. }
  885. if (val === 1036) {
  886. strVal = this.modalData.methodNo
  887. this.$refs.baseList.init(val, strVal)
  888. }
  889. })
  890. },
  891. // 每页数
  892. sizeChangeHandle (val) {
  893. this.pageSize = val
  894. this.pageIndex = 1
  895. this.getDataList()
  896. },
  897. // 当前页
  898. currentChangeHandle (val) {
  899. this.pageIndex = val
  900. this.getDataList()
  901. },
  902. // 查询检验类型
  903. inspectionTypeSearch () {
  904. let tempData = {
  905. site: this.$store.state.user.site
  906. }
  907. inspectionTypeSearch(tempData).then(({data}) => {
  908. if (data.code === 0) {
  909. this.options = data.rows
  910. }
  911. })
  912. },
  913. // 列表方法的回调
  914. getBaseData (val) {
  915. if (this.tagNo === 1036) {
  916. this.modalData.methodNo = val.method_no
  917. this.modalData.methodName = val.method_name
  918. }
  919. if (this.tagNo === 207) {
  920. this.modalData.samplingProgrammeNo = val.sampling_programme_no
  921. this.modalData.samplingProgrammeDesc = val.sampling_programme_desc
  922. }
  923. if (this.tagNo === 208) {
  924. this.modalData.samplingLevelNo = val.sampling_level_no
  925. this.modalData.samplingLevelDesc = val.sampling_level_desc
  926. }
  927. },
  928. // 获取数据列表
  929. getDataList () {
  930. this.searchData.limit = this.pageSize
  931. this.searchData.page = this.pageIndex
  932. qcItemSearch(this.searchData).then(({data}) => {
  933. this.dataList = data.page.list
  934. this.pageIndex = data.page.currPage
  935. this.pageSize = data.page.pageSize
  936. this.totalPage = data.page.totalCount
  937. })
  938. },
  939. addModal () {
  940. this.modalData = {
  941. flag: '1',
  942. site: '',
  943. bu: this.userBuList[0].buNo,
  944. createdBy: this.$store.state.user.name,
  945. itemNo: '',
  946. itemDesc: '',
  947. valueTypeDb: 'T',
  948. defaultValue: '',
  949. maxValue: '',
  950. minValue: '',
  951. itemRemark: '',
  952. itemType: 'D',
  953. methodNo: '',
  954. methodName: '',
  955. updateBy: '',
  956. inspectionTypeNo: '',
  957. itemSamplingQuantity: '',
  958. samplingProgrammeNo: '',
  959. samplingProgrammeDesc: '',
  960. samplingLevelNo: '',
  961. samplingLevelDesc: '',
  962. defaultSamplingProportion: '',
  963. collectionFlag: '',
  964. collectionSource: '',
  965. collectionSourceList: [],
  966. collectionMethod: '',
  967. collectionMethodList: [],
  968. collectionCondition: '',
  969. collectionConditionList: []
  970. }
  971. this.getEquipmentNoList()
  972. this.modalDisableFlag = false
  973. this.modalFlag = true
  974. },
  975. updateModal (row) {
  976. this.modalData = {
  977. flag: '2',
  978. bu: row.site + '_' + row.buNo,
  979. site: row.site,
  980. itemNo: row.itemNo,
  981. itemDesc: row.itemDesc,
  982. valueTypeDb: row.valueTypeDb,
  983. defaultValue: row.defaultValue,
  984. createdBy: this.$store.state.user.name,
  985. maxValue: row.maxValue,
  986. minValue: row.minValue,
  987. itemRemark: row.itemRemark,
  988. itemType: 'D',
  989. methodNo: row.methodNo,
  990. methodName: row.methodName,
  991. updateBy: this.$store.state.user.name,
  992. inspectionTypeNo: row.inspectionTypeNo,
  993. itemSamplingQuantity: row.itemSamplingQuantity,
  994. samplingProgrammeNo: row.samplingProgrammeNo,
  995. samplingProgrammeDesc: row.samplingProgrammeDesc,
  996. samplingLevelNo: row.samplingLevelNo,
  997. samplingLevelDesc: row.samplingLevelDesc,
  998. defaultSamplingProportion: row.defaultSamplingProportion,
  999. collectionFlag: row.collectionFlag,
  1000. collectionSource: row.collectionSource,
  1001. collectionSourceList: row.collectionSource == null || row.collectionSource === '' ? [] : row.collectionSource.split(','),
  1002. collectionMethod: row.collectionMethod,
  1003. collectionMethodList: row.collectionMethod == null || row.collectionMethod === '' ? [] : row.collectionMethod.split(','),
  1004. collectionCondition: row.collectionCondition,
  1005. collectionConditionList: row.collectionCondition == null || row.collectionCondition === '' ? [] : row.collectionCondition.split(','),
  1006. }
  1007. this.getEquipmentNoList()
  1008. this.modalDisableFlag = true
  1009. this.modalFlag = true
  1010. },
  1011. // 删除
  1012. deleteModal (row) {
  1013. this.$confirm(`是否删除这个检验项目?`, '提示', {
  1014. confirmButtonText: '确定',
  1015. cancelButtonText: '取消',
  1016. type: 'warning'
  1017. }).then(() => {
  1018. qcItemDelete(row).then(({data}) => {
  1019. if (data && data.code === 0) {
  1020. this.getDataList()
  1021. this.$message({
  1022. message: '操作成功',
  1023. type: 'success',
  1024. duration: 1500,
  1025. onClose: () => {}
  1026. })
  1027. } else {
  1028. this.$alert(data.msg, '错误', {
  1029. confirmButtonText: '确定'
  1030. })
  1031. }
  1032. })
  1033. }).catch(() => {
  1034. })
  1035. },
  1036. saveData () {
  1037. if (this.modalData.bu === '' || this.modalData.bu == null) {
  1038. this.$message.warning('请选择BU!')
  1039. return
  1040. }
  1041. if (this.modalData.itemDesc === '' || this.modalData.itemDesc == null) {
  1042. this.$message.warning('请输入检验项目名称!')
  1043. return
  1044. }
  1045. if (this.modalData.valueTypeDb === '' || this.modalData.valueTypeDb == null) {
  1046. this.$message.warning('请选择检验值类型!')
  1047. return
  1048. }
  1049. if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
  1050. this.$message.warning('请选择检验类型!')
  1051. return
  1052. }
  1053. if (this.modalData.methodNo === '' || this.modalData.methodNo == null) {
  1054. this.$message.warning('请选择检验方法!')
  1055. return
  1056. }
  1057. // if ((this.modalData.samplingProgrammeNo === '' || this.modalData.samplingProgrammeNo == null) && (this.modalData.itemSamplingQuantity === '' || this.modalData.itemSamplingQuantity == null) && (this.modalData.defaultSamplingProportion === '' || this.modalData.defaultSamplingProportion == null)) {
  1058. // this.$message.warning('抽样方案、抽样数量、抽样比例至少选择一项!')
  1059. // return
  1060. // }
  1061. if ((this.modalData.samplingProgrammeNo !== '' && this.modalData.samplingProgrammeNo != null) && (this.modalData.samplingLevelNo === '' || this.modalData.samplingLevelNo == null)) {
  1062. this.$message.warning('请选择检验水平!')
  1063. return
  1064. }
  1065. if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionSourceList == null || this.modalData.collectionSourceList.length === 0)) {
  1066. this.$message.warning('请选择采集数据来源!')
  1067. return
  1068. }
  1069. if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionMethodList == null || this.modalData.collectionMethodList.length === 0)) {
  1070. this.$message.warning('请选择采集数据方式!')
  1071. return
  1072. }
  1073. if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionConditionList == null || this.modalData.collectionConditionList.length === 0)) {
  1074. this.$message.warning('请选择采集条件路径!')
  1075. return
  1076. }
  1077. if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionSourceList.length !== this.modalData.collectionMethodList.length)) {
  1078. this.$message.warning('采集数据的来源、方式不对应!')
  1079. return
  1080. }
  1081. this.modalData.collectionSource = this.modalData.collectionSourceList.join(',')
  1082. this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',')
  1083. this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',')
  1084. if (this.modalData.flag === '1') {
  1085. qcItemSave(this.modalData).then(({data}) => {
  1086. if (data && data.code === 0) {
  1087. this.getDataList()
  1088. this.modalFlag = false
  1089. this.$message({
  1090. message: '操作成功',
  1091. type: 'success',
  1092. duration: 1500,
  1093. onClose: () => {}
  1094. })
  1095. } else {
  1096. this.$alert(data.msg, '错误', {
  1097. confirmButtonText: '确定'
  1098. })
  1099. }
  1100. })
  1101. } else {
  1102. qcItemUpdate(this.modalData).then(({data}) => {
  1103. if (data && data.code === 0) {
  1104. this.getDataList()
  1105. this.modalFlag = false
  1106. this.$message({
  1107. message: '操作成功',
  1108. type: 'success',
  1109. duration: 1500,
  1110. onClose: () => {}
  1111. })
  1112. } else {
  1113. this.$alert(data.msg, '错误', {
  1114. confirmButtonText: '确定'
  1115. })
  1116. }
  1117. })
  1118. }
  1119. },
  1120. // 获取检验方法列表
  1121. queryMethodList () {
  1122. this.methodData.bu = this.modalData.bu
  1123. this.methodData.inspectionTypeNo = this.modalData.inspectionTypeNo
  1124. queryMethodList(this.methodData).then(({data}) => {
  1125. if (data && data.code === 0) {
  1126. this.methodList = data.rows
  1127. this.methodModelFlag = true
  1128. } else {
  1129. this.$alert(data.msg, '错误', {
  1130. confirmButtonText: '确定'
  1131. })
  1132. }
  1133. })
  1134. },
  1135. // 选中检验方法
  1136. getRowData (row) {
  1137. this.modalData.methodNo = row.methodNo
  1138. this.modalData.methodName = row.methodName
  1139. this.methodModelFlag = false
  1140. },
  1141. // 校验用户是否收藏
  1142. favoriteIsOk () {
  1143. let userFavorite = {
  1144. userId: this.$store.state.user.id,
  1145. languageCode: this.$i18n.locale
  1146. }
  1147. userFavoriteList(userFavorite).then(({data}) => {
  1148. for (let i = 0; i < data.list.length; i++) {
  1149. if (this.$route.meta.menuId === data.list[i].menuId) {
  1150. this.favorite = true
  1151. }
  1152. }
  1153. })
  1154. },
  1155. // 收藏 OR 取消收藏
  1156. favoriteFunction () {
  1157. let userFavorite = {
  1158. userId: this.$store.state.user.id,
  1159. functionId: this.$route.meta.menuId,
  1160. }
  1161. if (this.favorite) {
  1162. removeUserFavorite(userFavorite).then(({data}) => {
  1163. this.$message.success(data.msg)
  1164. this.favorite = false
  1165. })
  1166. } else {
  1167. // 收藏
  1168. saveUserFavorite(userFavorite).then(({data}) => {
  1169. this.$message.success(data.msg)
  1170. this.favorite = true
  1171. })
  1172. }
  1173. },
  1174. //导出excel
  1175. async createExportData() {
  1176. this.searchData.limit = -1
  1177. this.searchData.page = 1
  1178. await qcItemSearch(this.searchData).then(({data}) => {
  1179. this.exportList= data.rows;
  1180. })
  1181. return this.exportList;
  1182. },
  1183. startDownload() {},
  1184. finishDownload() {},
  1185. fields () {
  1186. let json = "{"
  1187. this.columnList.forEach((item, index) => {
  1188. if (index == this.columnList.length - 1) {
  1189. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1190. } else {
  1191. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1192. }
  1193. })
  1194. json += "}"
  1195. let s = eval("(" + json + ")")
  1196. return s
  1197. },
  1198. // 导入
  1199. qcUpload () {
  1200. let currentData = {
  1201. flag: 'item',
  1202. createBy: this.$store.state.user.name,
  1203. site: this.$store.state.user.site,
  1204. }
  1205. //打开组件 去做新增业务
  1206. this.$nextTick(() => {
  1207. this.$refs.qcUpload.init(currentData)
  1208. })
  1209. },
  1210. // 动态列开始 获取 用户保存的 格式列
  1211. async getTableUserColumn (tableId, columnId) {
  1212. let queryTableUser = {
  1213. userId: this.$store.state.user.name,
  1214. functionId: this.$route.meta.menuId,
  1215. tableId: tableId,
  1216. status: true,
  1217. languageCode: this.$i18n.locale
  1218. }
  1219. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1220. if (data.rows.length > 0) {
  1221. //this.columnList1 = []
  1222. switch (columnId) {
  1223. case 1:
  1224. this.columnList = data.rows
  1225. break;
  1226. // case 2:
  1227. // this.columnDetailList = data.rows
  1228. // break;
  1229. // case 3:
  1230. // this.columnList2 = data.rows
  1231. // break;
  1232. // case 4:
  1233. // this.columnList3 = data.rows
  1234. // break;
  1235. }
  1236. } else {
  1237. this.getColumnList(tableId, columnId)
  1238. }
  1239. })
  1240. },
  1241. // 获取 tableDefault 列
  1242. async getColumnList (tableId, columnId) {
  1243. let queryTable = {
  1244. functionId: this.$route.meta.menuId,
  1245. tableId: tableId,
  1246. languageCode: this.$i18n.locale
  1247. }
  1248. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1249. if (!data.rows.length == 0) {
  1250. switch (columnId) {
  1251. case 1:
  1252. this.columnList = data.rows
  1253. break;
  1254. // case 2:
  1255. // this.columnDetailList = data.rows
  1256. // break;
  1257. // case 3:
  1258. // this.columnList2 = data.rows
  1259. // break;
  1260. // case 4:
  1261. // this.columnList3 = data.rows
  1262. // break;
  1263. }
  1264. } else {
  1265. // this.showDefault = true.
  1266. }
  1267. })
  1268. },
  1269. //获取按钮的权限数据
  1270. getButtonAuthData () {
  1271. let searchFlag = this.isAuth(this.menuId+":search")
  1272. let saveFlag = this.isAuth(this.menuId+":save")
  1273. let updateFlag = this.isAuth(this.menuId+":update")
  1274. let deleteFlag = this.isAuth(this.menuId+":delete")
  1275. //处理页面的权限数据
  1276. this.authSearch = !searchFlag
  1277. this.authSave = !saveFlag
  1278. this.authUpdate = !updateFlag
  1279. this.authDelete = !deleteFlag
  1280. },
  1281. }
  1282. }
  1283. </script>