bugfix 解决一部分0703反馈bug

Bu işleme şunda yer alıyor:
lb 2023-07-04 14:18:08 +08:00
ebeveyn f4be2d1efe
işleme 9c3133aa29
12 değiştirilmiş dosya ile 104 ekleme ve 119 silme

Dosyayı Görüntüle

@ -39,8 +39,9 @@
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script>
<% } %>

Dosyayı Görüntüle

@ -8,20 +8,40 @@
: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
@ -30,9 +50,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>
</el-row>

Dosyayı Görüntüle

@ -4,7 +4,7 @@
:visible="dialogVisible"
:destroy-on-close="false"
@close="handleClose"
:close-on-click-modal="configs.clickModalToClose ?? true">
:close-on-click-modal="configs.clickModalToClose ?? false">
<!-- title -->
<div slot="title" class="dialog-title">
<h1 class="">
@ -497,16 +497,18 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
console.log('reset form, key', key)
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
else this.dataForm[key] = null;
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
else this.$set(this.dataForm, key, null)
if (Array.isArray(this.fileList)) {
this.fileList = [];
}
});
this.activeMenu = this.configs.menu[0].name;
this.$refs.dataForm[0].clearValidate();
this.$refs.dataForm[0].resetFields();
console.log("清除Form...", this.dataForm);
},
immediate ? 0 : 200
);

Dosyayı Görüntüle

@ -103,18 +103,20 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
console.log('va', val)
this.deleteHandle(val.data.id, val.data.name)
}
},
// 删除
deleteHandle(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
this.$confirm(`确定对删除 ${name}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
// this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
this.$http.delete(this.urlOptions.deleteURL + `/${id}`).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",

Dosyayı Görüntüle

@ -74,7 +74,7 @@ export function addDynamicRoute(routeParams, router) {
}
const router = new Router({
mode: 'history',
mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
routes: pageRoutes.concat(moduleRoutes)
})

Dosyayı Görüntüle

@ -274,7 +274,6 @@ export default {
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("删除成功!");
this.page = 1;
this.size =
"defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;

Dosyayı Görüntüle

@ -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;

Dosyayı Görüntüle

@ -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}`,

Dosyayı Görüntüle

@ -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"

Dosyayı Görüntüle

@ -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 => {

Dosyayı Görüntüle

@ -186,11 +186,13 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
console.log('========= HERE ===========')
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
console.log('========= THERE ===========')
this.visible = false
this.$emit('refreshDataList')
}

Dosyayı Görüntüle

@ -2,35 +2,33 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
@clickBtn="(payload) => handleClick({
type: payload.type,
data: {
...payload.data,
name: payload.data.username
}
})" />
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
:before-close="handleCancel">
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
</base-dialog>
</div>
@ -41,7 +39,7 @@
import basicPage from "@/mixins/basic-page";
import AddOrUpdate from "./user-add-or-update";
import i18n from "@/i18n";
import sysFilter from '@/filters/sys-filter'
import sysFilter from "@/filters/sys-filter";
const tableProps = [
{
prop: "username",
@ -62,12 +60,12 @@ const tableProps = [
{
prop: "gender",
label: i18n.t("user.gender"),
filter: sysFilter('sex'),
filter: sysFilter("sex"),
},
{
prop: "status",
label: i18n.t("user.status"),
filter: sysFilter('userStatus'),
filter: sysFilter("userStatus"),
},
{
prop: "createDate",
@ -121,7 +119,7 @@ export default {
components: {
AddOrUpdate,
},
methods:{
methods: {
//search-bar
buttonClick(val) {
switch (val.btnName) {
@ -131,14 +129,14 @@ export default {
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
this.addOrUpdateHandle();
break;
default:
console.log(val)
}
console.log(val);
}
},
}
},
};
</script>