| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div>
- <el-button type="primary" size="small" @click="drawer=true">
- {{$t('新建')}}
- </el-button>
- <el-drawer
- :title="$t(`新建执行器`)"
- :visible.sync="drawer"
- :wrapperClosable="false"
- size="664px"
- direction="rtl"
- append-to-body
- :show-close="false">
- <div class="drawer__panel">
- <customForm ref="form" formname="form" v-if="drawer"></customForm>
- </div>
- <div class="fixed__btn__panel">
- <el-button size="small" @click="drawer = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
- <el-button size="small" type="primary" @click="onSubmit" :loading="loading" class="normal-btn-width">{{$t('确 定')}}</el-button>
- </div>
- </el-drawer>
- </div>
- </template>
- <script>
- import customForm from '@/components/customForm/customForm'
- import {mapGetters} from "vuex";
- export default {
- components:{customForm},
- data () {
- return {
- drawer:false,
- type:'',
- valvetype:''
- }
- },
- computed:{
- ...mapGetters({
- loading:'loading'
- })
- },
- watch: {
- },
- methods:{
- onSubmit () {
- this.$refs.form.validateFields(()=>{
- this.$store.commit('setLoading',true)
- this.$api.requested({
- id:2024060513384502,
- content: this.$refs.form.form
- }).then(res=>{
- this.tool.showMessage(res,() => {
- this.$store.dispatch('changeDetailDrawer',true)
- this.$router.push({path:'/executeDetail',query:{id:res.data.itemid,rowindex:res.data.rowindex}})
- this.drawer = false
- this.$emit('onSuccess',res.data)
- })
- this.$store.commit('setLoading',false)
- })
- })
- },
- },
- }
- </script>
- <style scoped>
- .dialog-footer{
- margin-top:32px;
- text-align: center;
- }
- </style>
|