| | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | |
| | | <el-table-column |
| | | prop="description" |
| | | label="点检要求" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.description">{{ row.description }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="isscan" |
| | | label="选择扫码" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isscan==='Y'">是</div> |
| | | <div v-if="row.isscan==='N'">否</div> |
| | | <div v-if="row.isscan==='Y'"> |
| | | <svg-icon icon-class="circleYes" style="margin-right: 2px" /> |
| | | 是 |
| | | </div> |
| | | <div v-if="row.isscan==='N'"> |
| | | <svg-icon icon-class="circleNo" style="margin-right: 2px" /> |
| | | 否 |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getDeviceCheckItemSearch" |
| | | /> |
| | |
| | | </el-dialog> |
| | | |
| | | <!--导入组件--> |
| | | <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" /> |
| | | <import-picker |
| | | ref="importPickerFunc" |
| | | class="importPickerClass" |
| | | :shows.sync="shows" |
| | | :title="title_value" |
| | | :colos="colos" |
| | | :code="code" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { AddUpdateDeviceCheckItem, DeleteDeviceCheckItem, DeviceCheckItemSearch } from '@/api/sbgl' |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { validateCode } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请输入编码')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('编码不能为中文')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | |
| | | checkitemname: '', // 设备点检部位名称 |
| | | checkitemdescr: '', // 设备点检部位要求 |
| | | cycle: 'D', // 设备点检部位周期 |
| | | isqrcode: 'Y', // 是否扫码 |
| | | isqrcode: 'N', // 是否扫码 |
| | | OperType: '' // 操作类型 |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | checkitemcode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | checkitemname: [ |
| | | { required: true, message: '请输入部位名称', trigger: ['blur', 'change'] } |
| | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.id = row.id |
| | | this.dialogForm.cycle = row.cycle |
| | | this.dialogForm.isscan = row.isqrcode |
| | | this.dialogForm.isqrcode = row.isscan |
| | | this.dialogForm.checkitemcode = row.code |
| | | this.dialogForm.checkitemname = row.name |
| | | this.dialogForm.checkitemdescr = row.description |
| | |
| | | DeleteDeviceCheckItem({ checkitemcode: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getDeviceCheckItemSearch() |
| | | } |
| | | }) |
| | |
| | | this.dialogForm.checkitemname = '' |
| | | this.dialogForm.checkitemdescr = '' |
| | | this.dialogForm.cycle = 'D' |
| | | this.dialogForm.isqrcode = 'Y' |
| | | this.dialogForm.isqrcode = 'N' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |