This commit is contained in:
mashuai 2024-12-31 15:44:20 +08:00
parent 56d4919ab9
commit 7666897677
3 changed files with 119 additions and 118 deletions

View File

@ -14,7 +14,7 @@
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
<el-button
<el-button
size="mini" style="margin: 0 10px;height: 32px;" type="primary"
@click.stop="() => addTreeMainType()">
新建分类
@ -80,26 +80,26 @@
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="keyword">
<el-input v-model="queryParams.keyword" placeholder="请输入关键字" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form> -->
<el-row :gutter="16" style="margin-bottom: 20px;">
<el-row :gutter="16" style="margin-bottom: 20px;">
<el-col :span="2">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="">上传</el-button>
</el-col>
</el-col>
<el-col :span="2">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">下载</el-button>
</el-col>
</el-col>
<el-col :span="2">
<el-button type="warning" plain icon="el-icon-download" :disabled="single" size="mini" @click="handleReName">重命名</el-button>
</el-col>
</el-col>
<el-col :span="2">
<el-button type="warning" plain icon="el-icon-download" :disabled="multiple" size="mini" @click="handleAllDel">删除</el-button>
</el-col>
</el-col>
<el-col :span="4" style="float: right;">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新建文件夹</el-button>
</el-col>
@ -108,7 +108,7 @@
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="(item,index) in breadcrumbList" :key="item.id">
<span @click="breadClick(item,index)" style="cursor: pointer;">{{item.docName}}</span>
</el-breadcrumb-item>
</el-breadcrumb-item>
</el-breadcrumb>
</el-row>
<el-table v-loading="loading" :data="tableDataList" @selection-change="handleSelectionChange" row-key="detailsId">
@ -119,7 +119,7 @@
</template>
</el-table-column>
<el-table-column label="文件名称" align="left" prop="docName" show-overflow-tooltip width="300">
<template slot-scope="scope">
<template slot-scope="scope">
<i v-if="scope.row.docType=='文件夹'" class="el-icon-folder-opened"></i>
<span @click="getSubDetails(scope.row)" style="cursor: pointer;margin-left: 20px;">{{ scope.row.docName }}</span>
</template>
@ -140,8 +140,8 @@
<el-table-column label="类 型 " align="center" prop="docType" show-overflow-tooltip/>
<el-table-column label="年 度" align="center" prop="year" show-overflow-tooltip/>
<el-table-column label="修改时间 " align="center" prop="updateTime" show-overflow-tooltip/>
<el-table-column label="上传人员 " align="center" prop="createBy" show-overflow-tooltip/>
<el-table-column label="上传人员 " align="center" prop="createBy" show-overflow-tooltip/>
</el-table>
<pagination
@ -153,7 +153,7 @@
/>
</el-col>
</el-row>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" height="650px" :src="dialogImageUrl" alt />
@ -167,15 +167,15 @@
<el-form-item label="所属上级">
<el-input style="width: 100%" disabled v-model="addFormParams.label"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="名称" prop="archivesName">
<el-input style="width: 100%" v-model="addFormParams.archivesName" />
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-row style="text-align: right">
<el-form-item>
<el-button size="small" type="primary" style="color: #fff;" @click="onSubmit"> </el-button>
@ -192,9 +192,9 @@
<el-form-item label="旧的名称:">
<el-input style="width: 100%" disabled v-model="reNameForm.oldName"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="新的名称" prop="newName">
<el-input style="width: 100%" v-model="reNameForm.newName" />
@ -212,13 +212,13 @@
</div>
</template>
<script>
<script>
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {
getArchivesTypeListApi,getAddArchivesTypeApi,updateArchivesTypeApi,delArchivesTypeApi,
getArchivesDetailsLstApi, addArchivesDetailsApi, updateArchivesDetailsApi, delArchivesDetailsApi
} from "@/api/archives/archives";
} from "@/api/archives/archives";
import { imgUpLoad } from "@/api/system/upload";
@ -240,37 +240,37 @@ export default {
//
total: 0,
unitValueOptions: [{id:"0",name:"整数"},{id:"1",name:"小数"}],
//
//
// keeperDataRange: [],
KeeperOptions: [],//
repairerOptions: [],//
repairerOptions: [],//
//
archivesName: undefined,
// -
treeOptions: undefined,
treeTemp: [],
treeTemp: [],
//
tableDataList: [],
//
open: false,
//
title: "",
title: "",
//
form: {
companyId: "",
},
},
levelTemp: undefined,
idTemp: undefined,
parentId: undefined,
parentId: undefined,
defaultProps: {
children: "children",
label: "label",
},
},
//
queryParams: {
pageNum: 1,
pageSize: 10
},
},
//
rules: {
// leasePrice: [
@ -288,10 +288,10 @@ export default {
addShowVisible: false,
addTitle: "", //
addFormParams: {
infoId: "",
level: "",
infoId: "",
level: "",
archivesName: ""
},
},
addFormParamsRules: {
archivesName: [
{
@ -308,7 +308,7 @@ export default {
reNameForm:{
oldName:"",
newName:""
},
},
reNameFormRules: {
newName: [
{
@ -329,7 +329,7 @@ export default {
},
},
created() {
this.getTreeData();
this.getTreeData();
},
methods: {
/** 查询新增页面-上级类型下拉树结构 */
@ -348,12 +348,12 @@ export default {
level:'',
docName:firstNode.label
}
this.breadcrumbList.push(obj)
this.breadcrumbList.push(obj)
this.getList();
}
// else{
// this.queryParams.typeId = this.treeOptions[0].id;
// this.queryParams.level = 0;
// this.queryParams.level = 0;
// this.getList();
// }
}
@ -373,15 +373,15 @@ export default {
}
});
} catch (error) {}
},
},
onMousemove(data) {
this.isMousemoveId = data.id;
},
onMouseleave() {
this.isMousemoveId = null;
},
},
// treeChange(val) {
// console.log(val, "");
// console.log(val, "");
// this.form.companyId = val.companyId;
// },
//
@ -394,20 +394,20 @@ export default {
appendTreeNode(data) {
console.log(data)
this.levelTemp = data.level;
this.idTemp = data.id;
this.parentId = data.parentId;
this.idTemp = data.id;
this.parentId = data.parentId;
Object.assign(this.addFormParams, data);
this.addFormParams.archivesName = "";
this.addTitle = "新增";
this.addShowVisible = true;
this.addShowVisible = true;
},
/* 树节点删除 */
removeTreeNode(data) {
// this.$message.success('--')
console.log(data, "删除时的数据源--");
console.log(data, "删除时的数据源--");
let delParam = {
infoId: data.id,
parentId: data.parentId,
infoId: data.id,
parentId: data.parentId,
}
this.$modal
.confirm("是否确认删除数据项?")
@ -424,7 +424,7 @@ export default {
editTreeNode(data) {
this.levelTemp = data.level;
this.idTemp = data.id;
this.parentId = data.parentId;
this.parentId = data.parentId;
Object.assign(this.addFormParams, data);
this.addTitle = "修改";
this.addFormParams.archivesName = data.label;
@ -435,35 +435,35 @@ export default {
const addParams = {
infoId: this.idTemp,
level: this.levelTemp,
parentId: this.parentId,
parentId: this.parentId,
archivesName:this.addFormParams.archivesName
};
};
const editParams = {
infoId: this.idTemp,
parentId: this.parentId,
infoId: this.idTemp,
parentId: this.parentId,
archivesName:this.addFormParams.archivesName
};
};
const addDetailsParam = {
infoId:this.queryParams.infoId,
detailsId:this.queryParams.detailsId,
level:this.queryParams.level,
docName:this.addFormParams.archivesName
};
};
this.$refs["addFormParamsRef"].validate(async (valid) => {
if (valid) {
if(this.addTitle === "新建类别"){ //tree-
const res = await getAddArchivesTypeApi({archivesName:this.addFormParams.archivesName});
if (res.code === 200) {
this.$message.success("新建成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}
}else if (this.addTitle === "新增") {//tree-
const res = await getAddArchivesTypeApi(addParams);
if (res.code === 200) {
this.$message.success("新增成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}else if (this.addTitle === "新建文件夹") {//table-
@ -471,13 +471,13 @@ export default {
if (res.code === 200) {
this.$message.success("新建成功!");
this.addShowVisible = false;
this.getList();
this.getList();
}
} else {
const res = await updateArchivesTypeApi(editParams);
if (res.code === 200) {
this.$message.success("修改成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}
@ -516,7 +516,7 @@ export default {
docName:row.docName,
}
this.breadcrumbList.push(obj)
this.getList()
this.getList()
}
},
// -
@ -525,7 +525,7 @@ export default {
if (data.level != 1) {
this.queryParams.infoId = data.id;
this.queryParams.detailsId=""
this.queryParams.level=""
this.queryParams.level=""
this.queryParams.pageNum = 1;
this.breadcrumbList=[]
let obj = {
@ -536,8 +536,8 @@ export default {
docName:data.label
}
this.breadcrumbList.push(obj)
this.getList();
}
this.getList();
}
},
// -
breadClick(item,index){
@ -548,21 +548,21 @@ export default {
this.queryParams.level=item.level;
this.queryParams.infoId="";
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.getList()
}else{
this.queryParams.detailsId="";
this.queryParams.level="";
this.queryParams.infoId=item.infoId;
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.getList()
}
},
//
handleAdd(){
this.addTitle = "新建文件夹";
this.addFormParams.archivesName="";
this.addFormParams.archivesName="";
this.addShowVisible = true;
},
/** 搜索按钮操作 */
@ -571,7 +571,7 @@ export default {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
resetQuery() {
this.resetForm("queryForm");
this.queryParams.infoId = undefined;
this.queryParams.pageNum = 1;
@ -585,7 +585,7 @@ export default {
this.ids = selection.map((item) => item);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
},
//
cancel() {
this.open = false;
@ -595,10 +595,10 @@ export default {
reset() {
this.form = { parentId: ""};
this.resetForm("form");
},
},
//
handleView(row) {
console.log(row)
console.log(row)
},
handleReName(){
this.handleUpdate(this.ids[0])
@ -616,16 +616,17 @@ export default {
let param = {
detailsId:this.rowData.detailsId,
infoId:this.rowData.detailsId,
docName:this.reNameForm.newName
docName:this.reNameForm.newName,
parentId:this.rowData.parentId
}
this.$refs["reNameForm"].validate(async (valid) => {
if (valid) {
if (valid) {
const res = await updateArchivesDetailsApi(param);
if (res.code === 200) {
this.$message.success("修改成功!");
this.reNameShowVisible = false;
this.reNameShowVisible = false;
this.getList()
}
}
}
});
@ -634,7 +635,7 @@ export default {
handleDelete(row) {
let archivesDetailsList=[
{detailsId:row.detailsId}
]
]
this.$modal
.confirm("是否确认删除数据项?")
.then(function () {
@ -674,7 +675,7 @@ export default {
// },
// `_${new Date().getTime()}.xlsx`
// );
},
},
},

View File

@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="日期">
@ -12,7 +12,7 @@
start-placeholder="开始日期"
@change="onTimeChange"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
@ -28,7 +28,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini">导出数据</el-button>
@ -49,8 +49,8 @@
</el-table-column>
<el-table-column label="标准箱名称" align="center" prop="boxName" show-overflow-tooltip/>
<el-table-column label="标准箱编码" align="center" prop="boxCode" show-overflow-tooltip/>
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/>
<el-table-column label="创建日期" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/>
<el-table-column label="创建日期" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column label="操作" align="center" width="400">
<template slot-scope="{ row }">
<el-button size="mini" @click="handleView(row)">
@ -67,14 +67,14 @@
</el-button>
</template>
</el-table-column>
</el-table>
</el-table>
<pagination :total="total"
v-show="total > 0"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 标准箱设备明细 -->
<el-dialog title="标准箱设备明细" :visible.sync="open" width="1000px" append-to-body>
<el-form :model="queryDialogForm" ref="queryDialogForm" size="small" :inline="true" label-width="80px">
@ -99,9 +99,9 @@
<el-table-column label="物资类型" align="center" prop="typeName" show-overflow-tooltip/>
<el-table-column label="规格型号" align="center" prop="typeModelName" show-overflow-tooltip/>
<el-table-column label="设备编码" align="center" prop="maCode" show-overflow-tooltip/>
<el-table-column label="录入人" align="center" prop="createBy" show-overflow-tooltip/>
<el-table-column label="录入人" align="center" prop="createBy" show-overflow-tooltip/>
<!-- <el-table-column label="操作" align="center" width="120">
<template slot-scope="{ row }">
<template slot-scope="{ row }">
<el-button size="mini" type="danger">
删除
</el-button>
@ -113,14 +113,14 @@
:page.sync="queryDialogForm.pageNum"
:limit.sync="queryDialogForm.pageSize"
@pagination="getDialogList"
/>
</el-dialog>
/>
</el-dialog>
<!-- 二维码下载对话框 -->
<el-dialog title="标准箱二维码" :visible.sync="uploadOpen" width="450px" append-to-body :close-on-click-modal="false">
<div style="text-align: center" ref="codeBox">
<div class="uploadImg">
<div id="qrcode" class="qrcode" ref="codeItem"></div>
<div id="qrcode" class="qrcode" ref="codeItem"></div>
</div>
<div class="boxCode">编号{{ rowObj.boxCode }}</div>
</div>
@ -143,7 +143,7 @@ export default {
return {
total: 0, //
loading: false, //
showSearch: true, //
showSearch: true, //
tableList: [], //
queryTime: [], //
selectList: [], //
@ -164,7 +164,7 @@ export default {
pageSize: 10,
},
totalDialog:0,
tableListDialog:[],
tableListDialog:[],
uploadOpen: false,
rowObj:{},
boxCode:""
@ -187,7 +187,7 @@ export default {
},
//
async getList() {
this.loading = true
this.loading = true
const res = await getQrCodeBoxListApi(this.queryParams)
this.tableList = res.data.rows
this.total = res.data.total
@ -207,23 +207,23 @@ export default {
this.queryParams.pageSize = 10
this.queryParams.startTime = ''
this.getList()
},
},
handleAdd(){
console.log('新增')
console.log('新增')
addQrCodeBoxApi({}).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
}
this.getList()
});
},
},
//
handleView(row) {
handleView(row) {
this.rowObj = row
this.uploadOpen = true
this.uploadOpen = true
this.boxCode = row.boxCode
let str = row.boxCode
this.$nextTick(() => {
this.$nextTick(() => {
this.$refs.codeItem.innerHTML = ''
var qrcode = new QRCode(this.$refs.codeItem, {
text: str, //
@ -232,7 +232,7 @@ export default {
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
})
})
}, 500)
},
//
@ -256,11 +256,11 @@ export default {
this.resetQueryDialog()
},
//
async getDialogList() {
async getDialogList() {
const res = await getBoxDetailListApi(this.queryDialogForm)
this.tableListDialog = res.rows
// this.tableListDialog = [{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""}]
this.totalDialog = res.total
this.totalDialog = res.total
this.totalDialog = 3
},
//
@ -269,9 +269,9 @@ export default {
this.getDialogList()
},
//
resetQueryDialog() {
resetQueryDialog() {
this.resetForm('queryDialogForm')
this.queryDialogForm.pageNum = 1
this.queryDialogForm.pageNum = 1
this.getDialogList()
},
@ -281,7 +281,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
}).then(() => {
let param = {
boxId:row.boxId
}
@ -290,7 +290,7 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
},
//
handleExport() {
console.log('数据导出')
@ -327,4 +327,4 @@ export default {
width: 60px !important;
margin-bottom: 10px;
}
</style>
</style>

View File

@ -140,7 +140,7 @@
align="center"
prop="type"
:show-overflow-tooltip="true"
/>
/>
<el-table-column
label="维修单号"
align="center"
@ -156,7 +156,7 @@
<el-table-column
label="提交时间"
align="center"
prop="createTime"
prop="createTime"
:show-overflow-tooltip="true"
>
</el-table-column>
@ -222,7 +222,7 @@
</div>
</template>
<script>
<script>
import {
getScrapApplyListApi,
} from "@/api/repair/scrapManage";
@ -231,11 +231,11 @@ import {
} from "@/api/repair/repair";
export default {
name: "Home",
dicts: ['repair_task_status'],
dicts: ['repair_task_status'],
data() {
return {
//
loading: true,
loading: true,
//
ids: [],
//
@ -245,19 +245,19 @@ export default {
//
showSearch: true,
//
total: 0,
total: 0,
//
tableList: [],
tableList: [],
//
dateRange: [],
statusList: [{value:"0",label:"进行中"},{value:"1",label:"已审核"},{value:"2",label:"驳回"},],
dateRange: [],
statusList: [{value:"0",label:"进行中"},{value:"1",label:"已审核"},{value:"2",label:"驳回"},],
//
queryParams: {
pageNum: 1,
pageSize: 10,
time: null,
keyWord: "",
status: undefined,
status: undefined,
},
passTemp: [],
failTemp: [],
@ -298,7 +298,7 @@ export default {
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
pageNum: this.queryParams.pageNum,
};
getScrapApplyListApi(params).then((response) => {
this.tableList = response.rows;
@ -360,7 +360,7 @@ export default {
handleUpdate(row) {
this.$emit("addTools", row.taskId, row.id,row);
},
// ---------------------------------------
/** 删除按钮操作 */
handleDeletePurchase(row) {
@ -378,7 +378,7 @@ export default {
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
},
/** 导出按钮操作 */
handleExport() {
this.download(
@ -390,7 +390,7 @@ export default {
},
`修试审核_${new Date().getTime()}.xlsx`
);
},
},
},
};
</script>