|
|
@ -27,7 +27,10 @@ |
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<el-button type="primary" plain @click="handleAdd">{{ $t('form.add') }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:gxsjk']">{{ |
|
|
|
|
|
$t('page.business.resource.yq.refresh') }}</el-button> |
|
|
|
|
|
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:xz']">{{ |
|
|
|
|
|
$t('page.business.resource.yq.add') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
@ -44,8 +47,10 @@ |
|
|
<el-table-column :label="$t('page.business.resource.yq.ssbm')" align="center" prop="bmMc" /> |
|
|
<el-table-column :label="$t('page.business.resource.yq.ssbm')" align="center" prop="bmMc" /> |
|
|
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width"> |
|
|
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="text" @click="handleDetail(scope.row)">{{ $t('form.detail') }}</el-button> |
|
|
|
|
|
<el-button type="text" @click="handleUpdate(scope.row)">{{ $t('form.edit') }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="text" @click="handleDetail(scope.row)" v-hasPermi="['business:resource:yq:xq']">{{ |
|
|
|
|
|
$t('form.detail') }}</el-button> |
|
|
|
|
|
<el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:resource:yq:bj']">{{ |
|
|
|
|
|
$t('form.edit') }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -59,24 +64,24 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqmc')" prop="mc"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqmc')" prop="mc"> |
|
|
<el-input v-model="form.mc" :placeholder="$t('form.placeholderInput')" maxlength="50"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.mc" :placeholder="$t('form.placeholderInput')" maxlength="50" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqbh')" prop="bh"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqbh')" prop="bh"> |
|
|
<el-input v-model="form.bh" :placeholder="$t('form.placeholderInput')" maxlength="50"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.bh" :placeholder="$t('form.placeholderInput')" maxlength="50" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqxh')" prop="xh"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqxh')" prop="xh"> |
|
|
<el-input v-model="form.xh" :placeholder="$t('form.placeholderInput')" maxlength="50"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.xh" :placeholder="$t('form.placeholderInput')" maxlength="50" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqly')" prop="ly"> |
|
|
<el-form-item :label="$t('page.business.resource.yq.yqly')" prop="ly"> |
|
|
<el-input v-model="form.ly" :placeholder="$t('form.placeholderInput')" maxlength="50"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.ly" :placeholder="$t('form.placeholderInput')" maxlength="50" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -104,7 +109,8 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item :label="$t('form.remark')" prop="remark"> |
|
|
<el-form-item :label="$t('form.remark')" prop="remark"> |
|
|
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" maxlength="500" /> |
|
|
|
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" |
|
|
|
|
|
maxlength="500" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -120,26 +126,27 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
|
|
|
|
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm"> |
|
|
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm"> |
|
|
<el-input v-model="form.qmrmm" :placeholder="$t('form.placeholderInput')" type="password" maxlength="20"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.qmrmm" :placeholder="$t('form.placeholderInput')" type="password" |
|
|
|
|
|
maxlength="20" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="submitForm">{{$t('form.saveConfirm')}}</el-button> |
|
|
|
|
|
<el-button @click="cancel">{{$t('form.cancel')}}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button> |
|
|
|
|
|
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<!-- 仪器详情 --> |
|
|
<!-- 仪器详情 --> |
|
|
<YqDetail ref="YqDetail" /> |
|
|
|
|
|
|
|
|
<YqDetail ref="YqDetail" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { yq_list, yq_info, yq_save, yqJcgj_list } from '@/api/business/yq/yq' |
|
|
|
|
|
|
|
|
import { yq_list, yq_info, yq_save, yq_update } from '@/api/business/yq/yq' |
|
|
import YqDetail from './comps/detail' |
|
|
import YqDetail from './comps/detail' |
|
|
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; |
|
|
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; |
|
|
import SelectDept from '@/views/business/comps/select/SelectDept'; |
|
|
import SelectDept from '@/views/business/comps/select/SelectDept'; |
|
|
@ -189,40 +196,40 @@ export default { |
|
|
// 表单校验 |
|
|
// 表单校验 |
|
|
rules: { |
|
|
rules: { |
|
|
mc: [ |
|
|
mc: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqmc')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqmc')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqmc') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqmc') + this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
bh: [ |
|
|
bh: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqbh')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqbh')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqbh') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqbh') + this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
xh: [ |
|
|
xh: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqxh')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqxh')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqxh') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqxh') + this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
ly: [ |
|
|
ly: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqly')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqly')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.yqly') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqly') + this.$t('form.lengthLimit') + '50', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
jzrq: [ |
|
|
jzrq: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.xcjzrq')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.xcjzrq') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
], |
|
|
], |
|
|
bmMc: [ |
|
|
bmMc: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.ssbm')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.ssbm') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
], |
|
|
], |
|
|
wc: [ |
|
|
wc: [ |
|
|
{ required: true, message: this.$t('page.business.resource.yq.wc')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('page.business.resource.yq.wc') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
], |
|
|
], |
|
|
qmrmm: [ |
|
|
qmrmm: [ |
|
|
{ required: true, message: this.$t('form.signerPsw')+ this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 20, message: this.$t('form.signerPsw')+ this.$t('form.lengthLimit') + '20', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" }, |
|
|
|
|
|
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters([ |
|
|
...mapGetters([ |
|
|
'nickName','name' |
|
|
|
|
|
|
|
|
'nickName', 'name' |
|
|
]), |
|
|
]), |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
@ -281,7 +288,7 @@ export default { |
|
|
handleUpdate(row) { |
|
|
handleUpdate(row) { |
|
|
this.reset() |
|
|
this.reset() |
|
|
const id = row.id || this.ids |
|
|
const id = row.id || this.ids |
|
|
yq_info({id: id}).then((response) => { |
|
|
|
|
|
|
|
|
yq_info({ id: id }).then((response) => { |
|
|
this.form = response.data |
|
|
this.form = response.data |
|
|
this.form.qmyy = '编辑仪器' |
|
|
this.form.qmyy = '编辑仪器' |
|
|
this.open = true |
|
|
this.open = true |
|
|
@ -295,11 +302,19 @@ export default { |
|
|
submitForm() { |
|
|
submitForm() { |
|
|
this.$refs['form'].validate((valid) => { |
|
|
this.$refs['form'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
yq_save(this.form).then((response) => { |
|
|
|
|
|
this.$modal.msgSuccess(this.$t('form.operationSuccess')) |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (this.form.id) { |
|
|
|
|
|
yq_update(this.form).then((response) => { |
|
|
|
|
|
this.$modal.msgSuccess(this.$t('form.operationSuccess')) |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
yq_save(this.form).then((response) => { |
|
|
|
|
|
this.$modal.msgSuccess(this.$t('form.operationSuccess')) |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|