bugfix 解决一部分0703反馈bug
This commit is contained in:
@@ -6,26 +6,45 @@
|
||||
|
||||
<div class="actual-form">
|
||||
<el-form :inline="true" :model="dataForm" :rules="headConfig.rules">
|
||||
<!-- <el-col :span="opt.span ? +opt.span : 4" v-for="opt in options" :key="opt.id"> -->
|
||||
<el-form-item
|
||||
v-for="(opt, index) in headConfig.fields"
|
||||
:key="opt.prop"
|
||||
:label="opt.label ? opt.label : null"
|
||||
:prop="opt.prop ?? '' + index"
|
||||
:rules="opt.bind?.rules ? opt.bind.rules : undefined"
|
||||
>
|
||||
<el-input v-if="opt.input" v-model="dataForm[opt.prop]" v-bind="opt.bind" clearable size="small" />
|
||||
<el-select v-if="opt.select" v-model="dataForm[opt.prop]" v-bind="opt.bind" clearable size="small">
|
||||
<el-option v-for="item in opt.select" :key="item.value + Math.random().toString()" :label="item.label" :value="item.value" />
|
||||
:rules="opt.bind?.rules ? opt.bind.rules : undefined">
|
||||
<el-input
|
||||
v-if="opt.input"
|
||||
v-model="dataForm[opt.prop]"
|
||||
v-bind="opt.bind"
|
||||
clearable
|
||||
size="small"
|
||||
@keydown.enter.native.prevent="handleBtnClick('查询')" />
|
||||
<el-select
|
||||
v-if="opt.select"
|
||||
v-model="dataForm[opt.prop]"
|
||||
v-bind="opt.bind"
|
||||
clearable
|
||||
size="small"
|
||||
@keydown.enter.native.prevent="handleBtnClick('查询')">
|
||||
<el-option
|
||||
v-for="item in opt.select"
|
||||
:key="item.value + Math.random().toString()"
|
||||
:label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
<el-date-picker v-if="opt.timerange" v-model="dataForm[opt.prop]" v-bind="opt.bind" clearable size="small" />
|
||||
<el-date-picker
|
||||
v-if="opt.timerange"
|
||||
v-model="dataForm[opt.prop]"
|
||||
v-bind="opt.bind"
|
||||
clearable
|
||||
size="small"
|
||||
@keydown.enter.native.prevent="handleBtnClick('查询')" />
|
||||
<el-upload
|
||||
v-if="opt.upload"
|
||||
size="small"
|
||||
:key="'upload_' + Math.random().toString()"
|
||||
class="inline-block pl-3"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
>
|
||||
action="https://jsonplaceholder.typicode.com/posts/">
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
<el-button
|
||||
@@ -34,9 +53,9 @@
|
||||
size="small"
|
||||
:type="opt.button.type"
|
||||
v-bind="opt.bind"
|
||||
@click="handleBtnClick(opt.button.name)"
|
||||
>{{ opt.button.name }}</el-button
|
||||
>
|
||||
@click="handleBtnClick(opt.button.name)">
|
||||
{{ opt.button.name }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -61,21 +80,7 @@ export default {
|
||||
dataForm: {},
|
||||
};
|
||||
},
|
||||
|
||||
// 这个 watch 出现得没啥必要......
|
||||
// watch: {
|
||||
// dataForm: {
|
||||
// handler: (val) => {
|
||||
// console.log("[BaseSearchForm::watcher::dataForm]", val);
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
// },
|
||||
|
||||
created() {},
|
||||
mounted() {
|
||||
// console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
|
||||
|
||||
this.headConfig.fields.forEach((field, index) => {
|
||||
// 没有 field.prop ,则为按钮之类的
|
||||
if (!field.prop) return;
|
||||
|
||||
@@ -410,7 +410,7 @@ export default {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
|
||||
this.$emit("refreshDataList");
|
||||
if (method === "POST") this.handleClose();
|
||||
this.handleClose();
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
v-if="renderDialog"
|
||||
fullscreen
|
||||
:configs="dialogConfig"
|
||||
@destroy-dialog="renderDialog = false" />
|
||||
@destroy-dialog="renderDialog = false"
|
||||
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
|
||||
|
||||
<DialogWithMenu
|
||||
modal-append-to-body
|
||||
@@ -43,7 +44,8 @@
|
||||
v-if="renderMenuDialog"
|
||||
fullscreen
|
||||
:configs="dialogConfig"
|
||||
@destroy-dialog="renderMenuDialog = false" />
|
||||
@destroy-dialog="renderMenuDialog = false"
|
||||
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
|
||||
|
||||
<DialogUpload
|
||||
ref="uploadDialog"
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
<template>
|
||||
<div class="main-container">
|
||||
<!-- <div class="inner-sidebar">
|
||||
<a href="#ongoing" :class="{ active: activeTable === '#ongoing' }" @click.prevent="scrollTo('#ongoing')">进行中的订单</a>
|
||||
<a href="#pending" :class="{ active: activeTable === '#pending' }" @click.prevent="scrollTo('#pending')">等待订单</a>
|
||||
<a href="#finished" :class="{ active: activeTable === '#finished' }" @click.prevent="scrollTo('#finished')">完成订单</a>
|
||||
</div> -->
|
||||
|
||||
<div class="list-view-with-head-list">
|
||||
<!-- <ListViewWithHead :table-configs="tableConfigs" :head-configs="headFormConfigs" :dialog-configs="dialogConfigs" /> -->
|
||||
<ListSectionWithHead
|
||||
id="ongoing"
|
||||
:refresh-key="keys.ongoing"
|
||||
@@ -40,29 +33,15 @@
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div style="padding: 16px; background: #fff; border-radius: 8px">
|
||||
<el-table :data="dataList">
|
||||
<el-table-column key="id" prop="id" label="ID"></el-table-column>
|
||||
<el-table-column key="name" prop="name" label="名字"></el-table-column>
|
||||
<el-table-column key="age" prop="age" label="年龄"></el-table-column>
|
||||
<el-table-column key="opt" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click.native.prevent="handleUp(scope)">up</el-button>
|
||||
<el-button @click.native.prevent="handleDown(scope)">down</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initConfig from "./config";
|
||||
import ListViewWithHead from "./components/ListViewWithHead.vue";
|
||||
// import ListViewWithHead from "./components/ListViewWithHead.vue";
|
||||
import ListSectionWithHead from "./components/ListSectionWithHead.vue";
|
||||
export default {
|
||||
name: "OrderView",
|
||||
components: { ListViewWithHead, ListSectionWithHead },
|
||||
components: { ListSectionWithHead },
|
||||
provide() {
|
||||
return {
|
||||
urls: this.allUrls,
|
||||
@@ -82,16 +61,6 @@ export default {
|
||||
finished: Math.random().toString(),
|
||||
},
|
||||
};
|
||||
// return {
|
||||
// dataList: [
|
||||
// { id: 1, name: "张三", age: 12 },
|
||||
// { id: 2, name: "李四", age: 13 },
|
||||
// { id: 3, name: "王五", age: 14 },
|
||||
// { id: 4, name: "陈鼻", age: 15 },
|
||||
// { id: 5, name: "肖上唇", age: 16 },
|
||||
// ],
|
||||
// limit: 20
|
||||
// };
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
@@ -110,22 +79,7 @@ export default {
|
||||
behavior: 'smooth'
|
||||
})
|
||||
},
|
||||
// handleUp({ $index, row }) {
|
||||
// console.log("row: ", $index, row);
|
||||
// if ($index === 0) return;
|
||||
// const [item] = this.dataList.splice($index, 1);
|
||||
// console.log("item: ", item);
|
||||
// this.dataList.splice($index - 1, 0, item);
|
||||
// console.log("dataList: ", this.dataList);
|
||||
// // this.dataList
|
||||
// },
|
||||
// handleDown({ $index, row }) {
|
||||
// // const { id } = row;
|
||||
// if ($index === this.limit) return;
|
||||
// const [item] = this.dataList.splice($index, 1);
|
||||
// this.dataList.splice($index + 1, 0, item);
|
||||
// },
|
||||
//
|
||||
|
||||
handleRefreshTable(tableNameList) {
|
||||
if (Array.isArray(tableNameList)) {
|
||||
tableNameList.forEach(name => {
|
||||
|
||||
Reference in New Issue
Block a user