12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <div>
- <div class="my-title">编辑</div>
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- @keyup.enter.native="dataFormSubmit()"
- label-width="130px"
- ></el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="onChose">取消</el-button>
- <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
- </span>
- </div>
- </template>
- <script>
- export default {
- name: 'quality-disqualification-update',
- data () {
- return {
- dataForm: {},
- dataRule: {}
- }
- },
- mounted () {},
- methods: {
- init (item) {
- this.dataForm = { ...item }
- },
- onChose () {
- this.$emit('onChose')
- },
- dataFormSubmit () {
- this.$refs['dataForm'].validate((valid) => {
- if (valid) {
- this.$http({
- url: this.$http.adornUrl(`/biz-service/disqualification/update`),
- method: 'post',
- data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
- }).then(({ data }) => {
- if (data && data.code === '200') {
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.onChose()
- this.$emit('refreshDataList')
- }
- })
- } else {
- this.$message.error(data.msg)
- }
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|