update scroll effect

Cette révision appartient à :
lb 2023-03-10 15:14:55 +08:00
Parent 1e6cb676aa
révision c4b8a642ea
5 fichiers modifiés avec 25 ajouts et 20 suppressions

Voir le fichier

@ -72,7 +72,7 @@ export default {
created() {},
mounted() {
console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
// console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
this.headConfig.fields.forEach((field, index) => {
// field.prop

Voir le fichier

@ -81,7 +81,7 @@
<script>
import { pick as __pick } from "@/utils/filters";
import Cookies, { get } from "js-cookie";
import Cookies from "js-cookie";
import moment from "moment";
export default {
@ -112,7 +112,7 @@ export default {
if (col.fetchData)
col.fetchData().then(({ data: res }) => {
console.log("[DialogJustForm fetchData -->]", res.data.list);
// console.log("[DialogJustForm fetchData -->]", res.data.list);
if (res.code === 0 && res.data.list) {
if ("injectTo" in col) {
//
@ -136,7 +136,7 @@ export default {
else if (col.fetchTreeData) {
// parentId 0
col.fetchTreeData().then(({ data: res }) => {
console.log("[DialogJustForm fetchTreeData -->]", res.data);
// console.log("[DialogJustForm fetchTreeData -->]", res.data);
if (res.code === 0 && res.data) {
if ("list" in res.data) {
this.$set(col, "options", res.data.list);
@ -165,7 +165,7 @@ export default {
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
if ("injectTo" in col && Array.isArray(col.injectTo)) {
console.log("watching options ..... ", col);
// console.log("watching options ..... ", col);
col.injectTo.map((item) => {
const unwatch = this.$watch(
() => this.dataForm[col.prop],
@ -230,7 +230,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[DialogJustForm resetForm()] clearing form...");
// console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
this.watchList.map((unwatch) => unwatch());
@ -304,17 +304,17 @@ export default {
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
// console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
if ("parentId" in this.dataForm) {
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -369,7 +369,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
// console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -394,7 +394,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
// console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -415,7 +415,7 @@ export default {
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
// console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

Voir le fichier

@ -335,7 +335,7 @@ export default {
this.renderDialog = true;
this.$nextTick(() => {
console.log("init dialog", row_id, detail_mode);
// console.log("init dialog", row_id, detail_mode);
this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
});
},

Voir le fichier

@ -188,10 +188,6 @@ export default function () {
orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"],
};
},
methods: {},
mounted() {
console.log("this.modelValue", this.modelValue);
},
render: function (h) {
return h(
"span",
@ -320,6 +316,7 @@ export default function () {
prop: "press",
options: [],
optionLabel: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
elparams: { placeholder: "请选择压机号", filterable: true },
},
@ -368,6 +365,7 @@ export default function () {
prop: "blender",
options: [],
optionLabel: "code",
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
fetchData: () => this.$http.get("/pms/equipment/page", { params: { limit: 999, page: 1, name: "" } }),
elparams: { placeholder: "请选择混料机号", filterable: true },
},

Voir le fichier

@ -1,9 +1,9 @@
<template>
<div class="main-container">
<div class="inner-sidebar">
<a href="#ongoing" :class="{ active: activeTable === '#ongoing' }">进行中的订单</a>
<a href="#pending" :class="{ active: activeTable === '#pending' }">等待订单</a>
<a href="#finished" :class="{ active: activeTable === '#finished' }">完成订单</a>
<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">
@ -103,6 +103,13 @@ export default {
},
},
methods: {
scrollTo(pos) {
const el = document.querySelector(pos)
window.scrollTo({
top: el.offsetTop - 16,
behavior: 'smooth'
})
},
// handleUp({ $index, row }) {
// console.log("row: ", $index, row);
// if ($index === 0) return;