From 337503701c6ebaf24d515dc1cc0ae5be522d180f Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期五, 13 六月 2025 18:16:22 +0800
Subject: [PATCH] 1
---
src/views/basesetting/machine.vue | 288 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 288 insertions(+), 0 deletions(-)
diff --git a/src/views/basesetting/machine.vue b/src/views/basesetting/machine.vue
new file mode 100644
index 0000000..756b75a
--- /dev/null
+++ b/src/views/basesetting/machine.vue
@@ -0,0 +1,288 @@
+<template>
+ <basic-container>
+ <avue-crud
+ :addBtn="false"
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model:search="search"
+ v-model:page="mypage"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
+ <template #menu-left>
+ <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleView">瀵煎嚭</el-button>
+ <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleView">瀵煎叆</el-button>
+ </template>
+ <template #menu="scope">
+ <el-button type="primary" text size="default" icon="el-icon-upload" @click.stop="handleEdit(scope.row, scope.index)">缂栬緫</el-button>
+ <el-button type="primary" text size="default" icon="el-icon-upload" @click.stop="handleView(scope.row, scope.index)">鍒犻櫎</el-button>
+ <el-button type="primary" text size="default" icon="el-icon-upload" @click.stop="handleView(scope.row, scope.index)">浜х敓鏈哄簥鍥炰紶鏈烘瀯鏍�</el-button>
+ </template>
+
+ <template #status="{ row }">
+ <span>{{ row.status=="1"?"鍚敤":"绂佺敤" }}</span>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="缂栬緫" append-to-body v-model="editBox" width="60%">
+ <avue-form ref="editFormModal" :option="editFormModal" v-model="form" @submit="formSubmit" />
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+export default {
+ data() {
+ var that = this;
+ return {
+ editBox: false,
+ search: {
+ keyword: "",
+ machineGroupCode: ""
+ },
+ loading: true,
+ mypage: {
+ size: 10,
+ current: 1,
+ total: 0,
+ },
+ option: {
+ index: true,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ labelWidth: 120,
+ emptyBtn: false,
+ searchSpan: 8,
+ column: [
+ {
+ label: '缂栧彿/鍚嶇О',
+ type: 'input',
+ prop: 'keyword',
+ search: true,
+ hide: true
+ },
+ {
+ label: '鏈哄簥缂栧彿',
+ prop: 'code'
+ },
+ {
+ label: '鏈哄簥鍨嬪彿',
+ prop: 'name',
+ },
+ {
+ label: '鏈哄簥缁�',
+ prop: 'machineGroupName',
+ search: true,
+ type: 'select',
+ dicUrl: '/blade-system/dict-biz/dictionary?code=machine_group',
+ props: {
+ label: 'dictValue',
+ value: 'dictKey',
+ },
+ span: "8"
+ },
+ {
+ label: '鏈哄簥绫诲瀷',
+ prop: 'machineSpecName',
+ },
+ {
+ label: '鐢熶骇鍘傚晢',
+ prop: 'manufacturer',
+ },
+ {
+ label: '鎿嶄綔鍛�',
+ prop: 'operator',
+ },
+ {
+ label: '鐘舵��',
+ prop: 'status',
+ slot: true,
+ },
+ ],
+ },
+ editFormModal: {
+ labelWidth: 160,
+ submitBtn: true,
+ submitText: "淇濆瓨",
+ emptyBtn: false,
+ column: [
+ {
+ label: '鏈哄簥缂栧彿',
+ prop: 'code',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '鏈哄簥鍨嬪彿',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '鏈哄簥绫诲瀷',
+ prop: '',
+ type: 'select',
+ span: 12,
+ dicUrl: '/blade-system/dict-biz/dictionary?code=machine_group',
+ props: {
+ label: 'dictValue',
+ value: 'dictKey',
+ }
+ },
+ {
+ label: '鎵�灞炴満搴婄粍',
+ prop: '',
+ type: 'select',
+ span: 12,
+ dicUrl: '/blade-system/dict-biz/dictionary?code=machine_group',
+ props: {
+ label: 'dictValue',
+ value: 'dictKey',
+ }
+ },
+ {
+ label: '鎿嶄綔鍛�',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '鎵�灞炵粍缁�',
+ prop: '',
+ type: 'select',
+ span: 12,
+ dicUrl: '/blade-system/dict-biz/dictionary?code=machine_group',
+ props: {
+ label: 'dictValue',
+ value: 'dictKey',
+ }
+ },
+ {
+ label: '鐢熶骇鍟�',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '杞鏃堕棿锛堝皬鏃讹級',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '绯荤粺鎺у埗',
+ prop: '',
+ type: 'select',
+ span: 12,
+ dicUrl: '/blade-system/dict-biz/dictionary?code=machine_control_system',
+ props: {
+ label: 'dictValue',
+ value: 'dictKey',
+ }
+ },
+ {
+ label: '鐘舵��',
+ prop: 'checkbox',
+ type: 'checkbox',
+ span: 12,
+ dicData: [{
+ label: '鍚敤',
+ value: 1
+ }]
+ },
+ {
+ label: '绋嬪簭涓嬪彂鐩綍',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '绋嬪簭鍥炰紶鐩綍',
+ prop: '',
+ type: 'input',
+ span: 12,
+ dataType: 'string',
+ },
+ {
+ label: '澶囨敞',
+ prop: '',
+ type: 'textarea',
+ span: 24,
+ dataType: 'string',
+ },
+ ]
+ },
+ data: [],
+ };
+ },
+ methods: {
+ handleEdit() {
+ this.editBox = true;
+ },
+ formSubmit() {
+
+ },
+ handleView() {
+
+ },
+ searchReset() {
+ //this.onLoad(this.mypage);
+ },
+ searchChange(params, done) {
+ this.mypage.current = 1;
+ this.onLoad();
+ done();
+ },
+ currentChange(current) {
+ this.mypage.current = current;
+ },
+ sizeChange(size) {
+ this.mypage.size = size;
+ },
+ refreshChange() {
+
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ var obj = {
+ keyword: this.search.keyword,
+ machineGroupCode: this.search.machineGroupCode,
+ current: this.mypage.current,
+ size: this.mypage.size,
+ }
+ axios({
+ url: '/blade-mdm/machine/page',
+ method: 'get',
+ date: obj,
+ }).then(
+ res => {
+ const data = res.data.data;
+ this.mypage.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ },
+ error => {
+
+ }
+ );
+ }
+ },
+};
+</script>
+
+<style lang="scss">
+
+</style>
--
Gitblit v1.9.3