Browse Source

指标列表权限

dev-xx
马远东 1 year ago
parent
commit
28e929ebcd
  1. 4
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  2. 68
      src/views/supervise/IndicatorList.vue
  3. 6
      vite.config.js

4
src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -1171,8 +1171,8 @@ const ConfirmForm = () => {
Indexform.value['packList'].forEach(item => {
DataSubmit['decreaseImageEntityList'].push({
imageType: SelectType.value == 1 ? 10 : SelectType.value == 3 ? 20 : '',
imageName: item.response.data.originalName,
imagePath: item.response.data.link,
imageName: item.response.data?item.response.data.originalName:'',
imagePath:item.response.data? item.response.data.link:'',
});
});
}

68
src/views/supervise/IndicatorList.vue

@ -78,7 +78,9 @@
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" @click="BatchDelete" icon="Delete"> 批量删除</el-button>
<el-button type="primary" @click="exportList" ><el-icon><Download /></el-icon></el-button>
<el-button type="primary" @click="exportList"
><el-icon><Download /></el-icon></el-button
>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -106,12 +108,16 @@
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<!-- -->
<div class="ElBtnClass" >
<div class="ElBtnClass">
<el-button text @click="ClassificationIndicatorView(slotProps.scope)"
>查看</el-button
>
<el-button v-if="slotProps.scope.row.isEdit == '1'" text @click="ClassificationDditing(slotProps.scope)">编辑</el-button>
<el-button v-if="slotProps.scope.row.isEdit == '1'" text type="primary" @click="CategoryDeletion(slotProps.scope)"
<el-button v-if="slotProps.scope.row.isEdit != '0'" text @click="ClassificationDditing(slotProps.scope)">编辑</el-button>
<el-button
v-if="slotProps.scope.row.isEdit != '0'"
text
type="primary"
@click="CategoryDeletion(slotProps.scope)"
>删除</el-button
>
</div>
@ -167,7 +173,7 @@
<el-input v-model="lassificationform.point" placeholder="暂无" />
</el-form-item>
<el-form-item label="描述">
<el-form-item label="整改结果">
<el-input v-model="lassificationform.objectionRemark" placeholder="暂无" />
</el-form-item>
@ -196,6 +202,14 @@
"
/>
</el-form-item>
<el-form-item label="申诉原因">
<el-input
v-model="lassificationform.appealReason"
placeholder="
暂无
"
/>
</el-form-item>
<div class="el_photo_max">
<el-form-item label="照片" class="el_fotnr">
<el-upload
@ -264,6 +278,7 @@
placeholder="请选择指标分类"
style="width: 100%"
@change="ClassificationChange"
:disabled="EditEnable"
>
<el-option
v-for="item in classificationoptions"
@ -280,6 +295,7 @@
placeholder="请选择指标项目"
style="width: 100%"
@change="IndicatoritemsChange"
:disabled="EditEnable"
>
<el-option
v-for="item in Indicatoritems"
@ -296,6 +312,7 @@
class="m-2"
placeholder="请选择指标分数"
style="width: 100%"
:disabled="EditEnable"
>
<el-option
v-for="item in IndicatorScore"
@ -320,6 +337,7 @@
:rows="4"
type="textarea"
placeholder="请输入分数备注"
:disabled="EditEnable"
/>
</el-form-item>
@ -420,6 +438,7 @@ const pageSize = ref(50);
const lassificationform = ref({}); //
const lassificationformedit = ref({}); //
const title = ref(true); //
const EditEnable = ref(true);//
const EditID = ref(true); //ID
const currentPage = ref(1);
const newlyAdded = ref(false); //
@ -595,7 +614,6 @@ const Photoviewing = val => {
dialogImageUrl.value = val.url;
};
//
const Obtainclassification = () => {
$_selectParentCalssifyList().then(res => {
@ -692,23 +710,23 @@ const BatchDelete = () => {
};
//
const exportList=()=>{
const exportList = () => {
ElMessageBox.confirm('是否导出数据?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
console.log('导出数据');
let data={
...searchFrom.value
}
$_exportIndicatorsList(data).then(res => {
console.log('导出数据');
let data = {
...searchFrom.value,
};
$_exportIndicatorsList(data).then(res => {
downloadXls(res.data, `导出数据.xlsx`);
});
})
.catch(() => {});
}
};
//
const CategoryDeletion = val => {
ElMessageBox.confirm(`是否删除${val.row.classifyName}分类?`, 'Warning', {
@ -795,12 +813,12 @@ const selectionChange = list => {
selectionList.value = list;
console.log(selectionList.value, '已经选中的数据');
};
function ProhibitSelection(val,index){
if(val.isEdit=='0'){
return false
}else{
return true
}
function ProhibitSelection(val, index) {
if (val.isEdit == '0') {
return false;
} else {
return true;
}
}
const searchHide = () => {
search.value = !search.value;
@ -932,6 +950,12 @@ const ClassificationIndicatorView = val => {
//
const ClassificationDditing = async val => {
console.log(val, '编辑弹窗展开');
if(val.row.isEdit ==1){
EditEnable.value=false;
}else if(val.row.isEdit == 2){
EditEnable.value=true;
}
srcList.value = [];
fileList.value = [];
$_findIndicatorsDetail({ id: val.row.id })
@ -1015,6 +1039,10 @@ const IndicatorEditingFn = () => {
.then(res => {
console.log(res, '编辑成功');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
IndicatorEditing.value = false; //
onLoad();
}
@ -1097,7 +1125,7 @@ const timeChange = val => {
margin-right: 10px;
}
.el-btn {
width: auto;
width: auto;
margin-right: 0;
margin-left: auto;
}

6
vite.config.js

@ -25,13 +25,13 @@ export default ({ mode, command }) => {
// target: 'http://192.168.6.122:8777',
// target: 'http://192.168.3.14:13000',
// target: 'http://192.168.10.25:2888',
// target: 'http://192.168.6.161:9777',//CYZ
// target: 'http://192.168.6.161:9777',//CY
// target: 'http://192.168.10.57:13000',
// target: 'http://192.168.10.200:13000',
// target: 'http://192.168.10.29:13000',
target: 'http://192.168.3.5:13000',//?
// target: 'http://192.168.3.5:13000',//?
// target: 'http://h5uapi.huitongys.com',
// target: 'http://test.api.huo5you.com',
target: 'http://test.api.huo5you.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),

Loading…
Cancel
Save