|
@@ -6,14 +6,14 @@ interface RuleForm {
|
|
|
id: string,
|
|
id: string,
|
|
|
name: string,
|
|
name: string,
|
|
|
addr: string,
|
|
addr: string,
|
|
|
- status: string,
|
|
|
|
|
|
|
+ status: any,
|
|
|
remark: string
|
|
remark: string
|
|
|
}
|
|
}
|
|
|
const initData={
|
|
const initData={
|
|
|
id:'',
|
|
id:'',
|
|
|
name: '',
|
|
name: '',
|
|
|
addr: '',
|
|
addr: '',
|
|
|
- status: '',
|
|
|
|
|
|
|
+ status: 1,
|
|
|
|
|
|
|
|
remark: ''
|
|
remark: ''
|
|
|
}
|
|
}
|
|
@@ -23,7 +23,7 @@ const ruleForm = reactive<RuleForm>({
|
|
|
id:'',
|
|
id:'',
|
|
|
name: '',
|
|
name: '',
|
|
|
addr: '',
|
|
addr: '',
|
|
|
- status: '',
|
|
|
|
|
|
|
+ status: 1,
|
|
|
|
|
|
|
|
remark: ''
|
|
remark: ''
|
|
|
})
|
|
})
|
|
@@ -84,13 +84,21 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+let Authorization=localStorage.getItem('access_token')
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
import { ref,onMounted,reactive } from 'vue'
|
|
import { ref,onMounted,reactive } from 'vue'
|
|
|
import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
|
|
import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
|
|
|
|
|
+let upUrl=window.baseUrl+'/api/resource/oss/upload'
|
|
|
|
|
+let headers={
|
|
|
|
|
+ Authorization:'Bearer'+` ${Authorization}`
|
|
|
|
|
+}
|
|
|
|
|
+let fileList=ref([])
|
|
|
let searchWord=ref('')
|
|
let searchWord=ref('')
|
|
|
let total=ref(0)
|
|
let total=ref(0)
|
|
|
let pageNum=ref(1)
|
|
let pageNum=ref(1)
|
|
|
let dialogVisible=ref(false)
|
|
let dialogVisible=ref(false)
|
|
|
-let logtitle=ref('新增定制班车-站点')
|
|
|
|
|
|
|
+let logtitle=ref('新增小程序宣传图')
|
|
|
let loading=ref(true)
|
|
let loading=ref(true)
|
|
|
let excellloading=ref(false)
|
|
let excellloading=ref(false)
|
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
@@ -102,13 +110,13 @@ const addItem=data=>{
|
|
|
for(let key in data){
|
|
for(let key in data){
|
|
|
ruleForm[key]=data[key]
|
|
ruleForm[key]=data[key]
|
|
|
}
|
|
}
|
|
|
- logtitle.value='编辑定制班车-站点'
|
|
|
|
|
|
|
+ logtitle.value='编辑小程序宣传图'
|
|
|
}else{
|
|
}else{
|
|
|
|
|
|
|
|
for(let key in initData){
|
|
for(let key in initData){
|
|
|
ruleForm[key]=initData[key]
|
|
ruleForm[key]=initData[key]
|
|
|
}
|
|
}
|
|
|
- logtitle.value='新增定制班车-站点'
|
|
|
|
|
|
|
+ logtitle.value='新增小程序宣传图'
|
|
|
}
|
|
}
|
|
|
dialogVisible.value=true
|
|
dialogVisible.value=true
|
|
|
}
|
|
}
|
|
@@ -203,12 +211,12 @@ onMounted(()=>{
|
|
|
</el-input>
|
|
</el-input>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="right-part">
|
|
|
|
|
|
|
+ <!-- <div class="right-part">
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-button :icon="Tools">筛选</el-button>
|
|
<el-button :icon="Tools">筛选</el-button>
|
|
|
<el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
|
|
<el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
<el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData" style="width: 100%" v-loading="loading">
|
|
<el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData" style="width: 100%" v-loading="loading">
|
|
|
<el-table-column prop="name" label="宣传图" />
|
|
<el-table-column prop="name" label="宣传图" />
|
|
@@ -282,13 +290,39 @@ onMounted(()=>{
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="地址">
|
|
|
|
|
- <el-input placeholder="地址" v-model="ruleForm.addr" />
|
|
|
|
|
|
|
+ <el-form-item label="图片上传">
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+
|
|
|
|
|
+ :action="upUrl"
|
|
|
|
|
+ :headers="headers"
|
|
|
|
|
+ :limit="1"
|
|
|
|
|
+ :show-file-list="false"
|
|
|
|
|
+ :on-exceed="handleExceed"
|
|
|
|
|
+ :file-list="fileList">
|
|
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ </el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="状态">
|
|
<el-form-item label="状态">
|
|
|
- <el-input placeholder="状态" v-model="ruleForm.status" />
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="ruleForm.status" placeholder="状态"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+
|
|
|
|
|
+ label="启用"
|
|
|
|
|
+ :value="1"
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-option
|
|
|
|
|
+
|
|
|
|
|
+ label="不启用"
|
|
|
|
|
+ :value="2"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|