安灯权限管理
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
@pagination="getDataList" /> -->
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel"
|
||||
<!-- <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</base-dialog> -->
|
||||
<ProcessBomList ref="addOrUpdate" style="margin-top: 16px" @getList="getDataList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,14 +33,14 @@ import {
|
||||
exportQualityInspectionBoxBtnExcel,
|
||||
getUserList
|
||||
} from '@/api/base/qualityInspectionBoxPermissions';
|
||||
import basicPage from '../../mixins/basic-page';
|
||||
import basicPage from './basic-page';
|
||||
import moment from 'moment';
|
||||
import addOrUpdate from './dialogForm.vue';
|
||||
|
||||
import ProcessBomList from './ProcessBomList.vue';
|
||||
export default {
|
||||
name: 'QualityInspectionBoxBtn',
|
||||
mixins: [basicPage],
|
||||
components: { addOrUpdate },
|
||||
components: { addOrUpdate, ProcessBomList },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@@ -99,15 +101,15 @@ export default {
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
prop: 'userName',
|
||||
label: '用户名',
|
||||
},
|
||||
{
|
||||
prop: 'sectionName',
|
||||
prop: 'nickName',
|
||||
label: '用户昵称',
|
||||
},
|
||||
{
|
||||
prop: 'inspectionInfoList',
|
||||
prop: 'datas',
|
||||
label: '产线及工段',
|
||||
}
|
||||
],
|
||||
@@ -134,31 +136,36 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getDict()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
// getDict() {
|
||||
// // getUserList({
|
||||
// // pageNo: 1,
|
||||
// // pageSize:999
|
||||
// // }).then((res) => {
|
||||
// // this.searchBarFormConfig[0].selectOptions = res.data
|
||||
// // })
|
||||
// },
|
||||
getDict() {
|
||||
getUserList({
|
||||
pageNo: 1,
|
||||
pageSize:999
|
||||
}).then((res) => {
|
||||
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name:item.username
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.map((item) => {
|
||||
// console.log(item);
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||
this.tableData = res.data.list.map((item) => {
|
||||
return {
|
||||
inspectionInfoList: item.inspectionInfoList.toString(),
|
||||
productionLineId:item.productionLineId,
|
||||
productionLineName:item.productionLineName,
|
||||
sectionId: item.sectionId,
|
||||
sectionName: item.sectionName
|
||||
// datas: item.strList.toString(),
|
||||
nickName: item.nickName,
|
||||
userName: item.userName,
|
||||
// sectionId: item.sectionId,
|
||||
// sectionName: item.sectionName
|
||||
}
|
||||
})
|
||||
this.listQuery.total = response.data.total;
|
||||
console.log(this.tableData);
|
||||
this.listQuery.total = res.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
@@ -175,13 +182,14 @@ export default {
|
||||
this.resetForm('form');
|
||||
},
|
||||
deleteHandle(id, name, index, data) {
|
||||
this.$confirm(`确认要删除产线名为${data.productionLineName}的数据项?`, "提示", {
|
||||
// console.log(data)
|
||||
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||
this.urlOptions.deleteURL(data.userId).then(({ data }) => {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
@@ -204,11 +212,11 @@ export default {
|
||||
this.getDataList()
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
// this.addOrEditTitle = '新增';
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init();
|
||||
this.$refs.addOrUpdate.handleAddEquipment();
|
||||
});
|
||||
break;
|
||||
case 'export':
|
||||
|
||||
Reference in New Issue
Block a user