123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <el-dialog
- title="审批申请"
- :visible.sync="visible"
- width="60%"
- :before-close="onClose"
- append-to-body
- v-dialog-drag
- >
- <slot name='content'></slot>
- <avue-form :option="option" v-model="query"></avue-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="onClose()">取 消</el-button>
- <el-button @click="onClose()" type="primary">提交审核</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- export default {
- data() {
- return {
- visible: false,
- query: {},
- option: {
- menuBtn:false,
- column: [
- {
- label: "理由",
- prop: "reason",
- type:'textarea',
- span:24,
- rules: [
- {
- required: true,
- message: "请输入理由",
- trigger: "blur"
- }
- ]
- }
- ]
- }
- };
- },
- props: {
- switchDialog: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- onClose() {
- this.visible = false;
- Object.assign(this.$data, this.$options.data());
- this.$emit("onClose", false);
- }
- },
- watch: {
- switchDialog: function(i) {
- this.visible = i;
- }
- }
- };
- </script>
- <style lang="scss" scoped></style>
|