| | |
| | | selectRawInspectsListById: "/rawInspect/selectRawInspectsListById/", //根据检验单id获取检验单详情 |
| | | updaterawInsProduct: '/rawInsProduct/updaterawInsProduct', //修改项目的检验值 |
| | | updateRawInspectsById: "/rawInspect/updateRawInspectsById/", //上报, |
| | | selectDevice: "/rawInsProduct/selectDevice", //查询设备信息 |
| | | selectSpBySt: "/rawInspect/selectSpBySt", //根据材料id查询所有型号, |
| | | addRawInspects: "/rawInspect/addRawInspects" |
| | | rawSelectDevice: "/rawInsProduct/selectDevice", //查询设备信息 |
| | | addRawInspects: "/rawInspect/addRawInspects", // 添加 |
| | | } |
| | | //不合格原材料 |
| | | const unqualifiedaa ={ |
| | |
| | | > |
| | | <el-table-column type="selection" min-width="50"> </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dateArrival" label="产品大类"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.type == 0">原材料</span> |
| | | <span v-if="scope.row.type == 1">成品</span> |
| | | <span v-if="scope.row.type == 2">半成品</span> |
| | |
| | | <el-table-column prop="number" label="不合格品数量"> |
| | | </el-table-column> |
| | | <el-table-column label="现像描述" min-width="150"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.description" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="处置意见"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showDisposalOpinions(scope)" |
| | | >查看处置意见</el-button |
| | | > |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="130"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | <div style="display: flex;"> |
| | | <el-button type="text" siae="small" size="mini">附件</el-button> |
| | | <el-button |
| | |
| | | // 点击确定按钮 |
| | | updateEditDevided() { |
| | | this.$axios |
| | | .post(this.$api.url.addOpinion, this.updateEditList, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }) |
| | | .post( |
| | | this.$api.url.addOpinion, |
| | | { opinion: this.updateEditList }, |
| | | { |
| | | headers: { "Content-Type": "application/json" } |
| | | } |
| | | ) |
| | | .then(res => { |
| | | console.log(`output->res`, res); |
| | | this.dialogVisible = false; |
| | |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | selectRawInspectsList() { |
| | | this.axios |
| | | .post(this.$api.url.selectRawInspectsList, this.search) |
| | | this.$axios |
| | | .get(this.$api.url.selectRawInspectsList, { params: this.search }) |
| | | .then(res => { |
| | | this.tableData = res.data.row; |
| | | this.total = res.data.total; |
| | |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.name" |
| | | v-model="detailInfo.rname" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.name" |
| | | placeholder="请输入" |
| | | placeholder="请输入原材料名称" |
| | | ></el-input> </el-form-item |
| | | ></el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="原材料编码:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.rcode" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.code" |
| | | placeholder="请输入原材料编码" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.specificationsArr" |
| | | v-model="detailInfo.specifications" |
| | | placeholder="请输入规格型号" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-col :span="7"> |
| | | <el-form-item label="单位:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.runit" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | placeholder="请输入检验单位" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.unit" |
| | |
| | | <el-col :span="7"> |
| | | <el-form-item label="数量:"> |
| | | <el-input |
| | | placeholder="请输入检验数量" |
| | | :placeholder="detailId !== null ? '' : '请输入检验数量'" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.number" |
| | | ></el-input> |
| | |
| | | <el-col :span="7"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input |
| | | placeholder="请输入检验数量" |
| | | :placeholder="detailId !== null ? '' : '请输入检验数量'" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.number" |
| | | v-model="detailInfo.supplier" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-form-item v-show="detailId !== null" label="报检日期:"> |
| | | <el-input |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.createTime" |
| | | v-model="detailInfo.creatTime" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">检验项目</el-col> |
| | | <el-col :span="12" style="line-height: 32px; padding-top: 6px;"> |
| | | <el-button v-if="detailId == null" style="float: right;" |
| | | <el-button |
| | | style="float: right;" |
| | | @click="clickDeleteInspectionColumn()" |
| | | >删除检验值列</el-button |
| | | > |
| | | <el-button |
| | | style="float: right;margin-right: 30px;" |
| | | @click="clickAddInspectionColumn()" |
| | | >添加检验值列</el-button |
| | | > |
| | | <el-button |
| | |
| | | </div> |
| | | <div class="raw-project-table"> |
| | | <el-table :data="projectTable" style="width: 100%" height="320"> |
| | | <el-table-column type="index" label="序号" width="100"> |
| | | <el-table-column type="index" label="序号" width="60"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="项目" width="212"> |
| | | <template scope="scope"> |
| | | <el-table-column prop="rpName" label="项目" width="212"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if="detailId == null" |
| | | v-model="scope.row.name" |
| | | placeholder="请输入项目名称" |
| | | ></el-input> |
| | | <el-input v-else v-model="scope.row.rpName" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位" width="148"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if="detailId == null" |
| | | v-model="scope.row.unit" |
| | | placeholder="请输入单位" |
| | | ></el-input> |
| | | <el-input v-else v-model="scope.row.rpUnit" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="标准" width="254"> |
| | | <template scope="scope"> |
| | | <el-table-column prop="required" label="标准" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.required" |
| | | placeholder="请输入标准值" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="internal" label="内控值" width="254"> |
| | | <template scope="scope"> |
| | | <el-table-column prop="internal" label="内控值" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.internal" |
| | | placeholder="请输入内控值" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testValue" label="检查值" width="254"> |
| | | <el-table-column |
| | | prop="testValue" |
| | | label="检测值" |
| | | min-width="150" |
| | | v-for="(item, index) in empiricalValueAdd" |
| | | :key="index" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.testValue" |
| | | @blur="changeState(scope.row)" |
| | | placeholder="请输入检测值" |
| | | ></el-input> |
| | | <el-tooltip |
| | | :disabled="scope.row.deviceId != null" |
| | | class="item" |
| | | effect="dark" |
| | | content="请先选择设备!" |
| | | placement="top-start" |
| | | > |
| | | <el-input |
| | | :disabled="scope.row.deviceId == null" |
| | | v-model="scope.row.testValueList[index]" |
| | | @blur="changeState(scope.row, index)" |
| | | placeholder="请输入检测值" |
| | | ></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="试验设备"> |
| | | <el-button type="text">选择</el-button> |
| | | <el-table-column prop="deviceName" label="试验设备" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.deviceId == null ? "请选择" : scope.row.deviceName |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testState" label="结论"> |
| | | <el-table-column |
| | | v-if="detailId !== null" |
| | | prop="testState" |
| | | label="结论" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-show="scope.row.testState != null" |
| | |
| | | <span v-show="scope.row.testState == null">暂未结论</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId == null" label="操作" fixed="right"> |
| | | <template scope="scope"> |
| | | <el-table-column v-if="detailId == null" label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)" |
| | | >删除</el-button |
| | | > |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog |
| | | title="请选择设备" |
| | | :visible.sync="centerDialogVisible" |
| | | width="20%" |
| | | > |
| | | <div class="div_device_dialog"> |
| | | <el-input |
| | | placeholder="输入关键字进行过滤" |
| | | v-model="filterText" |
| | | style="margin-bottom: 6px;" |
| | | > |
| | | </el-input> |
| | | <el-tree |
| | | class="filter-tree" |
| | | :data="materialOptions" |
| | | :props="defaultProps" |
| | | default-expand-all |
| | | highlight-current |
| | | @node-click="nodeClick" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span |
| | | ><i |
| | | :class=" |
| | | `node_i ${ |
| | | data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | " |
| | | ></i> |
| | | {{ data.name }}</span |
| | | > |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // 添加列 |
| | | empiricalValueAdd: 1, |
| | | // 编辑时存储最长的列数字,做删除判断 |
| | | empiricalValueAddMaxNumber: 0, |
| | | // 设备选择树显示 |
| | | centerDialogVisible: false, |
| | | // 详情页就是详情信息 |
| | | detailInfo: {}, |
| | | // 表格 |
| | | projectTable: [], |
| | | // 新建检验单参数对象 |
| | | rawInsParams: {}, |
| | | // 项目名称options |
| | | materialOptions: [], |
| | | specificationOptions: [] |
| | | specificationOptions: [], |
| | | filterText: "", |
| | | materialOptions: [], // 树数据 |
| | | defaultProps: { |
| | | // 设备树数据设置 |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // node点击保存当前点击数据 |
| | | clickSelectSaveIndex: "" // 点击选择存储列表索引 |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | methods: { |
| | | // 设备树过滤搜索 |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | |
| | | // 获取报检单详情信息 |
| | | async getDetailInfo() { |
| | | const { data } = await this.$axios.get( |
| | | this.$api.url.selectRawInspectsListById + `${this.detailId}`, |
| | | { params: { id: this.detailId } } |
| | | ); |
| | | this.detailInfo = data; |
| | | this.projectTable = data.rawInsProducts; |
| | | await this.$axios |
| | | .get(this.$api.url.selectRawInspectsListById + `${this.detailId}`, { |
| | | params: { id: this.detailId } |
| | | }) |
| | | .then(res => { |
| | | this.detailInfo = res.data; |
| | | this.projectTable = res.data.children; |
| | | this.projectTable.forEach(i => { |
| | | i.testValueList = i.testValue.split(","); |
| | | // 取最长的列表数 |
| | | if (i.testValueList.length > this.empiricalValueAdd) { |
| | | this.empiricalValueAdd = i.testValueList.length; |
| | | this.empiricalValueAddMaxNumber = i.testValueList.length - 1; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | // 新增检验单 |
| | | async addNewRawInspect() { |
| | | this.detailInfo.specifications = this.detailInfo.specificationsArr.join( |
| | | "-" |
| | | ); |
| | | // const time = this.detailInfo.formTime |
| | | // this.detailInfo.formTime = `${time.getFullYear()}-${time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1}-${time.getDate() < 10 ? '0' + time.getDate() : time.getDate()}` |
| | | this.projectTable.forEach(i => { |
| | | // 将列表转换为字符串 |
| | | i.testValue = i.testValueList.join(","); |
| | | }); |
| | | this.detailInfo.rawInsProducts = this.projectTable; |
| | | const res = await this.$axios.post( |
| | | this.$api.url.addRawInspects, |
| | | { ...this.detailInfo }, |
| | |
| | | ); |
| | | this.detailId = res.data; |
| | | this.getDetailInfo(); |
| | | |
| | | this.$message.success("提交成功"); |
| | | this.$message.success(res.message); |
| | | }, |
| | | |
| | | // 修改项目的检测值改变结论 |
| | | async changeState(row) { |
| | | const res = await this.$axios.post( |
| | | this.$api.url.updaterawInsProduct, |
| | | { ...row }, |
| | | { headers: { "Content-Type": "application/json" } } |
| | | ); |
| | | this.$message.success("提交成功"); |
| | | this.getDetailInfo(); //重新刷新信息数据 |
| | | async changeState(row, index) { |
| | | if (this.detailId !== null) { |
| | | const res = await this.$axios.post(this.$api.url.updaterawInsProduct, { |
| | | DevId: row.deviceId, |
| | | rpId: this.detailId, |
| | | testValue: row.testValueList[index] |
| | | }); |
| | | this.$message.success("提交成功"); |
| | | this.getDetailInfo(); //重新刷新信息数据 |
| | | } |
| | | }, |
| | | async submitSave() { |
| | | const res = await this.$axios.post( |
| | |
| | | this.$message.success("提交成功"); |
| | | this.getDetailInfo(); |
| | | }, |
| | | async getOptions() { |
| | | const { data } = await this.$axios.get(this.$api.url.selectDevice); |
| | | this.materialOptions = data; |
| | | }, |
| | | checkRawName(data) { |
| | | this.materialOptions.forEach(item => { |
| | | if (item.name === data) { |
| | | this.detailInfo.code = item.code; |
| | | this.$axios |
| | | .get(this.$api.url.selectSpBySt, { params: { id: item.id } }) |
| | | .then(res => { |
| | | this.specificationOptions = res.data; |
| | | }); |
| | | } |
| | | // 获取设备树内容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | // 添加行 |
| | | clickAddLine() { |
| | | let obj = { |
| | | deviceId: 0, |
| | | deviceId: null, |
| | | deviceName: "", |
| | | internal: "", |
| | | name: "", |
| | | required: "", |
| | | testValue: "", |
| | | textValue: "", |
| | | testValueList: [], |
| | | unit: "" |
| | | }; |
| | | this.projectTable.push(obj); |
| | |
| | | // 删除行 |
| | | clickDeleteline(scope) { |
| | | this.projectTable.splice(scope.$index, 1); |
| | | }, |
| | | // 点击设备树保存点击记录 |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // 点击表格选择触发 |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectSaveIndex = scope.$index; |
| | | }, |
| | | // 点击树里面的确定 |
| | | clickNodeSure() { |
| | | this.projectTable[this.clickSelectSaveIndex].deviceId = this.nodeData.id; |
| | | this.projectTable[ |
| | | this.clickSelectSaveIndex |
| | | ].deviceName = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | }, |
| | | // 删除检验值列 |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.projectTable.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // 添加检验值列 |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | .div_device_dialog { |
| | | min-height: 400px; |
| | | overflow: auto; |
| | | } |
| | | .rawInsBox { |
| | | height: 100%; |
| | | width: 100%; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .el-table__fixed-body-wrapper { |
| | | top: 48px; |
| | | } |
| | | .rawInsBox .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <style scoped> |
| | | .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | .title * { |
| | | font-size: 16px; |
| | | } |
| | | .title * { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .thing { |
| | | width: 100%; |
| | | height: calc(100% - 120px); |
| | | background-color: #fff; |
| | | display: flex; |
| | | } |
| | | .thing { |
| | | width: 100%; |
| | | height: calc(100% - 120px); |
| | | background-color: #fff; |
| | | display: flex; |
| | | } |
| | | |
| | | .thing .left { |
| | | width: 295px; |
| | | height: calc(100% - 20px); |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | } |
| | | .thing .left { |
| | | width: 295px; |
| | | height: calc(100% - 20px); |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | } |
| | | |
| | | .thing .left .custom-tree-node span { |
| | | font-size: 14px; |
| | | } |
| | | .thing .left .custom-tree-node span { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .thing .left .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | .thing .left .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004EA2; |
| | | } |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | |
| | | .thing .right { |
| | | width: calc(100% - 305px); |
| | | height: calc(100% - 25px); |
| | | overflow: hidden; |
| | | padding: 10px; |
| | | } |
| | | .thing .right { |
| | | width: calc(100% - 305px); |
| | | height: calc(100% - 25px); |
| | | overflow: hidden; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| | | <style> |
| | | .record_content .title .el-button * { |
| | | font-size: 14px; |
| | | } |
| | | .record_content .title .el-button * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .record_content .title .el-button--default { |
| | | color: #004EA2; |
| | | } |
| | | .record_content .title .el-button--default { |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .record_content .thing .left .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | background: rgba(58, 124, 253, 0.2); |
| | | color: #004EA2; |
| | | } |
| | | .record_content |
| | | .thing |
| | | .left |
| | | .el-tree--highlight-current |
| | | .el-tree-node.is-current |
| | | > .el-tree-node__content { |
| | | background: rgba(58, 124, 253, 0.2); |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .record_content .el-tree-node__content { |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | .record_content .el-tree-node__content { |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | <template> |
| | | <div class="record_content"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">记录内容维护</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="addend">新增</el-button> |
| | | <el-button icon="el-icon-edit-outline" @click="modify">修改</el-button> |
| | | <el-button icon="el-icon-delete" @click="dels">删除</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>类型:</span> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | <!-- <span>工序:</span> |
| | | <div class="record_content"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">记录内容维护</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | style="background: #004EA2;" |
| | | @click="addend" |
| | | >新增</el-button |
| | | > |
| | | <el-button icon="el-icon-edit-outline" @click="modify" |
| | | >修改</el-button |
| | | > |
| | | <el-button icon="el-icon-delete" @click="dels">删除</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>类型:</span> |
| | | <el-select |
| | | v-model="search.type" |
| | | size="small" |
| | | @change="TYpe" |
| | | placeholder="请选择" |
| | | style="width: 224px;margin-right: 30px;" |
| | | > |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | <!-- <span>工序:</span> |
| | | <el-select v-model="search.name" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | <el-button size="mini" @click="clean()"><span>重 置</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>查 |
| | | 询</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable @input="(val)=>$refs.tree.filter(val)"></el-input> |
| | | <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" node-key="id" default-expand-all |
| | | @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :filter-node-method="filterNode" |
| | | :key="upIndex"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{data.code}} {{ data.name }}</span> |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="right"> |
| | | <el-table :data="tableData" border style="width: 100%;overflow-y: auto;min-height: 100%" max-height="100%" |
| | | @selection-change="handleSelectionChange" default-expand-all> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column type="index" label="序号" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="名称"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位"> |
| | | </el-table-column> |
| | | <el-table-column prop="note" label="备注"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)">编辑 </span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)">删除</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="编辑记录内容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">类型:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.type" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">工序:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techFather" |
| | | placeholder="请选择类型" |
| | | @change="workevent" |
| | | style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">工艺:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techName" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">名称:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.name" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">单位:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.unit" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">备注:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.note" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitUpData">确 定</el-button> |
| | | <el-button @click="upDia = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 新增弹窗 --> |
| | | <el-dialog title="工序新增" :visible.sync="dialogVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="form.type" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="form.work" |
| | | @change="workevent" |
| | | placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select v-model="form.craft" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="add">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input |
| | | v-model="search.technology" |
| | | suffix-icon="el-icon-search" |
| | | placeholder="请输入搜索内容" |
| | | size="small" |
| | | clearable |
| | | @input="val => $refs.tree.filter(val)" |
| | | ></el-input> |
| | | <el-tree |
| | | :data="list" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'name' }" |
| | | node-key="id" |
| | | default-expand-all |
| | | @node-click="handleNodeClick" |
| | | highlight-current |
| | | @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" |
| | | :filter-node-method="filterNode" |
| | | :key="upIndex" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span |
| | | ><i |
| | | :class=" |
| | | `node_i ${ |
| | | data.code != '[2]' |
| | | ? 'el-icon-folder-opened' |
| | | : 'el-icon-tickets' |
| | | }` |
| | | " |
| | | ></i> |
| | | {{ data.code }} {{ data.name }}</span |
| | | > |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="right"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%;overflow-y: auto;min-height: 100%" |
| | | max-height="100%" |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="序号" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="名称"> </el-table-column> |
| | | <el-table-column prop="unit" label="单位"> </el-table-column> |
| | | <el-table-column prop="note" label="备注"> </el-table-column> |
| | | <el-table-column label="操作" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)" |
| | | >编辑 </span |
| | | > |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)" |
| | | >删除</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="编辑记录内容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >类型:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select |
| | | v-model="edit.type" |
| | | placeholder="请选择类型" |
| | | style="width: 310px;" |
| | | > |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >工序:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select |
| | | v-model="edit.techFather" |
| | | placeholder="请选择类型" |
| | | @change="workevent" |
| | | style="width: 310px;" |
| | | > |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >工艺:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select |
| | | v-model="edit.techName" |
| | | placeholder="请选择类型" |
| | | style="width: 310px;" |
| | | > |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >名称:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.name" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >单位:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.unit" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;" |
| | | >备注:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData.note" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitUpData">确 定</el-button> |
| | | <el-button @click="upDia = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 新增弹窗 --> |
| | | <el-dialog title="工序新增" :visible.sync="dialogVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.type" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.work" |
| | | @change="workevent" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.craft" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="add">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 修改弹窗 --> |
| | | <el-dialog title="工序编辑" :visible.sync="modifyVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="modifyVisible = false">确 定</el-button> |
| | | <el-button @click="modifyVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <!-- 修改弹窗 --> |
| | | <el-dialog title="工序编辑" :visible.sync="modifyVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="请选择类型" |
| | | style="width: 480px;" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="modifyVisible = false" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="modifyVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | type: 0, |
| | | name: 2, |
| | | technology: 2 |
| | | }, |
| | | options:[], |
| | | value:{}, |
| | | craftapi:[], |
| | | form:{ |
| | | type:'', |
| | | work:'', |
| | | craft:'', |
| | | name:'', |
| | | record:'', |
| | | remarks:'', |
| | | unit:'', |
| | | }, |
| | | modifyVisible:false, |
| | | dialogVisible:false, |
| | | process: {}, |
| | | list: [], |
| | | checkTreeNode: {}, |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | delete:[], |
| | | typeselect:0, |
| | | upDia: false, |
| | | checkTreeNode:{ |
| | | id:2, |
| | | }, |
| | | upData:{}, |
| | | edit:{ |
| | | name:'', |
| | | note:'', |
| | | techFather:'', |
| | | techName:'', |
| | | type:'', |
| | | unit:'', |
| | | }, |
| | | upData: { |
| | | id: 0, |
| | | name: null, |
| | | unit: null, |
| | | thing: null |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft() |
| | | this.selectjilu() |
| | | }, |
| | | methods: { |
| | | delQueById() { |
| | | this.$axios.get(this.$api.url.delQueById,) |
| | | }, |
| | | childrenClick() {}, |
| | | //新增 |
| | | workevent(val){ |
| | | console.log(val); |
| | | let idx = this.process.findIndex(el => el.name === val) |
| | | this.craftapi = this.process[idx].children |
| | | }, |
| | | chooseTechFath() { |
| | | this.$axios.get(this.$api.url.chooseTechFath,{ |
| | | params:{type:this.typeselect} |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | console.log(this.process); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | addRecord() { |
| | | this.$axios.post(this.$api.url.addRecord,{ |
| | | name:this.form.record, |
| | | note:this.form.remarks, |
| | | techTemId:this.form.craft, |
| | | unit:this.form.unit, |
| | | } |
| | | , { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | add() { |
| | | this.dialogVisible = false |
| | | this.addRecord() |
| | | this.selectjilu() |
| | | this.form = {}; |
| | | }, |
| | | //编辑 this.upData |
| | | selecRecord() { |
| | | this.$axios.get(this.$api.url.selecRecord,{ |
| | | params:{ |
| | | id:this.upData.id |
| | | } |
| | | }).then(res => { |
| | | this.edit = res.data[0] |
| | | // console.log(this.edit); |
| | | }) |
| | | }, |
| | | TYpe(val) { |
| | | this.typeselect = val |
| | | console.log(this.typeselect); |
| | | this.selectAllleft() |
| | | }, |
| | | //主体左 |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | | params:{type:this.typeselect} |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList() |
| | | }) |
| | | }, |
| | | //selectjilu checkTreeNode |
| | | selectjilu() { |
| | | this.$axios.get(this.$api.url.selectjilu,{ |
| | | params:{id:this.checkTreeNode.id} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }) |
| | | }, |
| | | modify(){ |
| | | this.modifyVisible = true |
| | | }, |
| | | addend(){ |
| | | this.dialogVisible = true |
| | | this.chooseTechFath() |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("是否删除", "警告", { |
| | | type: "warning" |
| | | }).then(res => { |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | const index = children.findIndex(d => d.id === data.id); |
| | | children.splice(index, 1); |
| | | }).catch(e => {}) |
| | | }, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | | if (a.children != undefined) { |
| | | a.children.forEach(b => { |
| | | b.code = '[2]' |
| | | if (b.children != undefined) { |
| | | b.children.forEach(c => { |
| | | c.code = '[3]' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.upIndex++ |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.checkTreeNode = data |
| | | this.selectjilu() |
| | | if(data.code=='[3]'){ |
| | | console.log(data); |
| | | } |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | dels() { |
| | | this.selects.forEach(a => { |
| | | for (var b = 0; b < this.tableData.length; b++) { |
| | | if (this.tableData[b].id == a.id) { |
| | | this.tableData.splice(b, 1) |
| | | b-- |
| | | } |
| | | } |
| | | }) |
| | | let cc = this.selects.map(el => { |
| | | return el.id |
| | | }) |
| | | this.delete = cc.join(',') |
| | | console.log(this.delete); |
| | | this.delAllRecord() |
| | | this.$message.success('删除完成') |
| | | }, |
| | | //批量删除 |
| | | delAllRecord() { |
| | | this.$axios.post(this.$api.url.delAllRecord,{ |
| | | ids:this.delete |
| | | }) |
| | | }, |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | type: 0, |
| | | name: 2, |
| | | technology: 2 |
| | | }, |
| | | options: [], |
| | | value: {}, |
| | | craftapi: [], |
| | | form: { |
| | | type: "", |
| | | work: "", |
| | | craft: "", |
| | | name: "", |
| | | record: "", |
| | | remarks: "", |
| | | unit: "" |
| | | }, |
| | | modifyVisible: false, |
| | | dialogVisible: false, |
| | | process: {}, |
| | | list: [], |
| | | checkTreeNode: {}, |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | delete: [], |
| | | typeselect: 0, |
| | | upDia: false, |
| | | checkTreeNode: { |
| | | id: 2 |
| | | }, |
| | | upData: {}, |
| | | edit: { |
| | | name: "", |
| | | note: "", |
| | | techFather: "", |
| | | techName: "", |
| | | type: "", |
| | | unit: "" |
| | | }, |
| | | upData: { |
| | | id: 0, |
| | | name: null, |
| | | unit: null, |
| | | thing: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft(); |
| | | this.selectjilu(); |
| | | }, |
| | | methods: { |
| | | delQueById() { |
| | | this.$axios.get(this.$api.url.delQueById); |
| | | }, |
| | | childrenClick() {}, |
| | | //新增 |
| | | workevent(val) { |
| | | console.log(val); |
| | | let idx = this.process.findIndex(el => el.name === val); |
| | | this.craftapi = this.process[idx].children; |
| | | }, |
| | | chooseTechFath() { |
| | | this.$axios |
| | | .get(this.$api.url.chooseTechFath, { |
| | | params: { type: this.typeselect } |
| | | }) |
| | | .then( |
| | | res => { |
| | | this.process = res.data; |
| | | console.log(this.process); |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | } |
| | | ); |
| | | }, |
| | | addRecord() { |
| | | this.$axios.post( |
| | | this.$api.url.addRecord, |
| | | { |
| | | name: this.form.record, |
| | | note: this.form.remarks, |
| | | techTemId: this.form.craft, |
| | | unit: this.form.unit |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | } |
| | | ); |
| | | }, |
| | | add() { |
| | | this.dialogVisible = false; |
| | | this.addRecord(); |
| | | this.selectjilu(); |
| | | this.form = {}; |
| | | }, |
| | | //编辑 this.upData |
| | | selecRecord() { |
| | | this.$axios |
| | | .get(this.$api.url.selecRecord, { |
| | | params: { |
| | | id: this.upData.id |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.edit = res.data[0]; |
| | | // console.log(this.edit); |
| | | }); |
| | | }, |
| | | TYpe(val) { |
| | | this.typeselect = val; |
| | | console.log(this.typeselect); |
| | | this.selectAllleft(); |
| | | }, |
| | | //主体左 |
| | | selectAllleft() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllleft, { |
| | | params: { type: this.typeselect } |
| | | }) |
| | | .then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList(); |
| | | }); |
| | | }, |
| | | //selectjilu checkTreeNode |
| | | selectjilu() { |
| | | this.$axios |
| | | .get(this.$api.url.selectjilu, { |
| | | params: { id: this.checkTreeNode.id } |
| | | }) |
| | | .then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }); |
| | | }, |
| | | modify() { |
| | | this.modifyVisible = true; |
| | | }, |
| | | addend() { |
| | | this.dialogVisible = true; |
| | | this.chooseTechFath(); |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("是否删除", "警告", { |
| | | type: "warning" |
| | | }) |
| | | .then(res => { |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | const index = children.findIndex(d => d.id === data.id); |
| | | children.splice(index, 1); |
| | | }) |
| | | .catch(e => {}); |
| | | }, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = "[1]"; |
| | | if (a.children != undefined) { |
| | | a.children.forEach(b => { |
| | | b.code = "[2]"; |
| | | if (b.children != undefined) { |
| | | b.children.forEach(c => { |
| | | c.code = "[3]"; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | this.upIndex++; |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.checkTreeNode = data; |
| | | this.selectjilu(); |
| | | if (data.code == "[3]") { |
| | | console.log(data); |
| | | } |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr( |
| | | "class", |
| | | "node_i el-icon-folder-opened" |
| | | ); |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | dels() { |
| | | this.selects.forEach(a => { |
| | | for (var b = 0; b < this.tableData.length; b++) { |
| | | if (this.tableData[b].id == a.id) { |
| | | this.tableData.splice(b, 1); |
| | | b--; |
| | | } |
| | | } |
| | | }); |
| | | let cc = this.selects.map(el => { |
| | | return el.id; |
| | | }); |
| | | this.delete = cc.join(","); |
| | | console.log(this.delete); |
| | | this.delAllRecord(); |
| | | this.$message.success("删除完成"); |
| | | }, |
| | | //批量删除 |
| | | delAllRecord() { |
| | | this.$axios.post(this.$api.url.delAllRecord, { |
| | | ids: this.delete |
| | | }); |
| | | }, |
| | | |
| | | //删除 |
| | | delQueById() { |
| | | this.$axios.post(this.$api.url.delQueById,{ |
| | | id:this.upData.id |
| | | }) |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index,1) |
| | | this.upData.id = rows.id |
| | | this.delQueById() |
| | | }, |
| | | //删除 |
| | | delQueById() { |
| | | this.$axios.post(this.$api.url.delQueById, { |
| | | id: this.upData.id |
| | | }); |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index, 1); |
| | | this.upData.id = rows.id; |
| | | this.delQueById(); |
| | | }, |
| | | |
| | | upContent(ob) { |
| | | this.upData = ob |
| | | console.log(this.upData); |
| | | this.selecRecord() |
| | | this.chooseTechFath() |
| | | this.upDia = true |
| | | }, |
| | | submitUpData() { |
| | | this.tableData.forEach(a => { |
| | | if (a.id == this.upData.id) { |
| | | a.name = this.upData.name |
| | | a.unit = this.upData.unit |
| | | a.thing = this.upData.thing |
| | | } |
| | | }) |
| | | this.$message.success('修改成功') |
| | | this.upDia = false |
| | | } |
| | | } |
| | | } |
| | | upContent(ob) { |
| | | this.upData = ob; |
| | | console.log(this.upData); |
| | | this.selecRecord(); |
| | | this.chooseTechFath(); |
| | | this.upDia = true; |
| | | }, |
| | | submitUpData() { |
| | | this.tableData.forEach(a => { |
| | | if (a.id == this.upData.id) { |
| | | a.name = this.upData.name; |
| | | a.unit = this.upData.unit; |
| | | a.thing = this.upData.thing; |
| | | } |
| | | }); |
| | | this.$message.success("修改成功"); |
| | | this.upDia = false; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60"> |
| | | <template scope="scope"> |
| | | <template slot-scope="scope"> |
| | | {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | |
| | | // console.log(config.data) |
| | | } |
| | | |
| | | |
| | | return config |
| | | }, function(error) { |
| | | return Promise.reject(error) |
| | |
| | | <style scoped> |
| | | .enter { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | display: flex; |
| | | background-image: url("../../static/img/登录.png"); |
| | | background-size: 100% 100%; |
| | | } |
| | | .enter { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | display: flex; |
| | | background-image: url("../../static/img/登录.png"); |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .left { |
| | | width: calc(100% - 500px); |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | .left { |
| | | width: calc(100% - 500px); |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .left img { |
| | | width: 100%; |
| | | min-height: 100%; |
| | | } |
| | | .left img { |
| | | width: 100%; |
| | | min-height: 100%; |
| | | } |
| | | |
| | | .right { |
| | | width: 600px; |
| | | overflow-y: auto; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .right { |
| | | width: 600px; |
| | | overflow-y: auto; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .title_big { |
| | | color: #004EA2; |
| | | font-size: 40px; |
| | | margin-bottom: 8px; |
| | | } |
| | | .title_big { |
| | | color: #004ea2; |
| | | font-size: 40px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .title_small { |
| | | color: #004EA2; |
| | | font-size: 24px; |
| | | } |
| | | .title_small { |
| | | color: #004ea2; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .elform { |
| | | margin-top: 50px; |
| | | } |
| | | .elform { |
| | | margin-top: 50px; |
| | | } |
| | | |
| | | .sao { |
| | | font-size: 14px; |
| | | color: #004EA2; |
| | | width: 100%; |
| | | text-align: right; |
| | | } |
| | | .sao { |
| | | font-size: 14px; |
| | | color: #004ea2; |
| | | width: 100%; |
| | | text-align: right; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .enter .el-form-item__label { |
| | | font-size: 20px; |
| | | color: #333; |
| | | line-height: 48px; |
| | | } |
| | | .enter .el-form-item__label { |
| | | font-size: 20px; |
| | | color: #333; |
| | | line-height: 48px; |
| | | } |
| | | |
| | | .enter .el-form-item { |
| | | margin-bottom: 30px; |
| | | } |
| | | .enter .el-form-item { |
| | | margin-bottom: 30px; |
| | | } |
| | | |
| | | .enter .el-input__inner { |
| | | height: 48px; |
| | | } |
| | | .enter .el-input__inner { |
| | | height: 48px; |
| | | } |
| | | |
| | | .enter .el-button { |
| | | background-color: #1763EB; |
| | | color: #fff; |
| | | border: 0; |
| | | border-radius: 16px; |
| | | width: 100%; |
| | | height: 48px; |
| | | } |
| | | .enter .el-button { |
| | | background-color: #1763eb; |
| | | color: #fff; |
| | | border: 0; |
| | | border-radius: 16px; |
| | | width: 100%; |
| | | height: 48px; |
| | | } |
| | | |
| | | .enter input::-webkit-input-placeholder, |
| | | .enter textarea::-webkit-input-placeholder { |
| | | font-size: 14px; |
| | | } |
| | | .enter input::-webkit-input-placeholder, |
| | | .enter textarea::-webkit-input-placeholder { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .enter input::-moz-placeholder, |
| | | .enter textarea::-moz-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | .enter input::-moz-placeholder, |
| | | .enter textarea::-moz-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | |
| | | .enter input:-ms-input-placeholder, |
| | | .enter textarea:-ms-input-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | .enter input:-ms-input-placeholder, |
| | | .enter textarea:-ms-input-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | |
| | | .enter input:-moz-placeholder, |
| | | .enter textarea:-moz-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | .enter input:-moz-placeholder, |
| | | .enter textarea:-moz-placeholder { |
| | | font-size: 10px; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="enter"> |
| | | <div class="left"> |
| | | <img src="../../static/img/登录背景.png"> |
| | | <img src="../../static/img/登录背景.png" /> |
| | | </div> |
| | | <div class="right"> |
| | | <div style="width: calc(100% - 100px * 2);"> |
| | | <div class="title_big">欢迎您登录!</div> |
| | | <div class="title_small">电缆附件新一代mom系统</div> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="elform" :hide-required-asterisk="true"> |
| | | <el-form |
| | | :model="ruleForm" |
| | | :rules="rules" |
| | | ref="ruleForm" |
| | | class="elform" |
| | | :hide-required-asterisk="true" |
| | | > |
| | | <el-form-item label="用户名" prop="account"> |
| | | <el-input v-model="ruleForm.account" placeholder="请输入账号" clearable></el-input> |
| | | <el-input |
| | | v-model="ruleForm.account" |
| | | placeholder="请输入账号" |
| | | clearable |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="密码" prop="pwd"> |
| | | <el-input v-model="ruleForm.pwd" placeholder="请输入密码" clearable show-password></el-input> |
| | | <el-input |
| | | v-model="ruleForm.pwd" |
| | | placeholder="请输入密码" |
| | | clearable |
| | | show-password |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="margin-bottom: 8px;"> |
| | | <el-col :span="12"><el-checkbox v-model="ruleForm.remumberme">记住密码</el-checkbox></el-col> |
| | | <el-col :span="12" style="text-align: right;"><el-checkbox |
| | | v-model="ruleForm.autoenter">自动登录</el-checkbox></el-col> |
| | | <el-col :span="12" |
| | | ><el-checkbox v-model="ruleForm.remumberme" |
| | | >记住密码</el-checkbox |
| | | ></el-col |
| | | > |
| | | <el-col :span="12" style="text-align: right;" |
| | | ><el-checkbox v-model="ruleForm.autoenter" |
| | | >自动登录</el-checkbox |
| | | ></el-col |
| | | > |
| | | </el-form-item> |
| | | <el-form-item style="margin-bottom: 15px;"> |
| | | <el-button type="primary" @click="submitForm('ruleForm')" :loading="btnload">立即登录</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitForm('ruleForm')" |
| | | :loading="btnload" |
| | | >立即登录</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="sao">微信扫码登录</div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | ruleForm: { |
| | | account: null, |
| | | pwd: null, |
| | | remumberme: false, |
| | | autoenter: false |
| | | }, |
| | | rules: { |
| | | account: [{ |
| | | export default { |
| | | data() { |
| | | return { |
| | | ruleForm: { |
| | | account: null, |
| | | pwd: null, |
| | | remumberme: false, |
| | | autoenter: false |
| | | }, |
| | | rules: { |
| | | account: [ |
| | | { |
| | | required: true, |
| | | message: '请输入账号', |
| | | trigger: ['blur', 'change'] |
| | | }], |
| | | pwd: [{ |
| | | message: "请输入账号", |
| | | trigger: ["blur", "change"] |
| | | } |
| | | ], |
| | | pwd: [ |
| | | { |
| | | required: true, |
| | | message: '请输入密码', |
| | | trigger: ['blur', 'change'] |
| | | }] |
| | | }, |
| | | btnload: false |
| | | message: "请输入密码", |
| | | trigger: ["blur", "change"] |
| | | } |
| | | ] |
| | | }, |
| | | btnload: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.ruleForm.remumberme = |
| | | JSON.parse(localStorage.getItem("rememberme")) == null |
| | | ? false |
| | | : JSON.parse(localStorage.getItem("rememberme")); |
| | | this.ruleForm.autoenter = |
| | | JSON.parse(localStorage.getItem("autoenter")) == null |
| | | ? false |
| | | : JSON.parse(localStorage.getItem("autoenter")); |
| | | var user = JSON.parse(localStorage.getItem("user")); |
| | | if (user != null && user != undefined) { |
| | | if (this.ruleForm.remumberme == true) { |
| | | this.ruleForm.account = user.account; |
| | | this.ruleForm.pwd = user.password; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.ruleForm.remumberme = JSON.parse(localStorage.getItem('rememberme'))==null?false:JSON.parse(localStorage.getItem('rememberme')) |
| | | this.ruleForm.autoenter = JSON.parse(localStorage.getItem('autoenter'))==null?false:JSON.parse(localStorage.getItem('autoenter')) |
| | | var user = JSON.parse(localStorage.getItem('user')) |
| | | if (user != null && user != undefined) { |
| | | if (this.ruleForm.remumberme==true) { |
| | | this.ruleForm.account = user.account |
| | | this.ruleForm.pwd = user.password |
| | | } |
| | | if (this.ruleForm.autoenter==true) { |
| | | this.submitForm('ruleForm') |
| | | } |
| | | if (this.ruleForm.autoenter == true) { |
| | | this.submitForm("ruleForm"); |
| | | } |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.btnload = true |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.axios.post(this.$api.url.enter, { |
| | | } |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.btnload = true; |
| | | this.$refs[formName].validate(valid => { |
| | | if (valid) { |
| | | this.axios |
| | | .post(this.$api.url.enter, { |
| | | account: this.ruleForm.account, |
| | | password: this.ruleForm.pwd |
| | | }).then(res => { |
| | | this.btnload = false |
| | | if (res.data == null) { |
| | | this.$message.error("账号或密码错误") |
| | | return |
| | | } |
| | | localStorage.setItem('rememberme', this.ruleForm.remumberme) |
| | | localStorage.setItem('autoenter', this.ruleForm.autoenter) |
| | | if (this.ruleForm.remumberme==true||this.ruleForm.autoenter==true) localStorage.setItem('user', JSON.stringify({ |
| | | account: this.ruleForm.account, |
| | | password: this.ruleForm.pwd, |
| | | name: res.data.name |
| | | })) |
| | | sessionStorage.setItem('token', res.data.token) |
| | | sessionStorage.setItem('reToken', res.data.reToken) |
| | | this.$message.success("登录成功") |
| | | this.$router.push('/') |
| | | }).catch(e => { |
| | | this.btnload = false |
| | | this.$message.error('登录失败, 请联系管理员') |
| | | }) |
| | | } else { |
| | | this.btnload = false |
| | | this.$message.error('账号或密码未输入!') |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | .then(res => { |
| | | this.btnload = false; |
| | | if (res.data == null) { |
| | | this.$message.error("账号或密码错误"); |
| | | return; |
| | | } |
| | | localStorage.setItem("rememberme", this.ruleForm.remumberme); |
| | | localStorage.setItem("autoenter", this.ruleForm.autoenter); |
| | | if ( |
| | | this.ruleForm.remumberme == true || |
| | | this.ruleForm.autoenter == true |
| | | ) |
| | | localStorage.setItem( |
| | | "user", |
| | | JSON.stringify({ |
| | | account: this.ruleForm.account, |
| | | password: this.ruleForm.pwd, |
| | | name: res.data.name |
| | | }) |
| | | ); |
| | | sessionStorage.setItem("token", res.data.token); |
| | | sessionStorage.setItem("reToken", res.data.reToken); |
| | | this.$message.success("登录成功"); |
| | | this.$router.push("/"); |
| | | }) |
| | | .catch(e => { |
| | | this.btnload = false; |
| | | this.$message.error("登录失败, 请联系管理员"); |
| | | }); |
| | | } else { |
| | | this.btnload = false; |
| | | this.$message.error("账号或密码未输入!"); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <style scoped> |
| | | .all { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background-size: 100% 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .all { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background-size: 100% 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .title { |
| | | width: 100%; |
| | | height: 58px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 30px; |
| | | } |
| | | .title { |
| | | width: 100%; |
| | | height: 58px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 30px; |
| | | } |
| | | |
| | | .logo { |
| | | width: 130px; |
| | | } |
| | | .logo { |
| | | width: 130px; |
| | | } |
| | | |
| | | .logo img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .logo img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .title .label { |
| | | font-size: 18px; |
| | | text-align: center; |
| | | width: calc(100% - 130px - 200px); |
| | | } |
| | | .title .label { |
| | | font-size: 18px; |
| | | text-align: center; |
| | | width: calc(100% - 130px - 200px); |
| | | } |
| | | |
| | | .user { |
| | | width: 200px; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | color: #000; |
| | | } |
| | | .user { |
| | | width: 200px; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | color: #000; |
| | | } |
| | | |
| | | .user * { |
| | | margin: 0 5px; |
| | | } |
| | | .user * { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .user img { |
| | | margin-left: 20px; |
| | | cursor: pointer; |
| | | width: 14px; |
| | | } |
| | | .user img { |
| | | margin-left: 20px; |
| | | cursor: pointer; |
| | | width: 14px; |
| | | } |
| | | |
| | | .user span { |
| | | font-size: 14px; |
| | | } |
| | | .user span { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .left { |
| | | height: calc(100vh - 58px - 40px); |
| | | background-color: #004ea2; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | padding: 20px 0; |
| | | transition: .3s; |
| | | } |
| | | .left { |
| | | height: calc(100vh - 58px - 40px); |
| | | background-color: #004ea2; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | padding: 20px 0; |
| | | transition: 0.3s; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .left .box { |
| | | color: #fff; |
| | | width: 68px; |
| | | height: 68px; |
| | | margin: 8px 0; |
| | | cursor: pointer; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | border-radius: 8px; |
| | | } |
| | | .left::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .left .box:active { |
| | | opacity: 0.8; |
| | | } |
| | | .left .box { |
| | | color: #fff; |
| | | width: 68px; |
| | | height: 68px; |
| | | margin: 8px 0; |
| | | cursor: pointer; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | border-radius: 8px; |
| | | } |
| | | |
| | | .left .active_box { |
| | | background-color: #fff; |
| | | color: #004ea2; |
| | | } |
| | | .left .box:active { |
| | | opacity: 0.8; |
| | | } |
| | | |
| | | .left .box i { |
| | | font-size: 32px; |
| | | margin-bottom: 8px; |
| | | } |
| | | .left .active_box { |
| | | background-color: #fff; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .left .box div { |
| | | font-size: 14px; |
| | | } |
| | | .left .box i { |
| | | font-size: 32px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .small_menu { |
| | | color: #666; |
| | | } |
| | | .left .box div { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .small_menu .active_p { |
| | | color: #004ea2; |
| | | } |
| | | .small_menu { |
| | | color: #666; |
| | | } |
| | | |
| | | .small_menu p { |
| | | padding: 12px 15px; |
| | | cursor: pointer; |
| | | } |
| | | .small_menu .active_p { |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .small_menu p:hover { |
| | | background-color: rgba(0, 0, 0, 0.05); |
| | | } |
| | | .small_menu p { |
| | | padding: 12px 15px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .small_menu i { |
| | | font-size: 16px; |
| | | } |
| | | .small_menu p:hover { |
| | | background-color: rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .small_menu span { |
| | | font-size: 14px; |
| | | } |
| | | .small_menu i { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .right { |
| | | height: calc(100vh - 58px); |
| | | transition: .3s; |
| | | } |
| | | .small_menu span { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .tag { |
| | | width: 100%; |
| | | height: 36px; |
| | | background: rgb(255, 255, 255); |
| | | opacity: 0.8; |
| | | box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1); |
| | | display: flex; |
| | | align-items: center; |
| | | color: #999; |
| | | font-size: 14px; |
| | | } |
| | | .right { |
| | | height: calc(100vh - 58px); |
| | | transition: 0.3s; |
| | | } |
| | | |
| | | .tag > .el-icon-s-unfold,.el-icon-s-fold { |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | margin: 0 8px; |
| | | } |
| | | .tag { |
| | | width: 100%; |
| | | height: 36px; |
| | | background: rgb(255, 255, 255); |
| | | opacity: 0.8; |
| | | box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1); |
| | | display: flex; |
| | | align-items: center; |
| | | color: #999; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .tabs { |
| | | min-width: calc(100% - 34px); |
| | | height: 100%; |
| | | align-items: center; |
| | | display: flex; |
| | | overflow-x: auto; |
| | | } |
| | | .tag > .el-icon-s-unfold, |
| | | .el-icon-s-fold { |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | margin: 0 8px; |
| | | } |
| | | |
| | | .tab { |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | margin: 0 8px; |
| | | line-height: 32px; |
| | | transition: 0.3s; |
| | | border-top: 2px solid transparent; |
| | | border-bottom: 2px solid transparent; |
| | | user-select: none; |
| | | flex-shrink: 0; |
| | | } |
| | | .tabs { |
| | | min-width: calc(100% - 34px); |
| | | height: 100%; |
| | | align-items: center; |
| | | display: flex; |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .tab i { |
| | | font-size: 12px; |
| | | display: none; |
| | | } |
| | | .tab { |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | margin: 0 8px; |
| | | line-height: 32px; |
| | | transition: 0.3s; |
| | | border-top: 2px solid transparent; |
| | | border-bottom: 2px solid transparent; |
| | | user-select: none; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .active_tab { |
| | | border-bottom: 2px solid #004ea2; |
| | | color: #004ea2; |
| | | } |
| | | .tab i { |
| | | font-size: 12px; |
| | | display: none; |
| | | } |
| | | |
| | | .active_tab i { |
| | | display: inline; |
| | | color: #004ea2; |
| | | } |
| | | .active_tab { |
| | | border-bottom: 2px solid #004ea2; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .component_view { |
| | | height: calc(100vh - 94px - 22px); |
| | | width: calc(100% - 48px); |
| | | padding: 11px 24px; |
| | | background: rgb(245, 247, 251); |
| | | } |
| | | .active_tab i { |
| | | display: inline; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .com_index { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .component_view { |
| | | height: calc(100vh - 94px - 22px); |
| | | width: calc(100% - 48px); |
| | | padding: 11px 24px; |
| | | background: rgb(245, 247, 251); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .com_index { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <style></style> |
| | | <template> |
| | | <div class="all"> |
| | | <div class="title"> |
| | | <div class="logo"> |
| | | <img src="../../static/img/logo 1.png" /> |
| | | </div> |
| | | <div class="label">中天海洋新一代mom系统</div> |
| | | <div class="user"> |
| | | <el-avatar :size="24">{{ userName.substring(0, 1) }}</el-avatar> |
| | | <span>{{ userName }}</span> |
| | | <img src="../../static/img/退出.png" @click="out" /> |
| | | </div> |
| | | </div> |
| | | <div class="left" :style="`width: ${leftOpen?'92':'0'}px;`"> |
| | | <div :class="`box ${activeBox == 0 ? 'active_box' : ''}`" @click="addTab(menu[0].c[0])"> |
| | | <i class="font icon-shouye"></i> |
| | | <div>首页</div> |
| | | </div> |
| | | <div :class="`box ${activeBox == 3 ? 'active_box' : ''}`" @click="addTab(menu[1].c[0])"> |
| | | <i class="font icon-jine"></i> |
| | | <div>销售管理</div> |
| | | </div> |
| | | <el-popover placement="right-start" width="90" trigger="click" v-for="(a, ai) in menu" :key="ai" |
| | | v-if="a.k != '0' && a.k != '3'"> |
| | | <div :class="`box ${activeBox == a.k ? 'active_box' : ''}`" @click="activeBox = a.k" slot="reference"> |
| | | <i :class="a.i"></i> |
| | | <div>{{ a.v }}</div> |
| | | </div> |
| | | <div class="small_menu"> |
| | | <p v-for="(b, bi) in a.c" :key="bi" :class="activeP == b.k ? 'active_p' : ''" @click="addTab(b)"> |
| | | <i :class="b.i"></i> |
| | | <span>{{ b.v }}</span> |
| | | </p> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div class="right" :style="`width: calc(100% - ${leftOpen?'92':'0'}px);`"> |
| | | <div class="tag"> |
| | | <i :class="`${leftOpen?'el-icon-s-unfold':'el-icon-s-fold'}`" @click="leftOpen = !leftOpen"></i> |
| | | <div class="tabs"> |
| | | <div :class="`tab ${tabActive == a.k ? 'active_tab' : ''}`" v-for="(a, ai) in tabs" :key="ai" |
| | | @click="upTabActive(a.k)"> |
| | | {{ a.v }} |
| | | <i class="el-icon-close" @click="removeTab(ai)" v-if="tabActive!=0"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="component_view"> |
| | | <component class="com_index" v-for="(com, index) in tabs" :is="com.u" :key="upIndex + '|' + index" |
| | | v-show="com.k == tabActive"> |
| | | </component> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="all"> |
| | | <div class="title"> |
| | | <div class="logo"> |
| | | <img src="../../static/img/logo 1.png" /> |
| | | </div> |
| | | <div class="label">中天海洋新一代mom系统</div> |
| | | <div class="user"> |
| | | <el-avatar :size="24">{{ userName.substring(0, 1) }}</el-avatar> |
| | | <span>{{ userName }}</span> |
| | | <img src="../../static/img/退出.png" @click="out" /> |
| | | </div> |
| | | </div> |
| | | <div class="left" :style="`width: ${leftOpen ? '92' : '0'}px;`"> |
| | | <div |
| | | :class="`box ${activeBox == 0 ? 'active_box' : ''}`" |
| | | @click="addTab(menu[0].c[0])" |
| | | > |
| | | <i class="font icon-shouye"></i> |
| | | <div>首页</div> |
| | | </div> |
| | | <div |
| | | :class="`box ${activeBox == 3 ? 'active_box' : ''}`" |
| | | @click="addTab(menu[1].c[0])" |
| | | > |
| | | <i class="font icon-jine"></i> |
| | | <div>销售管理</div> |
| | | </div> |
| | | <el-popover |
| | | placement="right-start" |
| | | width="90" |
| | | trigger="click" |
| | | v-for="(a, ai) in menu" |
| | | :key="ai" |
| | | v-if="a.k != '0' && a.k != '3'" |
| | | > |
| | | <div |
| | | :class="`box ${activeBox == a.k ? 'active_box' : ''}`" |
| | | @click="activeBox = a.k" |
| | | slot="reference" |
| | | > |
| | | <i :class="a.i"></i> |
| | | <div>{{ a.v }}</div> |
| | | </div> |
| | | <div class="small_menu"> |
| | | <p |
| | | v-for="(b, bi) in a.c" |
| | | :key="bi" |
| | | :class="activeP == b.k ? 'active_p' : ''" |
| | | @click="addTab(b)" |
| | | > |
| | | <i :class="b.i"></i> |
| | | <span>{{ b.v }}</span> |
| | | </p> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div |
| | | class="right" |
| | | :style="`width: calc(100% - ${leftOpen ? '92' : '0'}px);`" |
| | | > |
| | | <div class="tag"> |
| | | <i |
| | | :class="`${leftOpen ? 'el-icon-s-unfold' : 'el-icon-s-fold'}`" |
| | | @click="leftOpen = !leftOpen" |
| | | ></i> |
| | | <div class="tabs"> |
| | | <div |
| | | :class="`tab ${tabActive == a.k ? 'active_tab' : ''}`" |
| | | v-for="(a, ai) in tabs" |
| | | :key="ai" |
| | | @click="upTabActive(a.k)" |
| | | > |
| | | {{ a.v }} |
| | | <i |
| | | class="el-icon-close" |
| | | @click="removeTab(ai)" |
| | | v-if="tabActive != 0" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="component_view"> |
| | | <component |
| | | class="com_index" |
| | | v-for="(com, index) in tabs" |
| | | :is="com.u" |
| | | :key="upIndex + '|' + index" |
| | | v-show="com.k == tabActive" |
| | | > |
| | | </component> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | const requireComponent = require.context("../components/view", false, /\.vue/); |
| | | var comObj = {}; |
| | | requireComponent.keys().forEach(fileName => { |
| | | var names = fileName |
| | | .split("/") |
| | | .pop() |
| | | .replace(".vue", ""); |
| | | const componentConfig = requireComponent(fileName); |
| | | comObj[names] = componentConfig.default || componentConfig; |
| | | }); |
| | | export default { |
| | | components: comObj, |
| | | data() { |
| | | return { |
| | | userName: "value", |
| | | leftOpen: true, |
| | | menu: [{ |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | c: [{ |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | u: "index-index" |
| | | }] |
| | | }, |
| | | { |
| | | k: 3, |
| | | v: "销售管理", |
| | | i: "font icon-jine", |
| | | c: [{ |
| | | k: 11, |
| | | v: "销售管理", |
| | | i: "font icon-jine", |
| | | u: "sale" |
| | | }] |
| | | }, |
| | | { |
| | | k: 1, |
| | | v: "技术管理", |
| | | i: "font icon-ic_form_set24px", |
| | | c: [{ |
| | | k: 1, |
| | | v: "标准BOM", |
| | | i: "font icon-shouye", |
| | | u: "standard" |
| | | }, |
| | | { |
| | | k: 2, |
| | | v: "订单BOM", |
| | | i: "font icon-shouye", |
| | | u: "technical" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 4, |
| | | v: "生产管理", |
| | | i: "font icon-shengchanguanli", |
| | | c: [{ |
| | | k: 12, |
| | | v: "生产订单", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 13, |
| | | v: "生产计划", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 14, |
| | | v: "生产报工", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 5, |
| | | v: "WMS管理", |
| | | i: "font icon-a-Inventorydumprequest", |
| | | c: [{ |
| | | k: 15, |
| | | v: "原材料库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 16, |
| | | v: "回单管理", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 17, |
| | | v: "半成品库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 18, |
| | | v: "成品库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 19, |
| | | v: "成品发货", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 20, |
| | | v: "成品入库", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 2, |
| | | v: "QMS管理", |
| | | i: "font icon-xunhuan", |
| | | c: [{ |
| | | k: 3, |
| | | v: "原材料检验", |
| | | i: "font icon-shouye", |
| | | u: "rawInsBox" |
| | | }, |
| | | { |
| | | k: 4, |
| | | v: "原材料不合格品", |
| | | i: "font icon-shouye", |
| | | u: "rawUnqualifiedBox" |
| | | }, |
| | | { |
| | | k: 5, |
| | | v: "过程检验", |
| | | i: "font icon-shouye", |
| | | u: "processInspection" |
| | | }, |
| | | { |
| | | k: 6, |
| | | v: "成品检验", |
| | | i: "font icon-shouye", |
| | | u: "finishedProductInspection" |
| | | }, |
| | | { |
| | | k: 7, |
| | | v: "不合格品管理", |
| | | i: "font icon-shouye", |
| | | u: "unqualifiedManagement" |
| | | }, |
| | | { |
| | | k: 9, |
| | | v: "质量统计", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 10, |
| | | v: "计量管理", |
| | | i: "font icon-shouye", |
| | | u: "measurementManagement" |
| | | }, |
| | | { |
| | | k: 10.1, |
| | | v: "不合格品处置", |
| | | i: "font icon-shouye", |
| | | u: "Processingproducts" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 6, |
| | | v: "核算管理", |
| | | i: "font icon-caiwuhesuanxitong", |
| | | c: [{ |
| | | k: 21, |
| | | v: "产量工资", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 22, |
| | | v: "员工出勤", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 7, |
| | | v: "基础数据", |
| | | i: "font icon-a-ziyuan20", |
| | | c: [{ |
| | | k: 23, |
| | | v: "生产记录维护", |
| | | i: "font icon-shouye", |
| | | u: "record-content" |
| | | }, |
| | | { |
| | | k: 24, |
| | | v: "自检项目维护", |
| | | i: "font icon-shouye", |
| | | u: "self-inspection" |
| | | }, |
| | | { |
| | | k: 25, |
| | | v: "技术指标维护", |
| | | i: "font icon-shouye", |
| | | u: "Technicalindex" |
| | | }, |
| | | { |
| | | k: 26, |
| | | v: "工艺路线维护", |
| | | i: "font icon-shouye", |
| | | u: "technology" |
| | | }, |
| | | { |
| | | k: 27, |
| | | v: "设备维护", |
| | | i: "font icon-shouye", |
| | | u: "laboratoryManagement" |
| | | }, |
| | | { |
| | | k: 28, |
| | | v: "物料清单维护", |
| | | i: "font icon-shouye", |
| | | u: "mbom" |
| | | }, |
| | | // { |
| | | // k: 29, |
| | | // v: "巡检项目维护", |
| | | // i: "font icon-shouye", |
| | | // u: "routinginspection" |
| | | // }, |
| | | { |
| | | k: 30, |
| | | v: "生产工艺维护", |
| | | i: "font icon-shouye", |
| | | u: "equipmentmaintain" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | activeBox: 0, |
| | | activeP: 0, |
| | | tabActive: 0, |
| | | tabs: [{ |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | u: "index-index" |
| | | }], |
| | | upIndex: 0 |
| | | }; |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.userName = JSON.parse(localStorage.getItem("user")).name; |
| | | }, |
| | | methods: { |
| | | addTab(ob) { |
| | | if (ob.k == 0) this.activeBox = 0; |
| | | if (ob.k == 11) this.activeBox = 3; |
| | | this.activeP = ob.k; //0 |
| | | this.tabActive = ob.k; //0 |
| | | let num = -1; |
| | | this.tabs.forEach((a, ai) => { |
| | | if (ob.k == a.k) { |
| | | num = a.k; |
| | | } |
| | | }); |
| | | // 如果没有遍历到tabs里没有该ob对应的table,往tabs里面加入该ob |
| | | if (num == -1) { |
| | | this.tabs.push(ob); |
| | | } |
| | | }, |
| | | removeTab(index) { |
| | | if (this.tabs.length > 1) { |
| | | this.tabs.splice(index, 1); |
| | | this.activeP = this.tabs[this.tabs.length - 1].k; |
| | | this.tabActive = this.tabs[this.tabs.length - 1].k; |
| | | } else { |
| | | this.$message.warning("不能关闭最后的标签"); |
| | | } |
| | | }, |
| | | upTabActive(num) { |
| | | this.tabActive = num; |
| | | this.activeP = num; |
| | | if (num == 0) { |
| | | this.activeBox = 0; |
| | | } else if (num > 0 && num <= 2) { |
| | | this.activeBox = 1; |
| | | } else if (num > 2 && num < 11) { |
| | | this.activeBox = 2; |
| | | } else if (num == 11) { |
| | | this.activeBox = 3; |
| | | } else if (num > 11 && num <= 14) { |
| | | this.activeBox = 4; |
| | | } else if (num > 14 && num <= 20) { |
| | | this.activeBox = 5 |
| | | } else if (num > 20 && num <= 22) { |
| | | this.activeBox = 6 |
| | | } else if (num > 22 && num <= 30) { |
| | | this.activeBox = 7 |
| | | } |
| | | }, |
| | | out() { |
| | | sessionStorage.clear(); |
| | | localStorage.removeItem("autoenter"); |
| | | this.$router.push("/enter"); |
| | | } |
| | | } |
| | | }; |
| | | const requireComponent = require.context("../components/view", false, /\.vue/); |
| | | var comObj = {}; |
| | | requireComponent.keys().forEach(fileName => { |
| | | var names = fileName |
| | | .split("/") |
| | | .pop() |
| | | .replace(".vue", ""); |
| | | const componentConfig = requireComponent(fileName); |
| | | comObj[names] = componentConfig.default || componentConfig; |
| | | }); |
| | | export default { |
| | | components: comObj, |
| | | data() { |
| | | return { |
| | | userName: "value", |
| | | leftOpen: true, |
| | | menu: [ |
| | | { |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | c: [ |
| | | { |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | u: "index-index" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 3, |
| | | v: "销售管理", |
| | | i: "font icon-jine", |
| | | c: [ |
| | | { |
| | | k: 11, |
| | | v: "销售管理", |
| | | i: "font icon-jine", |
| | | u: "sale" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 1, |
| | | v: "技术管理", |
| | | i: "font icon-ic_form_set24px", |
| | | c: [ |
| | | { |
| | | k: 1, |
| | | v: "标准BOM", |
| | | i: "font icon-shouye", |
| | | u: "standard" |
| | | }, |
| | | { |
| | | k: 2, |
| | | v: "订单BOM", |
| | | i: "font icon-shouye", |
| | | u: "technical" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 4, |
| | | v: "生产管理", |
| | | i: "font icon-shengchanguanli", |
| | | c: [ |
| | | { |
| | | k: 12, |
| | | v: "生产订单", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 13, |
| | | v: "生产计划", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 14, |
| | | v: "生产报工", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 5, |
| | | v: "WMS管理", |
| | | i: "font icon-a-Inventorydumprequest", |
| | | c: [ |
| | | { |
| | | k: 15, |
| | | v: "原材料库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 16, |
| | | v: "回单管理", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 17, |
| | | v: "半成品库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 18, |
| | | v: "成品库存", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 19, |
| | | v: "成品发货", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 20, |
| | | v: "成品入库", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 2, |
| | | v: "QMS管理", |
| | | i: "font icon-xunhuan", |
| | | c: [ |
| | | { |
| | | k: 3, |
| | | v: "原材料检验", |
| | | i: "font icon-shouye", |
| | | u: "rawInsBox" |
| | | }, |
| | | { |
| | | k: 4, |
| | | v: "原材料不合格品", |
| | | i: "font icon-shouye", |
| | | u: "rawUnqualifiedBox" |
| | | }, |
| | | { |
| | | k: 5, |
| | | v: "过程检验", |
| | | i: "font icon-shouye", |
| | | u: "processInspection" |
| | | }, |
| | | { |
| | | k: 6, |
| | | v: "成品检验", |
| | | i: "font icon-shouye", |
| | | u: "finishedProductInspection" |
| | | }, |
| | | { |
| | | k: 7, |
| | | v: "不合格品管理", |
| | | i: "font icon-shouye", |
| | | u: "unqualifiedManagement" |
| | | }, |
| | | { |
| | | k: 9, |
| | | v: "质量统计", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 10, |
| | | v: "计量管理", |
| | | i: "font icon-shouye", |
| | | u: "measurementManagement" |
| | | }, |
| | | { |
| | | k: 10.1, |
| | | v: "不合格品处置", |
| | | i: "font icon-shouye", |
| | | u: "Processingproducts" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 6, |
| | | v: "核算管理", |
| | | i: "font icon-caiwuhesuanxitong", |
| | | c: [ |
| | | { |
| | | k: 21, |
| | | v: "产量工资", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 22, |
| | | v: "员工出勤", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | k: 7, |
| | | v: "基础数据", |
| | | i: "font icon-a-ziyuan20", |
| | | c: [ |
| | | { |
| | | k: 23, |
| | | v: "生产记录维护", |
| | | i: "font icon-shouye", |
| | | u: "record-content" |
| | | }, |
| | | { |
| | | k: 24, |
| | | v: "自检项目维护", |
| | | i: "font icon-shouye", |
| | | u: "self-inspection" |
| | | }, |
| | | { |
| | | k: 25, |
| | | v: "技术指标维护", |
| | | i: "font icon-shouye", |
| | | u: "Technicalindex" |
| | | }, |
| | | { |
| | | k: 26, |
| | | v: "工艺路线维护", |
| | | i: "font icon-shouye", |
| | | u: "technology" |
| | | }, |
| | | { |
| | | k: 27, |
| | | v: "设备维护", |
| | | i: "font icon-shouye", |
| | | u: "laboratoryManagement" |
| | | }, |
| | | { |
| | | k: 28, |
| | | v: "物料清单维护", |
| | | i: "font icon-shouye", |
| | | u: "mbom" |
| | | }, |
| | | // { |
| | | // k: 29, |
| | | // v: "巡检项目维护", |
| | | // i: "font icon-shouye", |
| | | // u: "routinginspection" |
| | | // }, |
| | | { |
| | | k: 30, |
| | | v: "生产工艺维护", |
| | | i: "font icon-shouye", |
| | | u: "equipmentmaintain" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | activeBox: 0, |
| | | activeP: 0, |
| | | tabActive: 0, |
| | | tabs: [ |
| | | { |
| | | k: 0, |
| | | v: "首页", |
| | | i: "font icon-shouye", |
| | | u: "index-index" |
| | | } |
| | | ], |
| | | upIndex: 0 |
| | | }; |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.userName = JSON.parse(localStorage.getItem("user")).name; |
| | | }, |
| | | methods: { |
| | | addTab(ob) { |
| | | if (ob.k == 0) this.activeBox = 0; |
| | | if (ob.k == 11) this.activeBox = 3; |
| | | this.activeP = ob.k; //0 |
| | | this.tabActive = ob.k; //0 |
| | | let num = -1; |
| | | this.tabs.forEach((a, ai) => { |
| | | if (ob.k == a.k) { |
| | | num = a.k; |
| | | } |
| | | }); |
| | | // 如果没有遍历到tabs里没有该ob对应的table,往tabs里面加入该ob |
| | | if (num == -1) { |
| | | this.tabs.push(ob); |
| | | } |
| | | }, |
| | | removeTab(index) { |
| | | if (this.tabs.length > 1) { |
| | | this.tabs.splice(index, 1); |
| | | this.activeP = this.tabs[this.tabs.length - 1].k; |
| | | this.tabActive = this.tabs[this.tabs.length - 1].k; |
| | | } else { |
| | | this.$message.warning("不能关闭最后的标签"); |
| | | } |
| | | }, |
| | | upTabActive(num) { |
| | | this.tabActive = num; |
| | | this.activeP = num; |
| | | if (num == 0) { |
| | | this.activeBox = 0; |
| | | } else if (num > 0 && num <= 2) { |
| | | this.activeBox = 1; |
| | | } else if (num > 2 && num < 11) { |
| | | this.activeBox = 2; |
| | | } else if (num == 11) { |
| | | this.activeBox = 3; |
| | | } else if (num > 11 && num <= 14) { |
| | | this.activeBox = 4; |
| | | } else if (num > 14 && num <= 20) { |
| | | this.activeBox = 5; |
| | | } else if (num > 20 && num <= 22) { |
| | | this.activeBox = 6; |
| | | } else if (num > 22 && num <= 30) { |
| | | this.activeBox = 7; |
| | | } |
| | | }, |
| | | out() { |
| | | sessionStorage.clear(); |
| | | localStorage.removeItem("autoenter"); |
| | | this.$router.push("/enter"); |
| | | } |
| | | } |
| | | }; |
| | | </script> |