Merge branch 'bjxz-dev' of http://139.9.66.234:18023/kun/mobile-workflow into bjxz-dev

This commit is contained in:
kun 2024-06-14 20:07:33 +08:00
commit c7c59e1d03
10 changed files with 105839 additions and 28 deletions

View File

@ -122,10 +122,29 @@
}, },
validate(call) { validate(call) {
this.$refs['wflowForm'].validate().then(res => { this.$refs['wflowForm'].validate().then(res => {
call(true) const dataList = Object.values(this.modelValue);
console.log('表单数据信息:', res); const result = dataList[0][dataList[0].length - 1];
// console.log(4444444, JSON.stringify(this.modelValue))
const flag = this.formFields[this.formFields.length - 1].props.columns.every((v, i)=> {
if((i == this.formFields[this.formFields.length - 1].props.columns.length - 1) && result[v.id]){
if(result[v.id][0].id){
return true
} else {
// console.log(22222, JSON.stringify(v.props.columns))
return v.props.columns.every(e => {
// console.log(1111111, e.props.required,e.id, JSON.stringify(result[e.id]), JSON.stringify(result[v.id]))
return e.props.required == false || (e.props.required == true && result[v.id][0][e.id] != null&& result[v.id][0][e.id] != undefined);
})
}
return
}
return v.props.required == false || (v.props.required == true && result[v.id] != null);
});
// console.log(3333333, flag)
call(flag)
console.log('表单数据信息:', JSON.stringify(res));
}).catch(err => { }).catch(err => {
// call(false) call(false)
console.log('表单错误信息:', err); console.log('表单错误信息:', err);
}) })
}, },

View File

@ -166,6 +166,7 @@
if (res.confirm) { if (res.confirm) {
this._value.splice(i, 1) this._value.splice(i, 1)
this._value = this._value this._value = this._value
this.resize()
setTimeout(() => uni.$emit('showFp'), 500) setTimeout(() => uni.$emit('showFp'), 500)
} }
} }

View File

@ -135,6 +135,7 @@
if (formValid) { if (formValid) {
process.value.validate(processValid => { process.value.validate(processValid => {
if (processValid) { if (processValid) {
// return
doSubmit() doSubmit()
} else { } else {
current.value = 1 current.value = 1

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,15 @@
{ {
"hash": "6ab18a53", "hash": "0f0fbf16",
"configHash": "87e744e2", "configHash": "5bd87843",
"lockfileHash": "2ddd0eeb", "lockfileHash": "33a33614",
"browserHash": "9b038b87", "browserHash": "ba16bf7f",
"optimized": {}, "optimized": {
"@icon-park/vue-next": {
"src": "../../../../../node_modules/@icon-park/vue-next/es/index.js",
"file": "@icon-park_vue-next.js",
"fileHash": "9de4363e",
"needsInterop": false
}
},
"chunks": {} "chunks": {}
} }

View File

@ -1198,7 +1198,7 @@ if (uni.restoreGlobal) {
/* CLASS */ /* CLASS */
); );
} }
const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$v], ["__scopeId", "data-v-26544265"], ["__file", "D:/jxj/mobile-workflow/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"]]); const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$v], ["__scopeId", "data-v-26544265"], ["__file", "D:/jxj/mobile-workflow/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"]]);
const isObject$1 = (val) => val !== null && typeof val === "object"; const isObject$1 = (val) => val !== null && typeof val === "object";
const defaultDelimiters = ["{", "}"]; const defaultDelimiters = ["{", "}"];
class BaseFormatter { class BaseFormatter {
@ -1716,7 +1716,7 @@ if (uni.restoreGlobal) {
)) : vue.createCommentVNode("v-if", true) )) : vue.createCommentVNode("v-if", true)
]); ]);
} }
const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$u], ["__scopeId", "data-v-f07ef577"], ["__file", "D:/jxj/mobile-workflow/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue"]]); const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$u], ["__scopeId", "data-v-f07ef577"], ["__file", "D:/jxj/mobile-workflow/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue"]]);
const _sfc_main$1a = { const _sfc_main$1a = {
data() { data() {
return { return {
@ -3765,8 +3765,8 @@ if (uni.restoreGlobal) {
close close
}); });
return (_ctx, _cache) => { return (_ctx, _cache) => {
const _component_uni_nav_bar = resolveEasycom(vue.resolveDynamicComponent("uni-nav-bar"), __easycom_0$9); const _component_uni_nav_bar = resolveEasycom(vue.resolveDynamicComponent("uni-nav-bar"), __easycom_0$8);
const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$8); const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_1$8);
const _component_uni_breadcrumb_item = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb-item"), __easycom_1$7); const _component_uni_breadcrumb_item = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb-item"), __easycom_1$7);
const _component_uni_breadcrumb = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb"), __easycom_2$3); const _component_uni_breadcrumb = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb"), __easycom_2$3);
const _component_uni_tag = resolveEasycom(vue.resolveDynamicComponent("uni-tag"), __easycom_0$7); const _component_uni_tag = resolveEasycom(vue.resolveDynamicComponent("uni-tag"), __easycom_0$7);
@ -5883,7 +5883,7 @@ if (uni.restoreGlobal) {
uni.setStorageSync("recentlyUsed", recentlyUsed.value); uni.setStorageSync("recentlyUsed", recentlyUsed.value);
} }
return (_ctx, _cache) => { return (_ctx, _cache) => {
const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$8); const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_1$8);
const _component_l_icon = resolveEasycom(vue.resolveDynamicComponent("l-icon"), __easycom_1$4); const _component_l_icon = resolveEasycom(vue.resolveDynamicComponent("l-icon"), __easycom_1$4);
const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_3$1); const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_3$1);
const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_4); const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_4);
@ -6275,7 +6275,7 @@ if (uni.restoreGlobal) {
} }
}); });
return (_ctx, _cache) => { return (_ctx, _cache) => {
const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$8); const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_1$8);
const _component_uni_breadcrumb_item = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb-item"), __easycom_1$7); const _component_uni_breadcrumb_item = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb-item"), __easycom_1$7);
const _component_uni_breadcrumb = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb"), __easycom_2$3); const _component_uni_breadcrumb = resolveEasycom(vue.resolveDynamicComponent("uni-breadcrumb"), __easycom_2$3);
const _component_uni_tag = resolveEasycom(vue.resolveDynamicComponent("uni-tag"), __easycom_0$7); const _component_uni_tag = resolveEasycom(vue.resolveDynamicComponent("uni-tag"), __easycom_0$7);
@ -18480,7 +18480,8 @@ ${i3}
return []; return [];
} }
}, },
readonly: Boolean readonly: Boolean,
title: String
}, },
emits: ["update:modelValue", "resize"], emits: ["update:modelValue", "resize"],
setup(__props, { emit: __emit }) { setup(__props, { emit: __emit }) {
@ -18511,9 +18512,13 @@ ${i3}
const emits2 = __emit; const emits2 = __emit;
const loading = vue.ref(false); const loading = vue.ref(false);
const dataOptions = vue.ref([]); const dataOptions = vue.ref([]);
const dataOptions2 = vue.ref([]);
let preHandlerFuc = null; let preHandlerFuc = null;
let aftHandlerFuc = null; let aftHandlerFuc = null;
const optionsKeyMap = { text: "name", value: "value" }; const optionsKeyMap = {
text: "name",
value: "value"
};
const index2 = vue.ref(0); const index2 = vue.ref(0);
function loadOptionsData() { function loadOptionsData() {
try { try {
@ -18523,9 +18528,14 @@ ${i3}
doRequest(dataOptions.value); doRequest(dataOptions.value);
} }
} catch (e2) { } catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:101", e2); formatAppLog("log", "at components/form/SelectPlus.vue:124", e2);
} }
} }
vue.watch(() => dataOptions, () => {
dataOptions2.value = dataOptions.value;
}, {
deep: true
});
vue.onMounted(() => { vue.onMounted(() => {
loadOptionsData(); loadOptionsData();
}); });
@ -18537,6 +18547,34 @@ ${i3}
__value.value = dataOptions.value[index2.value].value; __value.value = dataOptions.value[index2.value].value;
resizeCollapse(); resizeCollapse();
} }
function ok2(e2) {
const id = dataOptions2.value[e2.detail.value].value;
const findIndex = dataOptions.value.findIndex((item) => item.value == id);
if (findIndex > -1) {
index2.value = findIndex;
__value.value = dataOptions.value[findIndex].value;
resizeCollapse();
isSearch.value = false;
}
}
const isSearch = vue.ref(false);
const searchValue = vue.ref("");
function searchChange(e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:165", e2);
let findList = dataOptions.value.filter((item) => item.name.includes(e2));
dataOptions2.value = findList;
if (e2 == "") {
dataOptions2.value = dataOptions.value;
}
}
const onCancel = () => {
isSearch.value = false;
};
const isSearchFn = () => {
setTimeout(() => {
isSearch.value = true;
}, 500);
};
function doRequest(options) { function doRequest(options) {
const http = props2.formProps.http || {}; const http = props2.formProps.http || {};
if (http.url && http.method) { if (http.url && http.method) {
@ -18552,7 +18590,10 @@ ${i3}
}; };
preHandler(params, http.preHandler); preHandler(params, http.preHandler);
if (http.contentType !== "JSON") { if (http.contentType !== "JSON") {
params.data = { ...params.data, ...params.params }; params.data = {
...params.data,
...params.params
};
} }
loading.value = true; loading.value = true;
uni.request({ uni.request({
@ -18596,7 +18637,7 @@ ${i3}
try { try {
preHandlerFuc(params); preHandlerFuc(params);
} catch (e2) { } catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:180", e2); formatAppLog("log", "at components/form/SelectPlus.vue:250", e2);
} }
} }
} }
@ -18643,13 +18684,14 @@ ${i3}
try { try {
return aftHandlerFuc(rsp) || []; return aftHandlerFuc(rsp) || [];
} catch (e2) { } catch (e2) {
formatAppLog("log", "at components/form/SelectPlus.vue:237", e2); formatAppLog("log", "at components/form/SelectPlus.vue:307", e2);
} }
} }
return []; return [];
} }
return (_ctx, _cache) => { return (_ctx, _cache) => {
const _component_uni_data_checkbox = resolveEasycom(vue.resolveDynamicComponent("uni-data-checkbox"), __easycom_1$2); const _component_uni_data_checkbox = resolveEasycom(vue.resolveDynamicComponent("uni-data-checkbox"), __easycom_1$2);
const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_1$8);
return vue.openBlock(), vue.createElementBlock("view", null, [ return vue.openBlock(), vue.createElementBlock("view", null, [
!__props.readonly ? (vue.openBlock(), vue.createElementBlock( !__props.readonly ? (vue.openBlock(), vue.createElementBlock(
vue.Fragment, vue.Fragment,
@ -18695,14 +18737,44 @@ ${i3}
{ key: 2 }, { key: 2 },
[ [
vue.createCommentVNode(" 单选 "), vue.createCommentVNode(" 单选 "),
vue.createCommentVNode(" title == '司机姓名' "),
__props.formProps.expanding ? (vue.openBlock(), vue.createBlock(_component_uni_data_checkbox, { __props.formProps.expanding ? (vue.openBlock(), vue.createBlock(_component_uni_data_checkbox, {
key: 0, key: 0,
map: optionsKeyMap, map: optionsKeyMap,
modelValue: __value.value, modelValue: __value.value,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __value.value = $event), "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __value.value = $event),
localdata: dataOptions.value localdata: dataOptions.value
}, null, 8, ["modelValue", "localdata"])) : (vue.openBlock(), vue.createElementBlock("picker", { }, null, 8, ["modelValue", "localdata"])) : __props.title == "司机姓名" ? (vue.openBlock(), vue.createElementBlock("picker", {
key: 1, key: 1,
class: "picker",
onCancel,
onChange: ok2,
mode: "selector",
value: index2.value,
"range-key": "name",
range: dataOptions2.value
}, [
isSearch.value ? (vue.openBlock(), vue.createBlock(_component_uni_search_bar, {
key: 0,
bgColor: "#fff",
modelValue: searchValue.value,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => searchValue.value = $event),
class: "search",
radius: "5",
placeholder: "请输入",
clearButton: "auto",
cancelButton: "none",
onInput: searchChange
}, null, 8, ["modelValue"])) : vue.createCommentVNode("v-if", true),
vue.createVNode(ClickInput, {
onClick: _cache[4] || (_cache[4] = ($event) => isSearchFn()),
value: (__props.modelValue || []).length > 0 ? dataOptions.value[index2.value] : null,
index: "name",
placeholder: __props.formProps.placeholder || "请选择"
}, null, 8, ["value", "placeholder"])
], 40, ["value", "range"])) : (vue.openBlock(), vue.createElementBlock("picker", {
key: 2,
class: "picker",
onChange: ok, onChange: ok,
mode: "selector", mode: "selector",
value: index2.value, value: index2.value,
@ -18746,7 +18818,7 @@ ${i3}
}; };
} }
}; };
const SelectPlus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "D:/jxj/mobile-workflow/components/form/SelectPlus.vue"]]); const SelectPlus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-efe1296e"], ["__file", "D:/jxj/mobile-workflow/components/form/SelectPlus.vue"]]);
const _sfc_main$j = { const _sfc_main$j = {
__name: "Location", __name: "Location",
props: { props: {
@ -32046,7 +32118,8 @@ ${i3}
return {}; return {};
} }
}, },
readonly: Boolean readonly: Boolean,
title: String
}, },
computed: { computed: {
_value: { _value: {
@ -32227,12 +32300,13 @@ ${i3}
}, null, 8, ["modelValue", "form-props", "readonly", "formData"])) : $props.type === "SelectPlus" ? (vue.openBlock(), vue.createBlock(_component_SelectPlus, { }, null, 8, ["modelValue", "form-props", "readonly", "formData"])) : $props.type === "SelectPlus" ? (vue.openBlock(), vue.createBlock(_component_SelectPlus, {
key: 18, key: 18,
onResize: _cache[21] || (_cache[21] = ($event) => _ctx.$emit("resize")), onResize: _cache[21] || (_cache[21] = ($event) => _ctx.$emit("resize")),
title: $props.title,
modelValue: $options._value, modelValue: $options._value,
"onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $options._value = $event), "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $options._value = $event),
"form-props": $props.formProps, "form-props": $props.formProps,
readonly: $props.readonly, readonly: $props.readonly,
formData: $props.formData formData: $props.formData
}, null, 8, ["modelValue", "form-props", "readonly", "formData"])) : $props.type === "Location" ? (vue.openBlock(), vue.createBlock(_component_Location, { }, null, 8, ["title", "modelValue", "form-props", "readonly", "formData"])) : $props.type === "Location" ? (vue.openBlock(), vue.createBlock(_component_Location, {
key: 19, key: 19,
modelValue: $options._value, modelValue: $options._value,
"onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $options._value = $event), "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $options._value = $event),
@ -32473,10 +32547,24 @@ ${i3}
}, },
validate(call) { validate(call) {
this.$refs["wflowForm"].validate().then((res) => { this.$refs["wflowForm"].validate().then((res) => {
call(true); const dataList = Object.values(this.modelValue);
formatAppLog("log", "at components/FormRender.vue:125", "表单数据信息:", res); const result = dataList[0][dataList[0].length - 1];
const flag = this.formFields[this.formFields.length - 1].props.columns.every((v2, i2) => {
if (i2 == this.formFields[this.formFields.length - 1].props.columns.length - 1 && result[v2.id]) {
if (result[v2.id][0].id) {
return true;
} else {
return v2.props.columns.every((e2) => {
return e2.props.required == false || e2.props.required == true && result[v2.id][0][e2.id] != null && result[v2.id][0][e2.id] != void 0;
});
}
}
return v2.props.required == false || v2.props.required == true && result[v2.id] != null;
});
call(flag);
formatAppLog("log", "at components/FormRender.vue:145", "表单数据信息:", JSON.stringify(res));
}).catch((err) => { }).catch((err) => {
formatAppLog("log", "at components/FormRender.vue:128", "表单错误信息:", err); formatAppLog("log", "at components/FormRender.vue:148", "表单错误信息:", err);
}); });
}, },
loadFormItemMap(forms, map) { loadFormItemMap(forms, map) {
@ -32707,12 +32795,13 @@ ${i3}
default: vue.withCtx(() => [ default: vue.withCtx(() => [
vue.createVNode(_component_w_form_item, { vue.createVNode(_component_w_form_item, {
type: item.name, type: item.name,
title: item.title,
modelValue: $options._value[item.id], modelValue: $options._value[item.id],
"onUpdate:modelValue": ($event) => $options._value[item.id] = $event, "onUpdate:modelValue": ($event) => $options._value[item.id] = $event,
"form-props": item.props, "form-props": item.props,
readonly: item.perm !== "E", readonly: item.perm !== "E",
formData: $options._value formData: $options._value
}, null, 8, ["type", "modelValue", "onUpdate:modelValue", "form-props", "readonly", "formData"]) }, null, 8, ["type", "title", "modelValue", "onUpdate:modelValue", "form-props", "readonly", "formData"])
]), ]),
_: 2 _: 2
/* DYNAMIC */ /* DYNAMIC */

View File

@ -3453,6 +3453,23 @@ body[data-v-029c2886] {
border-bottom: none; border-bottom: none;
} }
/* .picker {
position: relative;
} */
.search[data-v-efe1296e] {
position: fixed;
bottom: 15.78125rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;
border: 0.0625rem solid #f5f5f5;
}
/** /**
* 这里是uni-app内置的常用样式变量 * 这里是uni-app内置的常用样式变量
* *

View File

@ -3388,6 +3388,23 @@ body[data-v-029c2886] {
border-bottom: none; border-bottom: none;
} }
/* .picker {
position: relative;
} */
.search[data-v-efe1296e] {
position: fixed;
bottom: 15.78125rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;
border: 0.0625rem solid #f5f5f5;
}
/** /**
* 这里是uni-app内置的常用样式变量 * 这里是uni-app内置的常用样式变量
* *

View File

@ -3454,6 +3454,23 @@ body[data-v-029c2886] {
border-bottom: none; border-bottom: none;
} }
/* .picker {
position: relative;
} */
.search[data-v-efe1296e] {
position: fixed;
bottom: 15.78125rem;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
padding:0;
}
.search[data-v-efe1296e] .uni-searchbar__box {
width: 12.5rem;
border: 0.0625rem solid #f5f5f5;
}
/** /**
* 这里是uni-app内置的常用样式变量 * 这里是uni-app内置的常用样式变量
* *