|
@@ -0,0 +1,124 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button size="small" type="text" @click="onShow">编 辑</el-button>
|
|
|
+ <el-drawer
|
|
|
+ title="新增报表"
|
|
|
+ :visible.sync="visibleForm"
|
|
|
+ size="700px"
|
|
|
+ direction="rtl"
|
|
|
+ append-to-body
|
|
|
+ :show-close="false"
|
|
|
+ @close="onClose">
|
|
|
+ <div class="drawer__panel">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="应用:" prop="systemappid" :rules="{ required: true, message: '请选择应用', trigger: 'change'}">
|
|
|
+ <el-select v-model="form.systemappid" filterable placeholder="请选择应用" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in appOption"
|
|
|
+ :key="item.rowindex"
|
|
|
+ :label="item.systemclientname + '-' + item.systemmodulename + '-' + item.systemappname"
|
|
|
+ :value="item.systemappid">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="报表名称:" prop="name" :rules="{ required: true,message: '请输入报表名称', trigger: 'blur'}">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入报表名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="报表链接:" prop="path" :rules="{ required: true,message: '请输入报表链接', trigger: 'blur'}">
|
|
|
+ <el-input v-model="form.path" placeholder="请输入报表链接" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="是否启用:" prop="isused">
|
|
|
+ <el-switch
|
|
|
+ v-model="form.isused"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0">
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div class="fixed__btn__panel">
|
|
|
+ <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "edit",
|
|
|
+ props:["data"],
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ visibleForm:false,
|
|
|
+ appOption:[],
|
|
|
+ form:{
|
|
|
+ "path":"",
|
|
|
+ "name":"",
|
|
|
+ "sys_reportid":'0',
|
|
|
+ "systemappid":'',
|
|
|
+ "isused":'1'
|
|
|
+ },
|
|
|
+ rules:{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ onShow(){
|
|
|
+ this.visibleForm = true
|
|
|
+ console.log(this.data,'data')
|
|
|
+ this.form = {
|
|
|
+ "path":this.data.path,
|
|
|
+ "name":this.data.name,
|
|
|
+ "sys_reportid":this.data.sys_reportid,
|
|
|
+ "systemappid":this.data.systemappid,
|
|
|
+ "isused":String(this.data.isused)
|
|
|
+ }
|
|
|
+ this.queryApp()
|
|
|
+ },
|
|
|
+ async queryApp(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname":"sysmanage.develop.optiontype.optiontype",
|
|
|
+ "method":"optiontypeselect",
|
|
|
+ "content":{
|
|
|
+ "pageNumber":1,
|
|
|
+ "pageSize":10000,
|
|
|
+ "typename":"appselectwithoutcondition"
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.appOption = res.data
|
|
|
+ },
|
|
|
+ onSave(){
|
|
|
+ this.$refs.form.validate(async (validate)=>{
|
|
|
+ if (!validate) return false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20230828110904,
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.visibleForm = false
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClose(){}
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|