yuang-framework-ui-pc
Version:
yuang-framework-ui-pc Library
167 lines (166 loc) • 6.51 kB
JavaScript
"use strict";
const vue = require("vue");
const iconsVue = require("@element-plus/icons-vue");
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "user-query",
emits: ["query"],
setup(__props, { expose: __expose, emit: __emit }) {
const emit = __emit;
const getInitQueryForm = () => {
return {
account: "",
name: "",
isRecursiveOrganization: false
};
};
const queryForm = vue.ref(getInitQueryForm());
const queryPage = () => {
emit("query");
};
const reset = () => {
queryForm.value = getInitQueryForm();
queryPage();
};
__expose({ queryForm });
return (_ctx, _cache) => {
const _component_el_input = vue.resolveComponent("el-input");
const _component_el_form_item = vue.resolveComponent("el-form-item");
const _component_el_col = vue.resolveComponent("el-col");
const _component_el_radio = vue.resolveComponent("el-radio");
const _component_el_radio_group = vue.resolveComponent("el-radio-group");
const _component_el_button = vue.resolveComponent("el-button");
const _component_el_row = vue.resolveComponent("el-row");
const _component_el_form = vue.resolveComponent("el-form");
return vue.openBlock(), vue.createBlock(_component_el_form, {
"label-width": "72px",
onKeyup: vue.withKeys(vue.withModifiers(queryPage, ["prevent"]), ["enter"]),
onSubmit: _cache[3] || (_cache[3] = vue.withModifiers(() => {
}, ["prevent"]))
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_row, { gutter: 8 }, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_col, {
lg: 6,
md: 8,
sm: 12,
xs: 24
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_form_item, { label: "用户账号" }, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_input, {
clearable: "",
modelValue: queryForm.value.account,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryForm.value.account = $event),
modelModifiers: { trim: true },
placeholder: "请输入用户账号"
}, null, 8, ["modelValue"])
]),
_: 1
})
]),
_: 1
}),
vue.createVNode(_component_el_col, {
lg: 6,
md: 8,
sm: 12,
xs: 24
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_form_item, { label: "用户名称" }, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_input, {
clearable: "",
modelValue: queryForm.value.name,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => queryForm.value.name = $event),
modelModifiers: { trim: true },
placeholder: "请输入用户名称"
}, null, 8, ["modelValue"])
]),
_: 1
})
]),
_: 1
}),
vue.createVNode(_component_el_col, {
lg: 6,
md: 8,
sm: 12,
xs: 24
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_form_item, { label: "递归机构" }, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_radio_group, {
modelValue: queryForm.value.isRecursiveOrganization,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => queryForm.value.isRecursiveOrganization = $event),
class: "yu-radio-group"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_radio, {
value: true,
label: "是"
}),
vue.createVNode(_component_el_radio, {
value: false,
label: "否"
})
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
})
]),
_: 1
}),
vue.createVNode(_component_el_col, {
lg: 6,
md: 8,
sm: 24,
xs: 24
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_form_item, { "label-width": "16px" }, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_button, {
type: "primary",
icon: vue.unref(iconsVue.Search),
class: "ele-btn-icon",
onClick: queryPage
}, {
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
vue.createTextVNode("查询")
])),
_: 1,
__: [4]
}, 8, ["icon"]),
vue.createVNode(_component_el_button, {
icon: vue.unref(iconsVue.RefreshRight),
class: "ele-btn-icon",
onClick: reset
}, {
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
vue.createTextVNode("重置")
])),
_: 1,
__: [5]
}, 8, ["icon"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}, 8, ["onKeyup"]);
};
}
});
module.exports = _sfc_main;