| | |
| | | </el-col> |
| | | <el-col :span="8" :offset="4"> |
| | | <el-button |
| | | v-if="permissions.quality_teststandard_layout" |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | @click="beginItemLayOut" |
| | |
| | | type="text" |
| | | :disabled="isSubmit" |
| | | v-thinclick="`dataFormTestStandardParam`" |
| | | v-if="editable" |
| | | v-if="editable && permissions.quality_teststandard_save" |
| | | >保存 |
| | | </el-button> |
| | | </el-col> |
| | |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | @click="relateOperationParam()" |
| | | v-if="editable" |
| | | v-if="editable && permissions.quality_teststandard_insert" |
| | | >添加 |
| | | </el-button> |
| | | </el-col> |
| | |
| | | </template> |
| | | </el-table-column><el-table-column |
| | | label="测试方法" |
| | | prop="purpose" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.purpose"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="测试目的" |
| | | prop="method" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.method"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="测试目的" |
| | | prop="purpose" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.purpose"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | </el-table-column> --> |
| | | <el-table-column label="单位" prop="unit" align="center" /> |
| | | <!--<el-table-column label="参数类型" prop="type" align="center" :formatter="getParam"/>--> |
| | | <el-table-column label="操作" align="center"> |
| | | <el-table-column label="操作" align="center" v-if="permissions.quality_teststandard_table_operate"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | |
| | | import { copyTestStandard } from '../../../api/quality/teststandard' |
| | | import EditParamForm from './edit-param-form' |
| | | import itemLayout from './item-layout' |
| | | import { mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | searchInfoType: 'text' |
| | | } |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '复制', |
| | | type: 'primary', |
| | | fun: this.copy |
| | | }, |
| | | { |
| | | text: '批准', |
| | | fun: () => { |
| | | this.changeState('accept') |
| | | }, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '拒绝', |
| | | fun: () => { |
| | | this.changeState('reject') |
| | | }, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '撤销', |
| | | fun: () => { |
| | | this.changeState('cancel') |
| | | }, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '失效', |
| | | fun: () => { |
| | | this.changeState('disabled') |
| | | }, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '删除', |
| | | fun: () => { |
| | | this.deleteAll() |
| | | }, |
| | | disabled: false, |
| | | permitArr: [] |
| | | } |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | // show: { |
| | | // val: ['01draft'], |
| | | // key: 'state' |
| | | // } |
| | | } |
| | | ], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | itemLayout |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']), |
| | | editable: function() { |
| | | if (!this.currentTestStandard) { |
| | | return true |
| | |
| | | this.rowDrop() |
| | | }, |
| | | created() { |
| | | if(this.permissions.quality_teststandard_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | | disabled: false, |
| | | type: 'primary', |
| | | fun: ()=>{this.addOrUpdateHandle()}, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_copy){ |
| | | this.table.toolbar.push({ |
| | | text: '复制', |
| | | type: 'primary', |
| | | disabled: false, |
| | | fun: ()=>{this.copy()}, |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_accept){ |
| | | this.table.toolbar.push({ |
| | | text: '批准', |
| | | disabled: false, |
| | | fun: ()=>{this.changeState('accept')}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_revoke){ |
| | | this.table.toolbar.push({ |
| | | text: '拒绝', |
| | | disabled: false, |
| | | fun: ()=>{this.changeState('reject')}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_cancel){ |
| | | this.table.toolbar.push({ |
| | | text: '撤销', |
| | | disabled: false, |
| | | fun: () => {this.changeState('cancel')}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_lose){ |
| | | this.table.toolbar.push({ |
| | | text: '失效', |
| | | disabled: false, |
| | | fun: () => {this.changeState('disabled')}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_del){ |
| | | this.table.toolbar.push({ |
| | | text: '批量删除', |
| | | type:'primary', |
| | | disabled: false, |
| | | permitArr: [], |
| | | fun: ()=>{this.deleteAll()}, |
| | | }) |
| | | } |
| | | if(this.permissions.quality_teststandard_del){ |
| | | this.table.operator = [{ |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | this.initDirParamType() |
| | | this.initDirInspectionType() |
| | | }, |