mirror of
https://gitee.com/vben/vben-web.git
synced 2026-10-06 14:13:10 +08:00
index与edit增加常用方法ts支持
This commit is contained in:
+81
-38
@@ -1,72 +1,100 @@
|
||||
import request from '/@/utils/request';
|
||||
import {ElLoading, ElMessage} from "element-plus";
|
||||
|
||||
export const editInit = async (state: any, route: any) => {
|
||||
state.params = <any>route;
|
||||
let id = state.params.query?.id;
|
||||
interface IeditInit {
|
||||
state: any;
|
||||
route:any;
|
||||
}
|
||||
export const editInit = async (data:IeditInit) => {
|
||||
data.state.params = <any>data.route;
|
||||
let id = data.state.params.query?.id;
|
||||
if (id) {
|
||||
state.form = await request({
|
||||
url: state.url + '/one/' + id,
|
||||
data.state.form = await request({
|
||||
url: data.state.url + '/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
} else {
|
||||
state.form.avtag = true;
|
||||
data.state.form.avtag = true;
|
||||
}
|
||||
};
|
||||
|
||||
export const tabSave = async (formRef: any, state: any, proxy: any, route: any) => {
|
||||
const canSubmit = await checkSubmit(formRef);
|
||||
|
||||
interface ItabSave {
|
||||
state: any;
|
||||
formRef:any;
|
||||
proxy:any;
|
||||
route:any;
|
||||
iouField?: string;
|
||||
}
|
||||
export const tabSave = async (data:ItabSave) => {
|
||||
const canSubmit = await checkSubmit(data.formRef);
|
||||
if (!canSubmit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!state.form.id) {
|
||||
if(!data.iouField){
|
||||
data.iouField = "id";
|
||||
}
|
||||
if (!data.state.form[data.iouField]) {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'post',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
});
|
||||
} else {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'put',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
});
|
||||
}
|
||||
tabClose(proxy, route);
|
||||
tabClose({proxy:data.proxy, route:data.route});
|
||||
};
|
||||
|
||||
export const tabClose = (proxy: any, route: any) => {
|
||||
proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, {contextMenuClickId: 1, ...route}));
|
||||
interface ItabClose {
|
||||
proxy:any;
|
||||
route:any;
|
||||
}
|
||||
export const tabClose = (data:ItabClose) => {
|
||||
data.proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, {contextMenuClickId: 1, ...data.route}));
|
||||
};
|
||||
|
||||
export const pageSave = async (formRef: any, state: any) => {
|
||||
|
||||
interface IpageSave {
|
||||
state: any;
|
||||
formRef:any;
|
||||
iouField?: string;
|
||||
}
|
||||
|
||||
export const pageSave = async (data:IpageSave) => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
fullscreen: true,
|
||||
text:'',
|
||||
background: 'rgba(0, 0, 0, 0.1)',
|
||||
});
|
||||
const canSubmit = await checkSubmit(formRef);
|
||||
const canSubmit = await checkSubmit(data.formRef);
|
||||
if (!canSubmit) {
|
||||
loading.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
let isSuccess=true;
|
||||
if (!state.form.crtim) {
|
||||
if(!data.iouField){
|
||||
data.iouField = "id";
|
||||
}
|
||||
if (!data.state.form[data.iouField]) {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'post',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
}).catch(() => {
|
||||
isSuccess=false;
|
||||
});
|
||||
} else {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'put',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
}).catch(() => {
|
||||
isSuccess=false;
|
||||
});
|
||||
@@ -91,38 +119,53 @@ export const pageClose = () => {
|
||||
window.close();
|
||||
};
|
||||
|
||||
export const drawerSave = async (formRef: any, state: any) => {
|
||||
const canSubmit = await checkSubmit(formRef);
|
||||
interface IdrawerSave {
|
||||
state: any;
|
||||
formRef:any;
|
||||
iouField?: string;
|
||||
}
|
||||
|
||||
export const drawerSave = async (data:IdrawerSave) => {
|
||||
const canSubmit = await checkSubmit(data.formRef);
|
||||
if (!canSubmit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!state.form.crtim) {
|
||||
if(!data.iouField){
|
||||
data.iouField = "id";
|
||||
}
|
||||
if (!data.state.form[data.iouField]) {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'post',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
});
|
||||
} else {
|
||||
await request({
|
||||
url: state.url,
|
||||
url: data.state.url,
|
||||
method: 'put',
|
||||
data: state.form,
|
||||
data: data.state.form,
|
||||
});
|
||||
}
|
||||
state.show = false;
|
||||
data.state.show = false;
|
||||
};
|
||||
|
||||
export const drawerOpen = async (state: any, id: string) => {
|
||||
if (id) {
|
||||
state.form = await request({
|
||||
url: state.url + '/one/' + id,
|
||||
|
||||
interface IdrawerOpen {
|
||||
state: any;
|
||||
id:string;
|
||||
}
|
||||
|
||||
export const drawerOpen = async (data:IdrawerOpen) => {
|
||||
if (data.id) {
|
||||
data.state.form = await request({
|
||||
url: data.state.url + '/one/' + data.id,
|
||||
method: 'get',
|
||||
});
|
||||
} else {
|
||||
state.form = {avtag: true};
|
||||
data.state.form = {avtag: true};
|
||||
}
|
||||
state.show = true;
|
||||
data.state.show = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -111,26 +111,26 @@ export const treeItemDelete = async (state: any, id: string) => {
|
||||
};
|
||||
|
||||
|
||||
export const tabAdd = (url: string,data:any) => {
|
||||
export const tabAdd = async (url: string,data?:any) => {
|
||||
if(!data){
|
||||
data = {};
|
||||
}
|
||||
data.uuid=uuid();
|
||||
router.push({
|
||||
await router.push({
|
||||
path: url + '/edit',
|
||||
query: data,
|
||||
});
|
||||
};
|
||||
|
||||
export const tabEdit = (url: string, id: string) => {
|
||||
router.push({
|
||||
export const tabEdit =async (url: string, id: string) => {
|
||||
await router.push({
|
||||
path: url + '/edit',
|
||||
query: { id: id },
|
||||
});
|
||||
};
|
||||
|
||||
export const tabView = (url: string, id: string) => {
|
||||
router.push({
|
||||
export const tabView =async (url: string, id: string) => {
|
||||
await router.push({
|
||||
path: url + '/view',
|
||||
query: { id: id },
|
||||
});
|
||||
|
||||
+94
-73
@@ -1,96 +1,117 @@
|
||||
import request from '/@/utils/request';
|
||||
import router from '/@/router';
|
||||
import {ElMessage,ElLoading} from "element-plus";
|
||||
import {ElMessage, ElLoading} from "element-plus";
|
||||
|
||||
import { ArrowDown } from '@element-plus/icons-vue';
|
||||
import {NextLoading} from "/@/utils/loading";
|
||||
// import { ArrowDown } from '@element-plus/icons-vue';
|
||||
// import {NextLoading} from "/@/utils/loading";
|
||||
|
||||
interface IviewInit {
|
||||
route: any;
|
||||
state: any;
|
||||
}
|
||||
|
||||
|
||||
export const viewInit = async (state: any, route: any) => {
|
||||
state.params = <any>route;
|
||||
let id = state.params.query?.id;
|
||||
if (id) {
|
||||
state.form = await request({
|
||||
url: state.url + '/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
} else {
|
||||
state.form = { avtag: true };
|
||||
}
|
||||
export const viewInit = async (data:IviewInit) => {
|
||||
data.state.params = <any>data.route;
|
||||
let id = data.state.params.query?.id;
|
||||
if (id) {
|
||||
data.state.form = await request({
|
||||
url: data.state.url + '/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
} else {
|
||||
data.state.form = {avtag: true};
|
||||
}
|
||||
};
|
||||
|
||||
export const tabEdit = async (state: any, proxy: any, route: any) => {
|
||||
tabClose(proxy, route);
|
||||
router.push({
|
||||
path: state.url + '/edit',
|
||||
query: { id: state.form.id },
|
||||
});
|
||||
interface IviewToEdit {
|
||||
proxy: any;
|
||||
route: any;
|
||||
state: any;
|
||||
}
|
||||
|
||||
export const viewToEdit = async (data: IviewToEdit) => {
|
||||
tabClose({proxy: data.proxy, route: data.route});
|
||||
await router.push({
|
||||
path: data.state.url + '/edit',
|
||||
query: {id: data.state.form.id},
|
||||
});
|
||||
};
|
||||
|
||||
export const tabClose = (proxy: any, route: any) => {
|
||||
proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
|
||||
|
||||
interface IviewTabClose {
|
||||
proxy: any;
|
||||
route: any;
|
||||
}
|
||||
|
||||
export const tabClose = (data: IviewTabClose) => {
|
||||
data.proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, {contextMenuClickId: 1, ...data.route}));
|
||||
};
|
||||
|
||||
|
||||
export const pageClose = () => {
|
||||
window.close();
|
||||
window.close();
|
||||
};
|
||||
|
||||
export const pageSave =async (formRef: any, state: any) => {
|
||||
let isSuccess=true;
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
fullscreen: true,
|
||||
spinner:'el-icon-loading',
|
||||
text:'',
|
||||
background: 'rgba(0, 0, 0, 0.1)',
|
||||
});
|
||||
|
||||
const canSubmit = await checkSubmit(formRef);
|
||||
if (!canSubmit) {
|
||||
loading.close();
|
||||
return false;
|
||||
}
|
||||
interface IviewPageSave {
|
||||
state: any;
|
||||
formRef: any;
|
||||
}
|
||||
|
||||
await request({
|
||||
url: state.url,
|
||||
method: 'put',
|
||||
data: state.form,
|
||||
}).catch(() => {
|
||||
isSuccess=false;
|
||||
});
|
||||
export const pageSave = async (data: IviewPageSave) => {
|
||||
let isSuccess = true;
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
fullscreen: true,
|
||||
spinner: 'el-icon-loading',
|
||||
text: '',
|
||||
background: 'rgba(0, 0, 0, 0.1)',
|
||||
});
|
||||
|
||||
if(isSuccess){
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: '保存成功,1秒后页面按自动关闭',
|
||||
type: 'success',
|
||||
duration:1000
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.close();
|
||||
}, 1000);
|
||||
}else{
|
||||
loading.close();
|
||||
}
|
||||
const canSubmit = await checkSubmit(data.formRef);
|
||||
if (!canSubmit) {
|
||||
loading.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
await request({
|
||||
url: data.state.url,
|
||||
method: 'put',
|
||||
data: data.state.form,
|
||||
}).catch(() => {
|
||||
isSuccess = false;
|
||||
});
|
||||
|
||||
if (isSuccess) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: '保存成功,1秒后页面按自动关闭',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.close();
|
||||
}, 1000);
|
||||
} else {
|
||||
loading.close();
|
||||
}
|
||||
};
|
||||
|
||||
const checkSubmit = async (formRef: any) => {
|
||||
let canSubmit = false;
|
||||
await formRef.validate((valid: any, fields: any) => {
|
||||
if (valid) {
|
||||
canSubmit = true;
|
||||
} else {
|
||||
let msgs = "";
|
||||
for (const prop in fields) {
|
||||
for (let i = 0; i < fields[prop].length; i++) {
|
||||
msgs += fields[prop][i].message + "; "
|
||||
}
|
||||
}
|
||||
ElMessage.warning(msgs)
|
||||
}
|
||||
})
|
||||
return canSubmit;
|
||||
let canSubmit = false;
|
||||
await formRef.validate((valid: any, fields: any) => {
|
||||
if (valid) {
|
||||
canSubmit = true;
|
||||
} else {
|
||||
let msgs = "";
|
||||
for (const prop in fields) {
|
||||
for (let i = 0; i < fields[prop].length; i++) {
|
||||
msgs += fields[prop][i].message + "; "
|
||||
}
|
||||
}
|
||||
ElMessage.warning(msgs)
|
||||
}
|
||||
})
|
||||
return canSubmit;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<div style='line-height: 32px'>流程分类</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@@ -120,7 +120,7 @@ const save = async () => {
|
||||
form.value.zform = JSON.stringify(formData);
|
||||
form.value.zbpm = bpmRef.value.getOperateInfo();
|
||||
// alert(JSON.stringify(formData));
|
||||
await pageSave(formRef.value, state);
|
||||
await pageSave({formRef:formRef.value, state});
|
||||
}).catch(error => {
|
||||
ElMessage.error(error);
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<div style='line-height: 32px'>流程实例</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<!-- <el-button type='success' @click='tabEdit(state,proxy,route)' plain>编 辑</el-button>-->
|
||||
<el-button type='info' @click='pageClose()' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -62,7 +61,7 @@ export default { name: 'OaFlowMainView' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { tabEdit, pageSave, pageClose } from '/@/comps/page/view';
|
||||
import { pageSave, pageClose } from '/@/comps/page/view';
|
||||
import { useRoute } from 'vue-router';
|
||||
import BpmView from '/@/comps/bpm/view.vue';
|
||||
import request from '/@/utils/request';
|
||||
@@ -73,7 +72,6 @@ import Cookies from 'js-cookie';
|
||||
|
||||
const route = useRoute();
|
||||
const formRef = ref<FormInstance>();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/oa/flow/main',
|
||||
@@ -129,7 +127,7 @@ const submit = async (zbpm: any) => {
|
||||
vFormRef.value.getFormData().then(async formData => {
|
||||
form.value.zform = JSON.stringify(formData);
|
||||
console.log('submit');
|
||||
await pageSave(formRef.value, state);
|
||||
await pageSave({formRef:formRef.value, state});
|
||||
}).catch(error => {
|
||||
ElMessage.error(error);
|
||||
});
|
||||
|
||||
@@ -209,7 +209,7 @@ async function save(state: any) {
|
||||
form.value.vform = JSON.stringify(vFormRef.value.getFormJson());
|
||||
form.value.prxml = bpmn.xml;
|
||||
console.log(bpmn.xml);
|
||||
await pageSave(formRef.value, state);
|
||||
await pageSave({formRef:formRef.value, state});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ async function save(state: any) {
|
||||
form.value.vform = JSON.stringify(vform.value.getFormJson());
|
||||
form.value.prxml = bpmn.xml;
|
||||
console.log(bpmn.xml);
|
||||
await pageSave(formRef.value, state);
|
||||
await pageSave({formRef:formRef.value, state});
|
||||
}
|
||||
|
||||
const vform = ref();
|
||||
|
||||
@@ -170,7 +170,7 @@ onMounted(async () => {
|
||||
|
||||
|
||||
async function save(state: any) {
|
||||
await pageSave(formRef.value, state);
|
||||
await pageSave({formRef:formRef.value, state});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>代理商维护</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -134,7 +134,7 @@ const {form} = toRefs(state);
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' class='list-search' clearable @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain v-waves='purple'>查 询</el-button>
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams' />
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>客户维护</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -113,7 +113,7 @@ const {form} = toRefs(state);
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' class='list-search' clearable @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain v-waves='purple'>查 询</el-button>
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams' />
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>接口信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -90,7 +90,7 @@ const state = reactive({
|
||||
const {form} = toRefs(state);
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -134,7 +134,7 @@ const state = reactive({
|
||||
const {form, treeData} = toRefs(state);
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
await treeDataInit();
|
||||
|
||||
});
|
||||
@@ -163,7 +163,7 @@ const save = async () => {
|
||||
apis.push({id: node.id, name: node.name});
|
||||
}
|
||||
form.value.apis = apis;
|
||||
await tabSave(formRef.value, state, proxy, route);
|
||||
await tabSave({formRef:formRef.value, state, proxy, route});
|
||||
};
|
||||
//endregion
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='任务名称' width='300'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawerRef.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='开始时间' prop='sttim' width='160' />
|
||||
@@ -36,18 +36,18 @@
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
<DrawerView ref='drawer' @listQuery='listQuery(state)' />
|
||||
<View ref='drawerRef'/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Search, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import DrawerView from './view.vue';
|
||||
import View from './view.vue';
|
||||
import request from '/@/utils/request';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
const drawer = ref();
|
||||
const drawerRef = ref(null);
|
||||
|
||||
const state = reactive({
|
||||
url: '/sys/job/log', loading: true, ids: [],
|
||||
|
||||
@@ -63,7 +63,7 @@ const { form } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen(state, id);
|
||||
await drawerOpen({state, id});
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>定时任务信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -166,7 +166,7 @@ const state = reactive({
|
||||
const {form} = toRefs(state);
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
<DrawerView ref='drawer' @listQuery='listQuery(state)'/>
|
||||
<DrawerView ref='drawer'/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
|
||||
@@ -81,7 +81,7 @@ const { form } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen(state, id);
|
||||
await drawerOpen({state, id});
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<div style='line-height: 32px'>部门信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -129,7 +129,7 @@ onMounted(async () => {
|
||||
form.value.pname = pname;
|
||||
form.value.pid = pid;
|
||||
}
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
if (form.value.parent) {
|
||||
form.value.pname = form.value.parent.name;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='13'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable style='height: 32px;width: 200px;margin-right: 10px'
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search'
|
||||
@keyup.enter='listQuery(state)'/>
|
||||
<el-button type='primary' @click='listQuery(state)' :icon="Search" plain>查询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='11' style='text-align: right'>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url,{pid:state.form.pid,pname:state.form.pname})' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>群组信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -111,7 +111,7 @@ const state = reactive({
|
||||
const {form} = toRefs(state);
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>岗位信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -127,7 +127,7 @@ onMounted(async () => {
|
||||
form.value.deptid = deptid;
|
||||
form.value.deptna = deptna;
|
||||
}
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
if (form.value.dept) {
|
||||
form.value.deptna = form.value.dept.name;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<div style='line-height: 32px'>用户信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -163,7 +163,7 @@ onMounted(async () => {
|
||||
form.value.deptid = deptid;
|
||||
form.value.deptna = deptna;
|
||||
}
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
if (form.value.dept) {
|
||||
form.value.deptna = form.value.dept.name;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div style='line-height: 32px'>门户维护</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -125,7 +125,7 @@ const {form} = toRefs(state);
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit(state, route);
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' class='list-search' clearable @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain v-waves='purple'>查 询</el-button>
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
|
||||
@@ -175,7 +175,7 @@ const open = async (data: any) => {
|
||||
state.show = true;
|
||||
}
|
||||
} else if (data.id) {
|
||||
await drawerOpen(state, data.id);
|
||||
await drawerOpen({state, id:data.id});
|
||||
}
|
||||
};
|
||||
defineExpose({open});
|
||||
@@ -183,7 +183,7 @@ defineExpose({open});
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['treeQuery']);
|
||||
const confirm = async () => {
|
||||
await drawerSave(formRef.value, state);
|
||||
await drawerSave({formRef:formRef.value, state});
|
||||
emits('treeQuery');
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -197,7 +197,7 @@ const save = async () => {
|
||||
menus.push({id: node.id, name: node.name});
|
||||
}
|
||||
form.value.menus = menus;
|
||||
await tabSave(formRef.value, state, proxy, route);
|
||||
await tabSave({formRef:formRef.value, state, proxy, route});
|
||||
};
|
||||
//endregion
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<div style='line-height: 32px'>待办信息</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave(formRef,state,proxy,route)' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose(proxy,route)' plain>关 闭</el-button>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -64,8 +64,8 @@ const state = reactive({
|
||||
const {form} = toRefs(state);
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
editInit(state, route);
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>校验分配</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save()' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分配名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品系列:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.serid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品型号:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.modid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='校验分配' name='tab2'>
|
||||
<div style='margin-left: 15px;margin-right: 15px'>
|
||||
<el-table ref='listTableRef' :data='checks' style='width: 100%;height: 500px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<el-table-column prop='name' label='校验名称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column prop='notes' label='备注' />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotCheck' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/check', cates: [] as any,
|
||||
params: { path: '', query: '' }, checks: [] as any,
|
||||
form: { avtag: true, items: [] as any } as any,
|
||||
});
|
||||
|
||||
const { form, cates, checks } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
if (form.value.id) {
|
||||
await cateChange();
|
||||
} else {
|
||||
form.value.items = [];
|
||||
}
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
const listTableRef = ref();
|
||||
const save = async () => {
|
||||
form.value.items = [];
|
||||
for (let i = 0; i < listTableRef.value.getSelectionRows().length; i++) {
|
||||
form.value.items.push({ cheid: listTableRef.value.getSelectionRows()[i].id });
|
||||
}
|
||||
await tabSave({formRef:formRef.value,state, proxy, route});
|
||||
};
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const cateChange = async () => {
|
||||
checks.value = await request({
|
||||
url: '/te/allot/check/checks/',
|
||||
method: 'get',
|
||||
params: { id: form.value.catid },
|
||||
});
|
||||
|
||||
await nextTick(() => {
|
||||
checks.value.forEach((item: any) => {
|
||||
for (const fitem of form.value.items) {
|
||||
if (fitem.cheid == item.id) {
|
||||
listTableRef.value.toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分配名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='版本号' prop='venum' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotCheck' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/check', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>驱动分配</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save()' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分配名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品系列:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.serid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品型号:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.modid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='驱动分配' name='tab2'>
|
||||
<div style='margin-left: 15px;margin-right: 15px'>
|
||||
<el-table ref='listTableRef' :data='drives' style='width: 100%;height: 500px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<el-table-column prop='name' label='驱动称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column prop='notes' label='备注' />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotDrive' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/drive', cates: [] as any,
|
||||
params: { path: '', query: '' }, drives: [] as any,
|
||||
form: { avtag: true, items: [] as any } as any,
|
||||
});
|
||||
|
||||
const { form, cates, drives } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
if (form.value.id) {
|
||||
await cateChange();
|
||||
} else {
|
||||
form.value.items = [];
|
||||
}
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
const listTableRef = ref();
|
||||
const save = async () => {
|
||||
form.value.items = [];
|
||||
for (let i = 0; i < listTableRef.value.getSelectionRows().length; i++) {
|
||||
form.value.items.push({ driid: listTableRef.value.getSelectionRows()[i].id });
|
||||
}
|
||||
await tabSave({formRef:formRef.value,state, proxy, route});
|
||||
};
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const cateChange = async () => {
|
||||
drives.value = await request({
|
||||
url: '/te/allot/drive/drives/',
|
||||
method: 'get',
|
||||
params: { id: form.value.catid },
|
||||
});
|
||||
|
||||
await nextTick(() => {
|
||||
drives.value.forEach((item: any) => {
|
||||
for (const fitem of form.value.items) {
|
||||
if (fitem.driid == item.id) {
|
||||
listTableRef.value.toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分配名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='版本号' prop='venum' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotDrive' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/drive', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>联动分配</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save()' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分配名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品系列:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.serid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品型号:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.modid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='联动分配' name='tab2'>
|
||||
<div style='margin-left: 15px;margin-right: 15px'>
|
||||
<el-table ref='listTableRef' :data='links' style='width: 100%;height: 500px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<el-table-column prop='name' label='联动名称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column prop='notes' label='备注' />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotLink' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/link', cates: [] as any,
|
||||
params: { path: '', query: '' }, links: [] as any,
|
||||
form: { avtag: true, items: [] as any } as any,
|
||||
});
|
||||
|
||||
const { form, cates, links } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
if (form.value.id) {
|
||||
await cateChange();
|
||||
} else {
|
||||
form.value.items = [];
|
||||
}
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
const listTableRef = ref();
|
||||
const save = async () => {
|
||||
form.value.items = [];
|
||||
for (let i = 0; i < listTableRef.value.getSelectionRows().length; i++) {
|
||||
form.value.items.push({ linid: listTableRef.value.getSelectionRows()[i].id });
|
||||
}
|
||||
await tabSave({formRef:formRef.value,state, proxy, route});
|
||||
};
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const cateChange = async () => {
|
||||
links.value = await request({
|
||||
url: '/te/allot/link/links/',
|
||||
method: 'get',
|
||||
params: { id: form.value.catid },
|
||||
});
|
||||
|
||||
await nextTick(() => {
|
||||
links.value.forEach((item: any) => {
|
||||
for (const fitem of form.value.items) {
|
||||
if (fitem.linid == item.id) {
|
||||
listTableRef.value.toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分配名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='版本号' prop='venum' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotLink' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/link', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>参数分配</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save()' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分配名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品系列:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.serid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属产品型号:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.modid' :suffix-icon='Search'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='驱动方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.chway' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'excel公式'"></el-option>
|
||||
<el-option :value="'b'" :label="'js函数'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='参数分配' name='tab2'>
|
||||
<div style='margin-left: 15px;margin-right: 15px'>
|
||||
<el-tabs v-model='activeScreen'>
|
||||
<el-tab-pane :label='screen.name' :name='screen.id' :key='screen.id' v-for='(screen,i) of screens'>
|
||||
<el-table :ref='el =>{ if (el) listTableRefs[i]= el}' :data='screen.params' style='width: 100%;height: 500px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<el-table-column prop='code' label='参数代码' width='180' />
|
||||
<el-table-column prop='name' label='参数名称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column prop='notes' label='备注' />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotParam' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/param', cates: [] as any, screens: [] as any,
|
||||
params: { path: '', query: '' },
|
||||
form: { avtag: true,items: [] as any } as any,
|
||||
});
|
||||
|
||||
const { form, cates, screens } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
if (form.value.id) {
|
||||
await cateChange();
|
||||
} else {
|
||||
form.value.items = [];
|
||||
}
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
const listTableRefs = ref([]) as any;
|
||||
const save = async () => {
|
||||
form.value.items = [];
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
for (let i = 0; i < listTableRefs.value[j].getSelectionRows().length; i++) {
|
||||
form.value.items.push({ parid: listTableRefs.value[j].getSelectionRows()[i].id });
|
||||
}
|
||||
}
|
||||
await tabSave({formRef:formRef.value,state, proxy, route});
|
||||
};
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const activeScreen = ref('');
|
||||
const cateChange = async () => {
|
||||
screens.value = await request({
|
||||
url: '/te/allot/param/screens/',
|
||||
method: 'get',
|
||||
params: { id: form.value.catid },
|
||||
});
|
||||
|
||||
nextTick(() => {
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
screens.value[j].params.forEach((item: any) => {
|
||||
console.log(form.value.items);
|
||||
for (const formItem of form.value.items) {
|
||||
console.log(formItem.parid);
|
||||
if (formItem.parid == item.id) {
|
||||
listTableRefs.value[j].toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (screens.value.length > 0) {
|
||||
activeScreen.value = screens.value[0].id;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分配名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='版本号' prop='venum' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teAllotParam' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/allot/param', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,204 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>特性校验</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<CateModal url='oa/flow/cate/tree' ref='cateModal' @close='cateChoose'/>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='校验名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='校验方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.chway' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'excel公式'"></el-option>
|
||||
<el-option :value="'b'" :label="'js函数'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='校验规则:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input v-model='form.rule' type='textarea' :rows='6' placeholder='通过后台JS引擎调用JS代码片段,返回true或false' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='校验文字:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input v-model='form.notes' type='textarea' :rows='4' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="form.chway=='a'">
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='校验EXCEL:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:before-remove="beforeRemove"
|
||||
multiple
|
||||
:limit="3"
|
||||
:on-exceed="handleExceed"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">请上传校验excel</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
export default {name: 'teFeatCheck'}
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import CateModal from '/@/comps/gen/GenModal.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/check',cates:[] as any,
|
||||
params: { path: '', query: '' },
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form,cates } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model="state.form.catid" clearable placeholder="产品分类" style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for="item in state.cates"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='校验名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='所属分类' prop='catna' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatCheck' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/check', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,415 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>特性组件</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='handleSave' plain>保 存</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='info' @click='handleClose' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
|
||||
<el-form class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='组件名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='参数分配' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.paway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.patem' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'参数分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'参数分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span='24' style='background-color: white'>
|
||||
<div style='margin-left: 15px;margin-right: 15px;margin-top: 10px'>
|
||||
<el-tabs v-model='activeName2'>
|
||||
<el-tab-pane :label='screen.name' :name='screen.id' :key='screen.id' v-for='(screen,i) of screens'>
|
||||
<el-table :ref='el =>{ if (el) listTableRefs[i]= el}' :data='screen.params' style='width: 100%;height: 200px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<!-- <el-table-column prop='id' label='参数ID' width='180' />-->
|
||||
<el-table-column prop='code' label='参数代码' width='180' />
|
||||
<el-table-column prop='name' label='参数名称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column label='初始可选项' width='300'>
|
||||
<template #default='scope'>
|
||||
<el-select v-model='scope.row.options' placeholder=' ' multiple style='width: 100%'>
|
||||
<el-option :value="'dt21'" :label="'630kg'"></el-option>
|
||||
<el-option :value="'dt22'" :label="'1000kg'"></el-option>
|
||||
<el-option :value="'dt3'" :label="'1050kg'"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='初始默认值' width='180'>
|
||||
<template #default='scope'>
|
||||
<el-select v-model='scope.row.deval' placeholder=' ' style='width: 100%' clearable>
|
||||
<el-option :value="'dt21'" :label="'630kg'"></el-option>
|
||||
<el-option :value="'dt22'" :label="'1000kg'"></el-option>
|
||||
<el-option :value="'dt3'" :label="'1050kg'"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align='right'>
|
||||
<template #header>
|
||||
<el-input v-model='search' placeholder='输入参数代码或参数名称做过滤' />
|
||||
</template>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.notes' placeholder='备注' />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change='handleQuery' @current-change='handleQuery'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='25' :current-page='1' :page-size='10'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class='znotes'>
|
||||
1.匹配方式如果为自定义,则此界面可以直接分配参数<br>
|
||||
2.自定义保存时,为了数据的一致性,也需要将参数分配的数据保存到参数分配的表里,做为一个当前版本的专用分配模板<br>
|
||||
3.匹配方式如果为通过模板,则可以引用先前建好的分配模板,提高相似产品的组件,产品或同产品不同版本的数据配置利用率<br>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label='联动分配' name='tab4'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.laway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.latem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'联动分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'联动分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='校验分配' name='tab5'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.caway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'校验分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'校验分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='驱动分配' name='tab6'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.daway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.datem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'校验分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'校验分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label='其他信息' name='tab9'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4'
|
||||
v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { Download } from '@element-plus/icons-vue';
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import request from '/@/utils/request';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
// import request from '/@/utils/request';
|
||||
const route = useRoute();
|
||||
|
||||
const state = reactive({
|
||||
form: {
|
||||
avtag: true,
|
||||
venum: 1,
|
||||
detag: true,
|
||||
coway: 'a',
|
||||
paway: 'a',
|
||||
laway: 'a',
|
||||
caway: 'a',
|
||||
dpaway: 'a',
|
||||
patem: {},
|
||||
options: [
|
||||
{ id: 1, name: 11, func1: '', func2: '' },
|
||||
{ id: 2, name: 22, func1: '', func2: '' },
|
||||
],
|
||||
} as any,
|
||||
params: {
|
||||
path: '',
|
||||
query: '',
|
||||
},
|
||||
cates: [],
|
||||
screens: [] as any,
|
||||
});
|
||||
|
||||
const {
|
||||
form, params, cates, screens,
|
||||
} = toRefs(state);
|
||||
|
||||
|
||||
const addItem = () => {
|
||||
form.value.options.push({});
|
||||
};
|
||||
|
||||
const activeName = ref('tab1');
|
||||
const activeName2 = ref('');
|
||||
|
||||
|
||||
const handleClose = () => {
|
||||
proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
|
||||
};
|
||||
|
||||
async function handleSave() {
|
||||
form.value.patem.items = [];
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
for (let i = 0; i < listTableRefs.value[j].getSelectionRows().length; i++) {
|
||||
form.value.patem.items.push({ parid: listTableRefs.value[j].getSelectionRows()[i].id });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!form.value.id) {
|
||||
await request({
|
||||
url: '/te/feat/comp',
|
||||
method: 'post',
|
||||
data: form.value,
|
||||
});
|
||||
} else {
|
||||
await request({
|
||||
url: '/te/feat/comp',
|
||||
method: 'put',
|
||||
data: form.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
handleClose();
|
||||
}
|
||||
|
||||
const myEditInit = async (id: string) => {
|
||||
if (id) {
|
||||
form.value = await request({
|
||||
url: '/te/feat/comp/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
cateChange();
|
||||
} else {
|
||||
form.value = { avtag: true };
|
||||
}
|
||||
};
|
||||
|
||||
const listTableRefs = ref([]);
|
||||
const cateChange = async () => {
|
||||
screens.value = await request({
|
||||
url: '/te/allot/param/screens/',
|
||||
method: 'get',
|
||||
params: { id: 'dt' },
|
||||
});
|
||||
if (screens.value.length > 0) {
|
||||
activeName2.value = screens.value[0].id;
|
||||
}
|
||||
|
||||
nextTick(() => {
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
screens.value[j].params.forEach((item) => {
|
||||
for (const formItem of form.value.patem.items) {
|
||||
console.log(formItem.parid);
|
||||
if (formItem.parid == item.id) {
|
||||
listTableRefs.value[j].toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
state.params = <any>route;
|
||||
if (params.value.query?.id) {
|
||||
myEditInit(params.value.query?.id);
|
||||
} else {
|
||||
cateChange();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const modelChoose = (node: any) => {
|
||||
form.value.modid = node.id;
|
||||
form.value.modna = node.name;
|
||||
console.log(node);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='qform.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='handleQuery'/>
|
||||
<el-button type='primary' @click='handleQuery' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='moreParams?ArrowUp:ArrowDown' plain @click='moreParams=!moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='handleAdd' plain>新增</el-button>
|
||||
<el-button type='warning' :icon='Delete' @click='handleDelete' plain>测试</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='multiple' @click='handleDelete' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show='moreParams' class='more-params'>
|
||||
<el-form :inline='true' label-width='100px'>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='qform.notes' placeholder='输入备注'/>
|
||||
</el-form-item>
|
||||
<el-form-item label='xxxxx'>
|
||||
<el-input v-model='qform.xx'/>
|
||||
</el-form-item>
|
||||
<el-form-item label='yyyyy'>
|
||||
<el-input v-model='qform.yy'/>
|
||||
</el-form-item>
|
||||
<el-form-item label='zzzzz'>
|
||||
<el-input v-model='qform.zz'/>
|
||||
</el-form-item>
|
||||
<el-form-item/>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='loading' :data='list'
|
||||
border stripe @selection-change='handleSelectionChange'>
|
||||
<el-table-column type='selection' width='55' align='center'/>
|
||||
<el-table-column label='序号' type='index' width='55' align='center'/>
|
||||
<el-table-column label='组件名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='handleEdit(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes'/>
|
||||
<el-table-column label='创建时间' prop='crtim' width='160'/>
|
||||
<el-table-column label='更新时间' prop='uptim' width='160'/>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='handleQuery' @current-change='handleQuery'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='total' v-model:current-page='qform.page' v-model:page-size='qform.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import {Plus, Delete, ArrowDown, ArrowUp, Upload} from '@element-plus/icons-vue';
|
||||
import {onMounted, reactive, ref, toRefs} from 'vue';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import request from '/@/utils/request';
|
||||
import {useRouter} from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
const qform = reactive({});
|
||||
|
||||
const state = reactive({
|
||||
loading: true,
|
||||
ids: [],// 选中ID数组
|
||||
single: true, // 非单个禁用
|
||||
multiple: true, // 非多个禁用
|
||||
moreParams: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const {
|
||||
loading,
|
||||
ids,
|
||||
single,
|
||||
multiple,
|
||||
moreParams,
|
||||
list,
|
||||
total,
|
||||
} = toRefs(state);
|
||||
|
||||
async function handleQuery() {
|
||||
const xx: any = await request({
|
||||
url: '/te/feat/comp',
|
||||
method: 'get',
|
||||
params: qform,
|
||||
});
|
||||
state.list = xx.items;
|
||||
state.total = xx.total;
|
||||
state.loading = false;
|
||||
}
|
||||
|
||||
|
||||
function handleSelectionChange(selection: any) {
|
||||
state.ids = selection.map((item: any) => item.id);
|
||||
state.single = selection.length !== 1;
|
||||
state.multiple = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
function handleDelete() {
|
||||
const delIds = ids.value.join(',');
|
||||
if (delIds.length <= 0) {
|
||||
ElMessage.warning('请选择后再进行删除');
|
||||
return;
|
||||
}
|
||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
await request({
|
||||
url: '/te/feat/comp/' + delIds,
|
||||
method: 'delete',
|
||||
});
|
||||
await handleQuery();
|
||||
})
|
||||
.catch(() => ElMessage.info('已取消删除'));
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery();
|
||||
});
|
||||
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
path: '/te/feat/comp/edit',
|
||||
query: {},
|
||||
});
|
||||
};
|
||||
|
||||
const handleEdit = (id: string) => {
|
||||
router.push({
|
||||
path: '/te/feat/comp/edit',
|
||||
query: {id: id},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>特性驱动</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<CateModal url='oa/flow/cate/tree' ref='cateModal' @close='cateChoose'/>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='驱动名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属产品分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='驱动方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.chway' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'excel公式'"></el-option>
|
||||
<el-option :value="'b'" :label="'js函数'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='驱动函数:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input v-model='form.rule' type='textarea' :rows='6' placeholder='通过后台JS引擎调用JS代码片段,驱动相关土建图参数' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="form.chway=='a'">
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='驱动EXCEL:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:before-remove="beforeRemove"
|
||||
multiple
|
||||
:limit="3"
|
||||
:on-exceed="handleExceed"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">请上传校验excel</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
export default {name: 'teFeatDrive'}
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import CateModal from '/@/comps/gen/GenModal.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/drive',cates:[] as any,
|
||||
params: { path: '', query: '' },
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form,cates } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model="state.form.catid" clearable placeholder="产品分类" style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for="item in state.cates"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='驱动名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='所属分类' prop='catna' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatDrive' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/drive', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,413 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>联动配置</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' plain>模拟测试</el-button>
|
||||
<el-button type='info' plain>复 制</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<CateModal url='oa/flow/cate/tree' ref='cateModal' @close='cateChoose' />
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='联动名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' style='width: 100%' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in state.cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属型号:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.modid' placeholder='请选择产品型号' style='width: 100%'>
|
||||
<el-option
|
||||
v-for='item in state.models'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='触发参数:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-select filterable v-model='form.trpar' style='width: 100%'>
|
||||
<el-option
|
||||
v-for='item in state.zparams'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='触发方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.trway' placeholder='请选择触发方式' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'值改变'"></el-option>
|
||||
<el-option :value="'b'" :label="'点击'"></el-option>
|
||||
<el-option :value="'c'" :label="'失去焦点'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='触发条件[可空]:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.trcon'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='触发顺序:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.trnum'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='联动方式:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.liway' placeholder='请选择联动方式'>
|
||||
<el-option :value="'a'" :label="'矩阵'"></el-option>
|
||||
<el-option :value="'b'" :label="'函数'"></el-option>
|
||||
<el-option :value="'c'" :label="'excel'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='联动函数:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:14px"
|
||||
type='textarea' :rows='8' placeholder='通过后台JS引擎调用JS代码片段,实现abcd联动xy'
|
||||
v-model='form.lifun'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class='znotes'>
|
||||
1.当选择了型号好,此联动在联动分配时只出现在对应的型号下<br>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='联动矩阵' name='tab2'>
|
||||
|
||||
|
||||
<el-table border :data='form.items' :row-style="{height: '36px'}" style='width: 100%'>
|
||||
<el-table-column type='index' width='40' />
|
||||
<el-table-column label='控制项' width='400'>
|
||||
<template #default='scope'>
|
||||
<div>
|
||||
<el-button type='info' plain @click='addCondition(scope.row)'>增加条件</el-button>
|
||||
<div :key='left.id' v-for='left of scope.row.lefts' style='margin-top: 5px'>
|
||||
<el-select filterable v-model='left.copar' style='width:160px;margin-right:5px'>
|
||||
<el-option
|
||||
v-for='item in zparams'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-select v-model='left.coway' style='width:100px;margin-right:5px'>
|
||||
<el-option :value="'a'" :label="'>'"></el-option>
|
||||
<el-option :value="'b'" :label="'>='"></el-option>
|
||||
<el-option :value="'c'" :label="'='"></el-option>
|
||||
<el-option :value="'d'" :label="'<='"></el-option>
|
||||
<el-option :value="'e'" :label="'<'"></el-option>
|
||||
<el-option :value="'f'" :label="'!='"></el-option>
|
||||
<el-option :value="'g'" :label="'in'"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-input v-model='left.coval' style='width:100px;margin-right:5px'>
|
||||
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='→' width='40'>
|
||||
<span>→</span>
|
||||
</el-table-column>
|
||||
<el-table-column label='被控制项' width='700'>
|
||||
<template #default='scope'>
|
||||
<div>
|
||||
<el-button type='info' plain @click='addEffect(scope.row)'>增加影响</el-button>
|
||||
<div :key='right.id' v-for='right of scope.row.rights' style='margin-top: 5px'>
|
||||
<el-select filterable v-model='right.efpar' style='width:160px;margin-right:5px' @change='efparChange(right)'>
|
||||
<el-option
|
||||
v-for='item in zparams'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
<el-select v-model='right.efway' style='width:100px;margin-right:5px' @change='efwayChange(right)'>
|
||||
<el-option :value="'a'" :label="'值改变'"></el-option>
|
||||
<el-option :value="'b'" :label="'可选项'"></el-option>
|
||||
<el-option :value="'c'" :label="'显示隐藏'"></el-option>
|
||||
<el-option :value="'d'" :label="'是否只读'"></el-option>
|
||||
</el-select>
|
||||
|
||||
<template v-if="right.efway=='a'">
|
||||
<el-input v-model='right.efval' style='width:300px;margin-right:5px'></el-input>
|
||||
</template>
|
||||
<template v-else-if="right.efway=='b'">
|
||||
<el-select v-model='right.efops' style='width:300px;margin-right:5px' multiple>
|
||||
<el-option v-for='item in right.options' :key='item.id' :label='item.name' :value='item.id' />
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="right.efway=='c'">
|
||||
<el-input v-model='right.efval' style='width:300px;margin-right:5px'></el-input>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model='right.efval' style='width:300px;margin-right:5px'></el-input>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.notes' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed='right' label='操作' width='50' align='center'>
|
||||
<template #header>
|
||||
<el-icon :size='22' style='top: 5px;cursor: pointer' color='#666'>
|
||||
<ele-CirclePlus @click='addItem' />
|
||||
</el-icon>
|
||||
</template>
|
||||
<template #default='scope'>
|
||||
<el-icon :size='22' style='top: 3px;cursor: pointer'>
|
||||
<ele-CircleClose @click='form.items.splice(scope.$index, 1)' />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="Name" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-popover effect="light" trigger="hover" placement="top" width="auto">-->
|
||||
<!-- <template #default>-->
|
||||
<!-- <div>name: {{ scope.row.name }}</div>-->
|
||||
<!-- <div>address: {{ scope.row.id }}</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #reference>-->
|
||||
<!-- <el-tag>{{ scope.row.name }}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-popover>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab9'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatLinkEdit' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/link',
|
||||
params: { path: '', query: '' },
|
||||
form: { avtag: true } as any,
|
||||
cates: [] as any, zparams: [] as any, models: [] as any,
|
||||
});
|
||||
|
||||
const { form } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(() => {
|
||||
editInitx();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const cateChange = async () => {
|
||||
state.models = await request({
|
||||
url: '/te/prod/model/list',
|
||||
method: 'get',
|
||||
params: { catid: form.value.catid },
|
||||
});
|
||||
form.value.modid = '';
|
||||
};
|
||||
|
||||
const modelsInit = async () => {
|
||||
state.models = await request({
|
||||
url: '/te/prod/model/list',
|
||||
method: 'get',
|
||||
params: { catid: form.value.catid },
|
||||
});
|
||||
};
|
||||
|
||||
const paramsInit = async () => {
|
||||
state.zparams = await request({
|
||||
url: '/te/feat/param/list',
|
||||
method: 'get',
|
||||
params: { catid: 'dt' },
|
||||
});
|
||||
};
|
||||
|
||||
const editInitx = async () => {
|
||||
state.params = <any>route;
|
||||
let id = state.params.query?.id;
|
||||
if (id) {
|
||||
form.value = await request({
|
||||
url: '/te/feat/link/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
await modelsInit();
|
||||
} else {
|
||||
form.value = { avtag: true };
|
||||
}
|
||||
await catesInit();
|
||||
await paramsInit();
|
||||
};
|
||||
|
||||
|
||||
//联动矩阵逻辑
|
||||
const addItem = () => {
|
||||
form.value.items.push({ lefts: [], rights: [] });
|
||||
};
|
||||
const addCondition = (row: any) => {
|
||||
row.lefts.push({});
|
||||
};
|
||||
|
||||
const addEffect = (row: any) => {
|
||||
row.rights.push({});
|
||||
};
|
||||
|
||||
const efparChange = (right: any) => {
|
||||
right.efway = '';
|
||||
right.efval = '';
|
||||
};
|
||||
|
||||
const efwayChange = async (right: any) => {
|
||||
right.efval = '';
|
||||
if (right.efway == 'b') {
|
||||
right.options = await request({
|
||||
url: '/te/feat/param/options/' + right.efpar,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show='state.moreParams' class='more-params'>
|
||||
<el-form :inline='true' label-width='100px'>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='state.form.notes' placeholder='输入备注' />
|
||||
</el-form-item>
|
||||
<el-form-item label='xxxxx'>
|
||||
<el-input v-model='state.form.xx' />
|
||||
</el-form-item>
|
||||
<el-form-item />
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='联动名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatLink' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete, ArrowDown, ArrowUp,Upload,Download} from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/link', loading: true, ids: [],moreParams: false,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>参数配置</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<CateModal url='oa/flow/cate/tree' ref='cateModal' @close='cateChoose'/>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='参数代码:' prop='code' :rules="[{ required: true, message: '代码不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.code' :disabled='form.crtim'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='参数名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属屏幕:' prop='scrid' :rules="[{ required: true, message: '屏幕不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.scrna' readonly :suffix-icon='Search' @click='openScreenModal'></el-input>
|
||||
<ScreenModal url='te/feat/screen/tree' ref='screenModal' @close='screenChoose'/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%'/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='显示模式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.shmod' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'input'" :label="'A1 普通输入框'"></el-option>
|
||||
<el-option :value="'select'" :label="'B1 普通下拉框'"></el-option>
|
||||
<el-option :value="'select2'" :label="'B2 可输入下拉框'"></el-option>
|
||||
<el-option :value="'textarea'" :label="'C1 多行输入框'"></el-option>
|
||||
<el-option :value="'list'" :label="'D1 明细表'"></el-option>
|
||||
<el-option :value="'switch'" :label="'E1 开关(有,无)'"></el-option>
|
||||
<el-option :value="'fuhe'" :label="'复合参数'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否只读:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.rotag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否为土建参数:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.drtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否为询价参数:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.qutag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class='znotes'>
|
||||
1.参数与选项(及联动、校验)删除时需要校验是否有产品版本关联,如果有关联则不允许删除<br>
|
||||
2.对于一些复杂的参数,如楼层明细,可做硬编码做成vue组件,参数这里保留引用<br>
|
||||
3.对于一些常用的,或者型号无关的联动,可将联动代码写在参数或者选项本身上<br>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='选项信息' name='tab2'>
|
||||
|
||||
|
||||
<el-table border :data='form.options' :row-style="{height: '36px'}" style='width: 100%'>
|
||||
<el-table-column type='expand'>
|
||||
<template #default='props'>
|
||||
<el-row :gutter='10' style='background-color: white;border: 0;margin-left: 4px;margin-right: 4px'>
|
||||
<el-col :span='12'>
|
||||
<el-input style="font-family: 'Courier New', sans-serif; font-size:16px"
|
||||
type='textarea' :rows='10' placeholder='显示隐藏控制函数'
|
||||
v-model='props.row.func1'>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-input style="font-family: 'Courier New', sans-serif; font-size:16px"
|
||||
type='textarea' :rows='10' placeholder='选项选择后的触发函数'
|
||||
v-model='props.row.func2'>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label='排序号' width='110'>
|
||||
<template #default='scope'>
|
||||
<el-input-number v-model='scope.row.ornum' controls-position='right' style='width: 100%'/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='选项代码' width='180'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.code' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='选项名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.name' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='选项备注'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.notes' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed='right' label='操作' width='50' align='center'>
|
||||
<template #header>
|
||||
<el-icon :size='22' style='top: 5px;cursor: pointer' color='#666'>
|
||||
<ele-CirclePlus @click='addItem'/>
|
||||
</el-icon>
|
||||
</template>
|
||||
<template #default='scope'>
|
||||
<el-icon :size='22' style='top: 3px;cursor: pointer'>
|
||||
<ele-CircleClose @click='form.options.splice(scope.$index, 1)'/>
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="Name" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-popover effect="light" trigger="hover" placement="top" width="auto">-->
|
||||
<!-- <template #default>-->
|
||||
<!-- <div>name: {{ scope.row.name }}</div>-->
|
||||
<!-- <div>address: {{ scope.row.id }}</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #reference>-->
|
||||
<!-- <el-tag>{{ scope.row.name }}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-popover>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab9'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4' v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default {name: 'teFeatParamEdit'};
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import {Search} from '@element-plus/icons-vue';
|
||||
import {getCurrentInstance, onMounted, reactive, ref, toRefs} from 'vue';
|
||||
import {editInit, tabSave, tabClose} from '/@/comps/page/edit';
|
||||
import {useRoute} from 'vue-router';
|
||||
import ScreenModal from '/@/comps/gen/GenModal.vue';
|
||||
import {uuid} from '/@/utils/xutil';
|
||||
|
||||
const formRef = ref();
|
||||
const route = useRoute();
|
||||
const {proxy} = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/param',
|
||||
params: {path: '', query: ''},
|
||||
form: {avtag: true, options: []} as any,
|
||||
});
|
||||
|
||||
const {form} = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
});
|
||||
|
||||
|
||||
// 屏幕弹框逻辑
|
||||
const screenModal = ref();
|
||||
const openScreenModal = () => {
|
||||
screenModal.value.openModal();
|
||||
};
|
||||
const screenChoose = (node: any) => {
|
||||
form.value.scrid = node.id;
|
||||
form.value.scrna = node.name;
|
||||
};
|
||||
|
||||
//region -----可选项-----
|
||||
|
||||
|
||||
const addItem = () => {
|
||||
if (form.value.id) {
|
||||
form.value.options.push({
|
||||
id: uuid(), parid: form.value.id
|
||||
})
|
||||
} else {
|
||||
form.value.options.push({
|
||||
id: uuid(),
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//endregiton
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show='state.moreParams' class='more-params'>
|
||||
<el-form :inline='true' label-width='100px'>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='state.form.notes' placeholder='输入备注' />
|
||||
</el-form-item>
|
||||
<el-form-item label='xxxxx'>
|
||||
<el-input v-model='state.form.xx' />
|
||||
</el-form-item>
|
||||
<el-form-item />
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='参数名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='屏幕名称' prop='scrna' width='180'/>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatParam' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete, ArrowDown, ArrowUp,Upload,Download} from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/param', loading: true, ids: [],moreParams: false,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<el-drawer v-model='state.show' size='70%'>
|
||||
<template #title>
|
||||
<h4>特性屏幕</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div style='padding: 20px;border-top: 1px solid #ccc'>
|
||||
<el-form ref='formRef' :model='form' label-width='160px'>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='屏幕名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建人:'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建时间:'>
|
||||
{{ form.crtim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新人:'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新时间:'>
|
||||
{{ form.uptim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<el-input v-model='form.notes' type='textarea' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style='flex: auto;margin: 20px'>
|
||||
<el-button type='primary' @click='confirm'>确认</el-button>
|
||||
<el-button @click='state.show = false'>取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { drawerOpen, drawerSave } from '/@/comps/page/edit';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/screen', show: false, cates: [] as any,
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form, cates } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const formRef = ref();
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen({state, id});
|
||||
if(!id){
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['listQuery']);
|
||||
const confirm = async () => {
|
||||
await drawerSave({formRef:formRef.value, state});
|
||||
emits('listQuery');
|
||||
};
|
||||
|
||||
const catesInit = async () => {
|
||||
cates.value = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
catesInit();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model='state.form.catid' clearable placeholder='产品分类' style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for='item in state.cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='drawer.open()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='屏幕名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='所属分类' prop='catna' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
<DrawerEdit ref='drawer' @listQuery='listQuery(state)' />
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teFeatScreen' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import DrawerEdit from './edit.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const drawer = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/feat/screen', loading: true, ids: [], cates: [] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<el-drawer v-model='state.show' size='70%'>
|
||||
<template #title>
|
||||
<h4>产品分类</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div style='padding: 20px;border-top: 1px solid #ccc'>
|
||||
<el-form ref='formRef' :model='form' label-width='160px'>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分类代码:' prop='id' :rules="[{ required: true, message: '代码不能为空'}]">
|
||||
<el-input v-model='form.id' :disabled='form.crtim?true:false'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='分类名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建人:'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建时间:'>
|
||||
{{ form.crtim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新人:'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新时间:'>
|
||||
{{ form.uptim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<el-input v-model='form.notes' type='textarea' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style='flex: auto;margin: 20px'>
|
||||
<el-button type='primary' @click='confirm'>确认</el-button>
|
||||
<el-button @click='state.show = false'>取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import {reactive, ref, toRefs} from 'vue';
|
||||
import {drawerOpen, drawerSave} from '/@/comps/page/edit';
|
||||
import {FormInstance} from "element-plus";
|
||||
|
||||
const formRef = ref<FormInstance>();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/cate', show: false,
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen({state, id});
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['listQuery']);
|
||||
const confirm =async () => {
|
||||
await drawerSave({formRef:formRef.value, state,iouField:'crtim'});
|
||||
emits('listQuery');
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='drawer.open()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分类名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
<Edit ref='drawer' @listQuery='listQuery(state)'/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teProdCate' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import Edit from './edit.vue';
|
||||
const drawer = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/cate', loading: true, ids: [],
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-drawer v-model='state.show' size='70%'>
|
||||
<template #title>
|
||||
<h4>产品型号</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div style='padding: 20px;border-top: 1px solid #ccc'>
|
||||
<el-form ref='formRef' :model='form' label-width='160px'>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='型号名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类' @change='cateChange'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='所属系列:' prop='serid'>
|
||||
<el-select v-model='form.serid' placeholder='请选择产品系列'>
|
||||
<el-option
|
||||
v-for='item in series'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建人:'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建时间:'>
|
||||
{{ form.crtim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新人:'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新时间:'>
|
||||
{{ form.uptim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<el-input v-model='form.notes' type='textarea' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style='flex: auto;margin: 20px'>
|
||||
<el-button type='primary' @click='confirm'>确认</el-button>
|
||||
<el-button @click='state.show = false'>取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import {onMounted, reactive, ref, toRefs} from 'vue';
|
||||
import { drawerOpen, drawerSave } from '/@/comps/page/edit';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
url: '/te/prod/model', show: false, cates: [] as any, series: [] as any,
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form, cates, series } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen({state, id});
|
||||
await serieInit();
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['listQuery']);
|
||||
const confirm = async () => {
|
||||
await drawerSave({formRef:formRef.value, state});
|
||||
emits('listQuery');
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
cates.value = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const cateChange = async () => {
|
||||
series.value = await request({
|
||||
url: '/te/prod/serie/list',
|
||||
method: 'get',
|
||||
params: { catid: form.value.catid },
|
||||
});
|
||||
form.value.serid = '';
|
||||
};
|
||||
|
||||
const serieInit = async () => {
|
||||
series.value = await request({
|
||||
url: '/te/prod/serie/list',
|
||||
method: 'get',
|
||||
params: { catid: form.value.catid },
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model='state.form.catid' clearable placeholder='产品分类' style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for='item in state.cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='drawer.open()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='型号名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='所属分类' prop='catna' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
<DrawerEdit ref='drawer' @listQuery='listQuery(state)' />
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teProdModel' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import DrawerEdit from './edit.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const drawer = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/model', loading: true, ids: [], cates: [] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<el-drawer v-model='state.show' size='70%'>
|
||||
<template #title>
|
||||
<h4>产品系列</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div style='padding: 20px;border-top: 1px solid #ccc'>
|
||||
<el-form ref='formRef' :model='form' label-width='160px'>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='系列名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<el-select v-model='form.catid' placeholder='请选择产品分类'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建人:'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建时间:'>
|
||||
{{ form.crtim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新人:'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新时间:'>
|
||||
{{ form.uptim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<el-input v-model='form.notes' type='textarea' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style='flex: auto;margin: 20px'>
|
||||
<el-button type='primary' @click='confirm'>确认</el-button>
|
||||
<el-button @click='state.show = false'>取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import {onMounted, reactive, ref, toRefs} from 'vue';
|
||||
import { drawerOpen, drawerSave } from '/@/comps/page/edit';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/serie', show: false, cates: [] as any,
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form, cates } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen({state, id});
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['listQuery']);
|
||||
const confirm = async () => {
|
||||
await drawerSave({formRef:formRef.value, state});
|
||||
emits('listQuery');
|
||||
};
|
||||
|
||||
const catesInit = async () => {
|
||||
cates.value = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
catesInit();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model='state.form.catid' clearable placeholder='产品分类' style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for='item in state.cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='drawer.open()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='系列名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='所属分类' prop='catna' />
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
<DrawerEdit ref='drawer' @listQuery='listQuery(state)' />
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'teProdSerie' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import DrawerEdit from './edit.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const drawer = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/serie', loading: true, ids: [], cates: [] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/prod/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
|
||||
<el-dialog v-model='dialogVisible' title='产品选择' width='600px'>
|
||||
<div style="height: 600px">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="常用型号" name="k1">预设的常用型号
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="层次选择" name="k2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="height: 390px;">
|
||||
|
||||
<el-card class='box-card' style='height: 100%;' body-style='height: 100%;overflow: auto'>
|
||||
<template #header>
|
||||
<div class='card-header'>
|
||||
<div class='tree-h-flex'>
|
||||
<div class='tree-h-left'>
|
||||
<el-input :prefix-icon='Search' v-model='filterText' placeholder='产品名称' />
|
||||
</div>
|
||||
<div class='tree-h-right'>
|
||||
<el-dropdown @command='handleCommand'>
|
||||
<el-button style='margin-left: 10px;width: 30px'>
|
||||
<el-icon class='el-icon--right'>
|
||||
<more-filled />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command='expandAll'>全部展开</el-dropdown-item>
|
||||
<el-dropdown-item command='collapseAll'>全部折叠</el-dropdown-item>
|
||||
<el-dropdown-item command='refresh'>刷新</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div style='margin-bottom: 45px'>
|
||||
<el-tree @node-click='nodeClick' ref='treeRef' class='filter-tree' :data='state.data' :props='defaultProps' :filter-node-method='filterNode' />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="border: 1px solid #ccc;height: 390px;margin-left: 5px;overflow: auto">
|
||||
<ul class="z-org-tree">
|
||||
<li v-for="item in tierItems" :key="item.id" class="f-user" title="444444444" @click="tierItemClick(item)">
|
||||
<Checkbox v-model:checked="item.checked"/>
|
||||
<img class="vben-header-user-dropdown__header" src="https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640">
|
||||
<span class="layui-elip f-user-name">{{ item.name }}</span>
|
||||
<span class="layui-elip f-user-dept">{{ item.dept }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="偏好模板" name="k3">通过设置的偏好模板选择</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='dialogVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='handleConfirm'>确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
|
||||
import { defineExpose, onMounted, reactive, ref, watch } from 'vue';
|
||||
import { ElMessage, ElMessageBox, ElTree } from 'element-plus';
|
||||
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
import request from '/@/utils/request';
|
||||
import { Search, MoreFilled } from '@element-plus/icons-vue';
|
||||
|
||||
|
||||
interface Tree {
|
||||
id: number;
|
||||
name: string;
|
||||
children?: Tree[];
|
||||
}
|
||||
|
||||
const filterText = ref('');
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>();
|
||||
|
||||
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
};
|
||||
|
||||
watch(filterText, (val) => {
|
||||
treeRef.value!.filter(val);
|
||||
});
|
||||
|
||||
const filterNode = (value: string, data: Tree) => {
|
||||
if (!value) return true;
|
||||
return data.name.includes(value);
|
||||
};
|
||||
|
||||
|
||||
const state = reactive({
|
||||
data: [] as any,
|
||||
id:'',
|
||||
name:'',
|
||||
pid: ''
|
||||
});
|
||||
|
||||
|
||||
const handleCommand = (command: string | number | object) => {
|
||||
if ('expandAll' == command) {
|
||||
for (let i = 0; i < treeRef.value!.store._getAllNodes().length; i++) {
|
||||
treeRef.value!.store._getAllNodes()[i].expanded = true;
|
||||
}
|
||||
} else if ('collapseAll' == command) {
|
||||
for (let i = 0; i < treeRef.value!.store._getAllNodes().length; i++) {
|
||||
treeRef.value!.store._getAllNodes()[i].expanded = false;
|
||||
}
|
||||
}
|
||||
ElMessage(`click on item ${command}`);
|
||||
};
|
||||
|
||||
|
||||
// // 初始化表格数据
|
||||
const initTreeData = async () => {
|
||||
state.data= await request({
|
||||
url: '/te/prod/model/tree',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
initTreeData();
|
||||
});
|
||||
|
||||
|
||||
|
||||
const activeName = ref('k2')
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event)
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
const handleClose = (done: () => void) => {
|
||||
ElMessageBox.confirm('Are you sure to close this dialog?')
|
||||
.then(() => {
|
||||
done();
|
||||
})
|
||||
.catch(() => {
|
||||
// catch error
|
||||
});
|
||||
};
|
||||
|
||||
const openModal = async (id: string) => {
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
const emits = defineEmits(['close']);
|
||||
const handleConfirm=()=>{
|
||||
emits('close',{id:state.id,name:state.name,pid:state.pid});
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({ openModal });
|
||||
|
||||
|
||||
const nodeClick=(node:any)=>{
|
||||
state.id=node.id;
|
||||
state.name=node.name;
|
||||
state.pid=node.pid;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer button:first-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.layui-elip {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.f-user:before,
|
||||
.f-user:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.f-user:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.f-user input, .f-user label {
|
||||
float: left;
|
||||
margin-top: 14px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.f-user img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
|
||||
.f-user .f-user-name,
|
||||
.f-user .f-user-dept {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.f-user .f-user-name {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.f-user .f-user-dept {
|
||||
color: #a599b2;
|
||||
}
|
||||
|
||||
/*最近*/
|
||||
.z-org-recently li {
|
||||
width: 33%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.z-org-recently li:hover {
|
||||
background-color: #f7efec;
|
||||
}
|
||||
|
||||
/*搜索查询*/
|
||||
.z-org-search li {
|
||||
/*width: 280px;*/
|
||||
width: 50%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
//margin: 3px;
|
||||
}
|
||||
|
||||
.z-org-search li:hover {
|
||||
background-color: #f7efec;
|
||||
}
|
||||
|
||||
/*!*组织架构树*!*/
|
||||
.z-org-tree li {
|
||||
margin: 3px;
|
||||
cursor: pointer;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.z-org-tree li:hover {
|
||||
background-color: #f7efec;
|
||||
}
|
||||
|
||||
/*已选的*/
|
||||
.z-org-selected li {
|
||||
margin: 3px;
|
||||
cursor: pointer;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.z-org-selected li:hover {
|
||||
background-color: #f7efec;
|
||||
}
|
||||
|
||||
.z-org-selected .f-user .anticon-close-circle {
|
||||
//float: left;
|
||||
//position:relative;
|
||||
position: absolute;
|
||||
//position:fixed;
|
||||
color: #f26b96;
|
||||
font-size: 20px;
|
||||
display: none;
|
||||
margin-left: 42px;
|
||||
}
|
||||
|
||||
.z-org-selected li:hover .anticon-close-circle {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.z-org-selected .f-user img {
|
||||
display: inline;
|
||||
//float: none;
|
||||
}
|
||||
|
||||
.z-org-selected .f-user-name2 {
|
||||
display: block;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.tree-h-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tree-h-left {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree-h-right {
|
||||
width: 40px;
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>
|
||||
<el-input v-model='form.aaa' placeholder='输入参数名回车查询' style='width: 200px'></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='handleSave' plain>保 存</el-button>
|
||||
<el-button type='info' @click='handleClose' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-row style='background:white'>
|
||||
<el-col :span='16'>
|
||||
<el-form :model='form' label-width='200px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane :label='screen.name' :name='screen.id' :key='screen.id' v-for='(screen) of zmodel.screens'>
|
||||
<el-form-item :key='param.id' v-for='(param) of screen.params' :label='param.name'>
|
||||
<template v-if="param.shmod=='select'">
|
||||
<!-- <el-select v-model='form.feat[param.code]' placeholder='选择' style='width: 100%'>-->
|
||||
<!-- <el-option :value="'input'" :label="'A1 普通输入框'"></el-option>-->
|
||||
<!-- <el-option :value="'select'" :label="'B1 普通下拉框'"></el-option>-->
|
||||
<!-- <el-option :value="'select2'" :label="'B2 可输入下拉框'"></el-option>-->
|
||||
<!-- <el-option :value="'textarea'" :label="'C1 多行输入框'"></el-option>-->
|
||||
<!-- <el-option :value="'list'" :label="'D1 明细表'"></el-option>-->
|
||||
<!-- <el-option :value="'switch'" :label="'E1 开关(有,无)'"></el-option>-->
|
||||
<!-- <el-option :value="'fuhe'" :label="'复合参数'"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-input v-model='form.feat[param.code]'></el-input>
|
||||
</template>
|
||||
<template v-else-if="param.shmod=='input'">
|
||||
<el-input v-model='form.feat[param.code]'></el-input>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-table :ref='el =>{ if (el) listTableRefs[i]= el}' :data='screen.params' style='width: 100%;height: 500px'>-->
|
||||
<!-- <el-table-column type='selection' width='55' />-->
|
||||
<!-- <el-table-column prop='code' label='参数代码' width='180' />-->
|
||||
<!-- <el-table-column prop='name' label='参数名称' width='180' />-->
|
||||
<!-- <el-table-column prop='ornum' label='排序号' width='100' />-->
|
||||
<!-- <el-table-column prop='notes' label='备注' />-->
|
||||
<!-- </el-table>-->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<div style='font-size: 18px;margin-top: 8px;margin-bottom: 8px;margin-left: 8px'>土建示意图</div>
|
||||
<div style='margin-left: 10px;margin-right: 10px;border-left:1px solid #eee;border-right:1px solid #eee'>
|
||||
<el-collapse v-model='active2Name'>
|
||||
<el-collapse-item title=' 示意图1' name='1'>
|
||||
<img :src='png1' style='height: 400px' />
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title=' 示意图2' name='2'>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import request from '/@/utils/request';
|
||||
import { useRoute } from 'vue-router';
|
||||
import png1 from './111.png';
|
||||
|
||||
const listTableRefs = ref([]);
|
||||
const groupModal = ref();
|
||||
|
||||
|
||||
const openGroupModal = () => {
|
||||
groupModal.value.openModal();
|
||||
};
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
// import request from '/@/utils/request';
|
||||
const route = useRoute();
|
||||
|
||||
const state = reactive({
|
||||
form: {
|
||||
avtag: true,
|
||||
options: [
|
||||
{ id: 1, name: 11, func1: '', func2: '' },
|
||||
{ id: 2, name: 22, func1: '', func2: '' },
|
||||
],
|
||||
feat: {},
|
||||
} as any,
|
||||
params: {
|
||||
path: '',
|
||||
query: '',
|
||||
},
|
||||
zmodel: {},
|
||||
});
|
||||
|
||||
const {
|
||||
form, params, zmodel,
|
||||
} = toRefs(state);
|
||||
|
||||
const addItem = () => {
|
||||
form.value.options.push({});
|
||||
};
|
||||
|
||||
// const firstTab=zmodel.value.screens[0].id;
|
||||
const activeName = ref('');
|
||||
|
||||
|
||||
const handleClose = () => {
|
||||
proxy.mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
|
||||
};
|
||||
|
||||
async function handleSave() {
|
||||
if (!form.value.id) {
|
||||
await request({
|
||||
url: '/te/feat/param',
|
||||
method: 'post',
|
||||
data: form.value,
|
||||
});
|
||||
} else {
|
||||
await request({
|
||||
url: '/te/feat/param',
|
||||
method: 'put',
|
||||
data: form.value,
|
||||
});
|
||||
}
|
||||
handleClose();
|
||||
}
|
||||
|
||||
|
||||
const myEditInit = async (id: string) => {
|
||||
if (id) {
|
||||
form.value = await request({
|
||||
url: '/te/feat/param/one/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
} else {
|
||||
form.value = { avtag: true };
|
||||
}
|
||||
};
|
||||
|
||||
const zmodelInit = async (modid: string) => {
|
||||
zmodel.value = await request({
|
||||
url: '/te/prod/model/zmodel/' + modid,
|
||||
method: 'get',
|
||||
});
|
||||
if (zmodel.value.screens) {
|
||||
activeName.value = zmodel.value.screens[0].id;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
state.params = <any>route;
|
||||
if (params.value.query?.id) {
|
||||
myEditInit(params.value.query?.id);
|
||||
|
||||
}
|
||||
if (params.value.query?.modid) {
|
||||
zmodelInit(params.value.query?.modid);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<ProdModal ref='prodModal' @close='prodChoose' />
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='add()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show='state.moreParams' class='more-params'>
|
||||
<el-form :inline='true' label-width='100px'>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='state.form.notes' placeholder='输入备注' />
|
||||
</el-form-item>
|
||||
<el-form-item label='xxxxx'>
|
||||
<el-input v-model='state.form.xx' />
|
||||
</el-form-item>
|
||||
<el-form-item />
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='测试名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
export default { name: 'oaFlowTemp' };
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete, ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect, tabEdit } from '/@/comps/page/index';
|
||||
import ProdModal from './ProdModal.vue';
|
||||
import router from '/@/router';
|
||||
import { uuid } from '/@/utils/xutil';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/test', loading: true, ids: [], moreParams: false,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
|
||||
const prodModal = ref();
|
||||
const add = () => {
|
||||
prodModal.value.openModal();
|
||||
};
|
||||
const prodChoose = (node: any) => {
|
||||
router.push({
|
||||
path: state.url + '/edit',
|
||||
query: { uuid: uuid(), modid: node.id },
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,446 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>产品版本</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='save()' plain>保 存</el-button>
|
||||
<el-button type='info' :icon='CopyDocument' plain>新版本</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='版本名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属型号:' prop='modid'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.modna' readonly :suffix-icon='Search' @click='openModelModal'></el-input>
|
||||
<ModelModal url='/te/prod/model/tree' ref='modelModal' @close='modelChoose' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='配置方式:' prop='modid'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.coway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义配置'"></el-option>
|
||||
<el-option :value="'b'" :label="'组件式配置'"></el-option>
|
||||
<el-option :value="'c'" :label="'继承式配置'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='版本号:'>
|
||||
<div class='zinput'>
|
||||
{{ form.venum }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否为默认版本:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.detag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='生效开始时间:'>
|
||||
<div class='zinput'>
|
||||
<el-date-picker v-model='form.stdat' type='date' placeholder=' ' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='生效结束时间:'>
|
||||
<div class='zinput'>
|
||||
<el-date-picker v-model='form.endat' type='date' placeholder=' ' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="form.coway=='b'">
|
||||
<el-col :span='24' style='background-color: white'>
|
||||
<el-table :data='comps' style='width: 100%;height: 200px;margin-top: 10px;margin-left: 10px;margin-right: 10px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column prop='name' label='组件名称' width='180' />
|
||||
<el-table-column prop='notes' label='组件描述' />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class='znotes'>
|
||||
1.默认版本有且只有一个,前端选择产品后根据默认版本关联的参数,联动,校验动态组合成产品维护界面<br>
|
||||
2.合同评审通过后(具体时间节点待定),将产品的版本固定,当修改时如果此版本的有效期超出了系统设定,则需按最新的版本重新调整<br>
|
||||
3.版本的新建由后台维护人员自己定(比如当有大调整时做一个新版本,老版本设定有效期)<br>
|
||||
4.配置方式为组件式时,可以选择多个特性模板组合式地合并参数(排除重复项),类似一个型号是有很多个组件合成的(优先实现自定义方式配置)<br>
|
||||
5.组件是包含参数,联动,校验,驱动等的一个集合<br>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='参数分配' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.paway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.patem' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'参数分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'参数分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span='24' style='background-color: white'>
|
||||
<div style='margin-left: 15px;margin-right: 15px;margin-top: 10px'>
|
||||
<el-tabs v-model='activeScreen'>
|
||||
<el-tab-pane :label='screen.name' :name='screen.id' :key='screen.id' v-for='(screen,i) of screens'>
|
||||
<el-table :ref='el =>{ if (el) listTableRefs[i]= el}' :data='screen.zparams' style='width: 100%;height: 500px'>
|
||||
<el-table-column type='selection' width='55' />
|
||||
<!-- <el-table-column prop='id' label='参数ID' width='180' />-->
|
||||
<el-table-column prop='code' label='参数代码' width='180' />
|
||||
<el-table-column prop='name' label='参数名称' width='180' />
|
||||
<el-table-column prop='ornum' label='排序号' width='100' />
|
||||
<el-table-column label='初始可选项' width='300'>
|
||||
<template #default='scope'>
|
||||
<el-select v-model='scope.row.oparr' placeholder=' ' multiple style='width: 100%'>
|
||||
<el-option v-for='(option) of scope.row.zoptions' :key='option.id' :value="option.code" :label="option.name"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='初始默认值' width='180'>
|
||||
<template #default='scope'>
|
||||
<el-select v-model='scope.row.deval' placeholder=' ' style='width: 100%' clearable>
|
||||
<el-option :value="'dt21'" :label="'630kg'"></el-option>
|
||||
<el-option :value="'dt22'" :label="'1000kg'"></el-option>
|
||||
<el-option :value="'dt3'" :label="'1050kg'"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align='right'>
|
||||
<template #header>
|
||||
<el-input v-model='search' placeholder='输入参数代码或参数名称做过滤' />
|
||||
</template>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.notes' placeholder='备注' />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <el-pagination-->
|
||||
<!-- @size-change='handleQuery' @current-change='handleQuery'-->
|
||||
<!-- class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background-->
|
||||
<!-- :total='25' :current-page='1' :page-size='10'-->
|
||||
<!-- layout='total, sizes, prev, pager, next, jumper'-->
|
||||
<!-- />-->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class='znotes'>
|
||||
1.匹配方式如果为自定义,则此界面可以直接分配参数<br>
|
||||
2.自定义保存时,为了数据的一致性,也需要将参数分配的数据保存到参数分配的表里,做为一个当前版本的专用分配模板<br>
|
||||
3.匹配方式如果为通过模板,则可以引用先前建好的分配模板,提高相似产品的数据或同产品不同版本的数据配置利用率<br>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label='联动分配' name='tab4'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.laway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.latem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'联动分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'联动分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class='znotes'>
|
||||
1.只显示与已选参数有关联的全局联动分配<br>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='校验分配' name='tab5'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.caway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'校验分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'校验分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='驱动分配' name='tab6'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='匹配方式:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.daway' placeholder='请选择' style='width:100%'>
|
||||
<el-option :value="'a'" :label="'自定义'"></el-option>
|
||||
<el-option :value="'b'" :label="'通过模板'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='引用模板:'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.datem' placeholder='请选择' style='width: 100%'>
|
||||
<el-option :value="'a'" :label="'校验分配001'"></el-option>
|
||||
<el-option :value="'b'" :label="'校验分配002'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<div class='zinput'>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label='其他信息' name='tab9'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4'
|
||||
v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import request from '/@/utils/request';
|
||||
import ModelModal from '/@/comps/gen/GenModal.vue';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/version',
|
||||
params: { path: '', query: '' },
|
||||
form: {
|
||||
avtag: true, venum: 1, detag: true,
|
||||
coway: 'a', paway: 'a', laway: 'a', caway: 'a', dpaway: 'a',
|
||||
patem: {},
|
||||
options: [
|
||||
{ id: 1, name: 11, func1: '', func2: '' },
|
||||
{ id: 2, name: 22, func1: '', func2: '' },
|
||||
],
|
||||
} as any,
|
||||
screens: [] as any,
|
||||
comps: [] as any,
|
||||
});
|
||||
|
||||
const { form, screens, comps } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
await cateChange();
|
||||
});
|
||||
|
||||
const save = async () => {
|
||||
form.value.patem.items = [];
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
for (let i = 0; i < listTableRefs.value[j].getSelectionRows().length; i++) {
|
||||
const oparr=[];
|
||||
for (const option of listTableRefs.value[j].getSelectionRows()[i].oparr) {
|
||||
oparr.push({optid:option})
|
||||
}
|
||||
form.value.patem.items.push({
|
||||
parid: listTableRefs.value[j].getSelectionRows()[i].id,
|
||||
options: listTableRefs.value[j].getSelectionRows()[i].oparr.toString(),
|
||||
oparr: oparr
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await tabSave({formRef:formRef.value,state, proxy, route});
|
||||
};
|
||||
|
||||
comps.value = [{ ornum: 1, name: '电梯必选组件', notes: '载重,速度,层站门等等必须的参数' },
|
||||
{ ornum: 2, name: '通用可选项组件', notes: 'KLKS,KLK1通用的可选项参数' },
|
||||
{ ornum: 3, name: '家用梯轿厢组件', notes: 'xxxxxxxxxxx' }];
|
||||
|
||||
|
||||
const activeScreen = ref('');
|
||||
const listTableRefs = ref([]) as any;
|
||||
const cateChange = async () => {
|
||||
screens.value = await request({
|
||||
url: '/te/allot/param/screens/',
|
||||
method: 'get',
|
||||
params: { id: 'dt' },
|
||||
});
|
||||
if (screens.value.length > 0) {
|
||||
activeScreen.value = screens.value[0].id;
|
||||
}
|
||||
nextTick(() => {
|
||||
for (let j = 0; j < screens.value.length; j++) {
|
||||
screens.value[j].zparams.forEach((item: any) => {
|
||||
for (const formItem of form.value.patem.items) {
|
||||
if (formItem.parid == item.id) {
|
||||
if(formItem.options){
|
||||
item.oparr=formItem.options.split(",");
|
||||
}
|
||||
listTableRefs.value[j].toggleRowSelection(item, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//region -----型号选择逻辑-----
|
||||
const modelModal = ref();
|
||||
|
||||
const openModelModal = () => {
|
||||
modelModal.value.openModal();
|
||||
};
|
||||
|
||||
const modelChoose = (node: any) => {
|
||||
form.value.modid = node.id;
|
||||
form.value.modna = node.name;
|
||||
};
|
||||
//endregion
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<Wrap>
|
||||
<div class='p-left'>
|
||||
<CateTree url='/te/prod/model/tree' />
|
||||
</div>
|
||||
<div class='p-right'>
|
||||
<el-card class='box-card' style='height: 100%;position:relative;overflow-y: auto;'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
<el-button class='more-button' :icon='state.moreParams?ArrowUp:ArrowDown' plain @click='state.moreParams=!state.moreParams'/>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='warning' :icon='Delete' @click='handleDelete' plain>测试</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show='state.moreParams' class='more-params'>
|
||||
<el-form :inline='true' label-width='100px'>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='state.form.notes' placeholder='输入备注' />
|
||||
</el-form-item>
|
||||
<el-form-item label='xxxxx'>
|
||||
<el-input v-model='state.form.xx' />
|
||||
</el-form-item>
|
||||
<el-form-item />
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div style='margin:6px;position: absolute;width: 100%'>
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='版本名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='是否为默认' prop='detag' width='100'/>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</Wrap>
|
||||
</template>
|
||||
<!--<script lang='ts'>-->
|
||||
<!--export default { name: 'oaFlowTemp' };-->
|
||||
<!--</script>-->
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete, ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, listSelect, tabAdd, tabEdit } from '/@/comps/page/index';
|
||||
import Wrap from '/@/comps/page/Wrap.vue';
|
||||
import CateTree from '/@/comps/gen/GenTree.vue';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/prod/version', loading: true, ids: [], moreParams: false,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
|
||||
<el-drawer v-model='state.show' size='70%'>
|
||||
<template #title>
|
||||
<h4>产品分类</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div style='padding: 20px;border-top: 1px solid #ccc'>
|
||||
<el-form ref='formRef' :model='form' label-width='160px'>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='分类名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='排序号:'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建人:'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='创建时间:'>
|
||||
{{ form.crtim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px' v-show='form.crtim'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新人:'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='更新时间:'>
|
||||
{{ form.uptim }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style='height: 48px'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<el-input v-model='form.notes' type='textarea' />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style='flex: auto;margin: 20px'>
|
||||
<el-button type='primary' @click='confirm'>确认</el-button>
|
||||
<el-button @click='state.show = false'>取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import {reactive, ref, toRefs} from 'vue';
|
||||
import { drawerOpen, drawerSave } from '/@/comps/page/edit';
|
||||
|
||||
const formRef = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/tran/cate', show: false,
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form } = toRefs(state);
|
||||
|
||||
//暴露open方法给父组件调用
|
||||
const open = async (id: string) => {
|
||||
await drawerOpen({state, id});
|
||||
};
|
||||
defineExpose({ open });
|
||||
|
||||
//取得父组件listQuery方法的调用权
|
||||
const emits = defineEmits(['listQuery']);
|
||||
const confirm =async () => {
|
||||
await drawerSave({formRef:formRef.value, state});
|
||||
emits('listQuery');
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='drawer.open()' plain>新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='分类名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='drawer.open(scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
|
||||
<div class='znotes'>
|
||||
1.产品分类是定义一个产品的种类的,比如电梯与扶梯结构完全不同<br>
|
||||
2.产品(系列,型号,版本),特性(屏幕,参数,联动,校验,驱动)都是与产品分类有关联的<br>
|
||||
3.通过产品分类定义权限,第2点中其他相关的主数据都同产品分类的权限<br>
|
||||
</div>
|
||||
</el-card>
|
||||
<DrawerEdit ref='drawer' @listQuery='listQuery(state)'/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { listQuery, listDelete, listSelect } from '/@/comps/page/index';
|
||||
import DrawerEdit from './edit.vue';
|
||||
const drawer = ref();
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/tran/cate', loading: true, ids: [],
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,342 @@
|
||||
<template>
|
||||
|
||||
<el-card class='box-card' :body-style="{padding:'2px 8px'}" shadow='never'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='10'>
|
||||
<div style='line-height: 32px'>转换配置</div>
|
||||
</el-col>
|
||||
<el-col :span='14' style='text-align: right'>
|
||||
<el-button type='success' @click='tabSave({formRef,state,proxy,route})' plain>保 存</el-button>
|
||||
<el-button type='info' @click='tabClose({proxy,route})' plain>关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<CateModal url='oa/flow/cate/tree' ref='cateModal' @close='cateChoose'/>
|
||||
<div style='margin-top: 8px;margin-bottom: 8px'>
|
||||
<el-form ref="formRef" class='zform' :model='form' label-width='140px'>
|
||||
<el-tabs type='card' v-model='activeName'>
|
||||
<el-tab-pane label='基本信息' name='tab1'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='转换名称:' prop='name' :rules="[{ required: true, message: '名称不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.name'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='所属分类:' prop='catid' :rules="[{ required: true, message: '分类不能为空'}]">
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.catid' placeholder='请选择转换分类'>
|
||||
<el-option
|
||||
v-for='item in cates'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label='转换方式:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-select v-model='form.trway' placeholder='请选择转换方式'>
|
||||
<el-option :value="'a'" :label="'函数'"></el-option>
|
||||
<el-option :value="'b'" :label="'概率'"></el-option>
|
||||
<el-option :value="'c'" :label="'矩阵'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='排序号:'>
|
||||
<div class='zinput'>
|
||||
<el-input-number v-model='form.ornum' controls-position='right' style='width: 100%' />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='是否可用:'>
|
||||
<div class='zinput'>
|
||||
<el-switch v-model='form.avtag'>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数a代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pacod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数a名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.panam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数b代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pbcod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数b名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pbnam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数c代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pccod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数c名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pcnam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数d代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pdcod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数d名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pdnam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数x代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pxcod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数x名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pxnam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数y代码:' prop='trway'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pycod'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='参数y名称:'>
|
||||
<div class='zinput'>
|
||||
<el-input v-model='form.pynam'></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='转换函数:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:14px"
|
||||
type='textarea' :rows='8' placeholder='通过后台JS引擎调用JS代码片段,实现abcd转换成xy'
|
||||
v-model='form.asfun'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='转换矩阵' name='tab2'>
|
||||
|
||||
|
||||
<el-table border :data='form.items' :row-style="{height: '36px'}" style='width: 100%'>
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column :label='form.panam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.paval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label='form.pbnam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.pbval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label='form.pcnam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.pcval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label='form.pdnam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.pdval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="→" width='40'>
|
||||
<span>→</span>
|
||||
</el-table-column>
|
||||
<el-table-column :label='form.pxnam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.pxval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label='form.pynam' width='140'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.pyval' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注'>
|
||||
<template #default='scope'>
|
||||
<el-input v-model='scope.row.notes' required></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed='right' label='操作' width='50' align='center'>
|
||||
<template #header>
|
||||
<el-icon :size='22' style='top: 5px;cursor: pointer' color='#666'>
|
||||
<ele-CirclePlus @click='addItem' />
|
||||
</el-icon>
|
||||
</template>
|
||||
<template #default='scope'>
|
||||
<el-icon :size='22' style='top: 3px;cursor: pointer'>
|
||||
<ele-CircleClose @click='form.items.splice(scope.$index, 1)' />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="Name" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-popover effect="light" trigger="hover" placement="top" width="auto">-->
|
||||
<!-- <template #default>-->
|
||||
<!-- <div>name: {{ scope.row.name }}</div>-->
|
||||
<!-- <div>address: {{ scope.row.id }}</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #reference>-->
|
||||
<!-- <el-tag>{{ scope.row.name }}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-popover>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='其他信息' name='tab3'>
|
||||
<el-row style='border-top: 1px solid #d2d2d2;'>
|
||||
<el-col :span='24'>
|
||||
<el-form-item label='备注:'>
|
||||
<div class='zinput' style='height: auto'>
|
||||
<el-input style="font-family: 'Courier New', Helvetica, Arial, sans-serif; font-size:16px"
|
||||
type='textarea' :rows='4'
|
||||
v-model='form.notes'>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show='form.crtim'>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crman ? form.crman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='创建时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.crtim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新人:'>
|
||||
<div class='zinput'>
|
||||
{{ form.upman ? form.upman.name : '' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label='更新时间:'>
|
||||
<div class='zinput'>
|
||||
{{ form.uptim }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
export default {name: 'teFeatDrive'}
|
||||
</script>
|
||||
<script lang='ts' setup>
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import { editInit, tabSave, tabClose } from '/@/comps/page/edit';
|
||||
import { useRoute } from 'vue-router';
|
||||
import CateModal from '/@/comps/gen/GenModal.vue';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const formRef=ref();
|
||||
const route = useRoute();
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/tran/main',cates:[] as any,
|
||||
params: { path: '', query: '' },
|
||||
form: { avtag: true } as any,
|
||||
});
|
||||
|
||||
const { form,cates } = toRefs(state);
|
||||
const activeName = ref('tab1');
|
||||
|
||||
onMounted(async () => {
|
||||
await editInit({state, route});
|
||||
await catesInit();
|
||||
});
|
||||
|
||||
|
||||
//分类弹框逻辑
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/tran/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
|
||||
const addItem = () => {
|
||||
form.value.items.push({});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class='box-card'>
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span='14'>
|
||||
<el-select v-model="state.form.catid" clearable placeholder="转换分类" style='margin-right:10px;width: 120px'>
|
||||
<el-option
|
||||
v-for="item in state.cates"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model='state.form.name' placeholder='输入名称回车查询' clearable class='list-search' @keyup.enter='listQuery(state)' />
|
||||
<el-button type='primary' @click='listQuery(state)' plain>查 询</el-button>
|
||||
</el-col>
|
||||
<el-col :span='10' style='text-align: right'>
|
||||
<el-button type='success' :icon='Plus' @click='tabAdd(state.url)' plain>新增</el-button>
|
||||
<el-button type='info' :icon='Upload' plain>导入</el-button>
|
||||
<el-button type='info' :icon='Download' plain>导出</el-button>
|
||||
<el-button type='danger' :icon='Delete' :disabled='state.multiple' @click='listDelete(state)' plain>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table height='400' :cell-style="{padding:'2px'}" :row-style="{height: '36px'}" v-loading='state.loading' :data='state.list'
|
||||
border stripe @selection-change='listSelect($event,state)'>
|
||||
<el-table-column type='selection' width='55' align='center' />
|
||||
<el-table-column label='序号' type='index' width='55' align='center' />
|
||||
<el-table-column label='转换名称' width='180'>
|
||||
<template #default='scope'>
|
||||
<span style='cursor:pointer;color: #3e9ece' @click='tabEdit(state.url,scope.row.id)'>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label='备注' prop='notes' />
|
||||
<el-table-column label='创建时间' prop='crtim' width='160' />
|
||||
<el-table-column label='更新时间' prop='uptim' width='160' />
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change='listQuery(state)' @current-change='listQuery(state)'
|
||||
class='mt8' :pager-count='5' :page-sizes='[10, 20, 30]' background
|
||||
:total='state.total' v-model:current-page='state.form.page' v-model:page-size='state.form.pageSize'
|
||||
layout='total, sizes, prev, pager, next, jumper'
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { listQuery, listDelete, tabAdd, tabEdit, listSelect } from '/@/comps/page/index';
|
||||
import request from '/@/utils/request';
|
||||
|
||||
const state = reactive({
|
||||
url: '/te/tran/main', loading: true, ids: [],cates:[] as any,
|
||||
form: {}, single: true, multiple: true, list: [], total: 0,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
listQuery(state);
|
||||
catesInit();
|
||||
});
|
||||
|
||||
const catesInit = async () => {
|
||||
state.cates = await request({
|
||||
url: '/te/tran/cate/list',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -8,6 +8,12 @@ import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||
import { useRoutesList } from '/@/stores/routesList';
|
||||
import { NextLoading } from '/@/utils/loading';
|
||||
import {saRoutes} from '/@/router/saRoute';
|
||||
|
||||
for (const saRoute of saRoutes) {
|
||||
dynamicRoutes[0].children?.push(saRoute);
|
||||
}
|
||||
|
||||
|
||||
// 前端控制路由
|
||||
|
||||
|
||||
@@ -0,0 +1,512 @@
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
export const saRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/te/prod',
|
||||
name: 'teProd',
|
||||
component: () => import('/@/layout/routerView/parent.vue'),
|
||||
redirect: '/te/prod/model',
|
||||
meta: {
|
||||
title: '产品管理',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-xitongshezhi',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/te/prod/cate',
|
||||
name: 'teProdCate',
|
||||
component: () => import('/@/pages/te/prod/cate/index.vue'),
|
||||
meta: {
|
||||
title: '产品分类',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/serie',
|
||||
name: 'teProdSerie',
|
||||
component: () => import('/@/pages/te/prod/serie/index.vue'),
|
||||
meta: {
|
||||
title: '产品系列',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/model',
|
||||
name: 'teProdModel',
|
||||
component: () => import('/@/pages/te/prod/model/index.vue'),
|
||||
meta: {
|
||||
title: '产品型号',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/version',
|
||||
name: 'teProdVersion',
|
||||
component: () => import('/@/pages/te/prod/version/index.vue'),
|
||||
meta: {
|
||||
title: '产品版本',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/version/edit',
|
||||
name: 'teProdVersionEdit',
|
||||
component: () => import('/@/pages/te/prod/version/edit.vue'),
|
||||
meta: {
|
||||
title: '产品版本编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/test',
|
||||
name: 'teProdTest',
|
||||
component: () => import('/@/pages/te/prod/test/index.vue'),
|
||||
meta: {
|
||||
title: '产品测试',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/prod/test/edit',
|
||||
name: 'teProdTestEdit',
|
||||
component: () => import('/@/pages/te/prod/test/edit.vue'),
|
||||
meta: {
|
||||
title: '产品测试编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/te/feat',
|
||||
name: 'teFeat',
|
||||
component: () => import('/@/layout/routerView/parent.vue'),
|
||||
redirect: '/te/feat/param',
|
||||
meta: {
|
||||
title: '特性管理',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-xitongshezhi',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/te/feat/screen',
|
||||
name: 'teFeatScreen',
|
||||
component: () => import('/@/pages/te/feat/screen/index.vue'),
|
||||
meta: {
|
||||
title: '特性屏幕',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/param',
|
||||
name: 'teFeatParam',
|
||||
component: () => import('/@/pages/te/feat/param/index.vue'),
|
||||
meta: {
|
||||
title: '特性参数',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/param/edit',
|
||||
name: 'teFeatParamEdit',
|
||||
component: () => import('/@/pages/te/feat/param/edit.vue'),
|
||||
meta: {
|
||||
title: '参数编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Comment',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/link',
|
||||
name: 'teFeatLink',
|
||||
component: () => import('/@/pages/te/feat/link/index.vue'),
|
||||
meta: {
|
||||
title: '特性联动',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/link/edit',
|
||||
name: 'teFeatLinkEdit',
|
||||
component: () => import('/@/pages/te/feat/link/edit.vue'),
|
||||
meta: {
|
||||
title: '联动编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/check',
|
||||
name: 'teFeatCheck',
|
||||
component: () => import('/@/pages/te/feat/check/index.vue'),
|
||||
meta: {
|
||||
title: '特性校验',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/check/edit',
|
||||
name: 'teFeatCheckEdit',
|
||||
component: () => import('/@/pages/te/feat/check/edit.vue'),
|
||||
meta: {
|
||||
title: '校验编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/drive',
|
||||
name: 'teFeatDrive',
|
||||
component: () => import('/@/pages/te/feat/drive/index.vue'),
|
||||
meta: {
|
||||
title: '特性驱动',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/feat/drive/edit',
|
||||
name: 'teFeatDriveEdit',
|
||||
component: () => import('/@/pages/te/feat/drive/edit.vue'),
|
||||
meta: {
|
||||
title: '驱动编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// path: '/te/feat/comp',
|
||||
// name: 'teFeatComp',
|
||||
// component: () => import('/@/pages/te/feat/comp/index.vue'),
|
||||
// meta: {
|
||||
// title: '特性组件',
|
||||
// isLink: '',
|
||||
// isHide: false,
|
||||
// isKeepAlive: true,
|
||||
// isAffix: false,
|
||||
// isIframe: false,
|
||||
// roles: ['admin'],
|
||||
// icon: 'iconfont icon-caidan',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: '/te/feat/comp/edit',
|
||||
// name: 'teFeatCompEdit',
|
||||
// component: () => import('/@/pages/te/feat/comp/edit.vue'),
|
||||
// meta: {
|
||||
// title: '组件编辑',
|
||||
// isLink: '',
|
||||
// isHide: true,
|
||||
// isKeepAlive: true,
|
||||
// isAffix: false,
|
||||
// isIframe: false,
|
||||
// roles: ['admin'],
|
||||
// icon: 'iconfont icon-caidan',
|
||||
// },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/te/allot',
|
||||
name: 'teAllot',
|
||||
component: () => import('/@/layout/routerView/parent.vue'),
|
||||
redirect: '/te/allot/param',
|
||||
meta: {
|
||||
title: '分配管理',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-xitongshezhi',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/te/allot/param',
|
||||
name: 'teAllotParam',
|
||||
component: () => import('/@/pages/te/allot/param/index.vue'),
|
||||
meta: {
|
||||
title: '参数分配',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/param/edit',
|
||||
name: 'teAllotParamEdit',
|
||||
component: () => import('/@/pages/te/allot/param/edit.vue'),
|
||||
meta: {
|
||||
title: '参数分配编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Comment',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/link',
|
||||
name: 'teAllotLink',
|
||||
component: () => import('/@/pages/te/allot/link/index.vue'),
|
||||
meta: {
|
||||
title: '联动分配',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/link/edit',
|
||||
name: 'teAllotLinkEdit',
|
||||
component: () => import('/@/pages/te/allot/link/edit.vue'),
|
||||
meta: {
|
||||
title: '联动分配编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Comment',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/check',
|
||||
name: 'teAllotCheck',
|
||||
component: () => import('/@/pages/te/allot/check/index.vue'),
|
||||
meta: {
|
||||
title: '校验分配',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/check/edit',
|
||||
name: 'teAllotCheckEdit',
|
||||
component: () => import('/@/pages/te/allot/check/edit.vue'),
|
||||
meta: {
|
||||
title: '校验分配编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Comment',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/drive',
|
||||
name: 'teAllotDrive',
|
||||
component: () => import('/@/pages/te/allot/drive/index.vue'),
|
||||
meta: {
|
||||
title: '驱动分配',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/allot/drive/edit',
|
||||
name: 'teAllotDriveEdit',
|
||||
component: () => import('/@/pages/te/allot/drive/edit.vue'),
|
||||
meta: {
|
||||
title: '驱动分配编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Comment',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/te/tran',
|
||||
name: 'teTran',
|
||||
component: () => import('/@/layout/routerView/parent.vue'),
|
||||
redirect: '/te/tran/main',
|
||||
meta: {
|
||||
title: '转换管理',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-xitongshezhi',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/te/tran/cate',
|
||||
name: 'teTranCate',
|
||||
component: () => import('/@/pages/te/tran/cate/index.vue'),
|
||||
meta: {
|
||||
title: '转换分类',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/tran/main',
|
||||
name: 'teTranMain',
|
||||
component: () => import('/@/pages/te/tran/main/index.vue'),
|
||||
meta: {
|
||||
title: '转换映射',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/te/tran/main/edit',
|
||||
name: 'teTranMainEdit',
|
||||
component: () => import('/@/pages/te/tran/main/edit.vue'),
|
||||
meta: {
|
||||
title: '转换编辑',
|
||||
isLink: '',
|
||||
isHide: true,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="login-content-main">
|
||||
<!-- <h4 class="login-content-title ml15">{{ getThemeConfig.globalTitle }}后台模板</h4>-->
|
||||
<div style='color: green;'>普通用户账号:(密码都是1)</div>
|
||||
<div style='color: green;'>张三:z3,李四:l4,王五:w5,赵六:z6。</div>
|
||||
<div style='color: green;'>张三:z3,李四:l4,王五:w5,赵六:zhao6。</div>
|
||||
<div v-if="!isScan">
|
||||
<el-tabs v-model="tabsActiveName">
|
||||
<el-tab-pane :label="$t('message.label.one1')" name="account">
|
||||
|
||||
Reference in New Issue
Block a user