Browse Source

fix: 上传按钮添加提示

sy-water-data-board-ui
hejunjie 1 month ago
parent
commit
bd455b2707
  1. 32
      src/views/dike/runManage/patrolMaintenance/componentsDetails/inspectionRecordDetails.vue
  2. 59
      src/views/dike/runManage/patrolMaintenance/componentsDetails/maintenanceDetails.vue
  3. 31
      src/views/dike/runManage/pestAnimalControl2/componentsDetails/inspectionRecordDetails.vue
  4. 41
      src/views/dike/runManage/pestAnimalControl2/componentsDetails/maintenanceDetails.vue
  5. 31
      src/views/sluice/runManage/patrolMaintenance/componentsDetails/inspectionRecordDetails.vue
  6. 59
      src/views/sluice/runManage/patrolMaintenance/componentsDetails/maintenanceDetails.vue

32
src/views/dike/runManage/patrolMaintenance/componentsDetails/inspectionRecordDetails.vue

@ -218,6 +218,7 @@
<el-upload
class=""
action="#"
:ref="`upload${scope.$index}`"
:http-request="
(e) => {
handleUploadProject(e, scope.row);
@ -231,15 +232,17 @@
:show-file-list="false"
accept=".png,.jpg,.jpeg"
>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
type="text"
v-hasPermi="['df:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button
>
</el-upload>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text"
v-hasPermi="['df:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
@ -411,6 +414,19 @@ export default {
// });
},
handleUpload(ref, scope) {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs[ref].$refs['upload-inner'].handleClick()
})
},
handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
},

59
src/views/dike/runManage/patrolMaintenance/componentsDetails/maintenanceDetails.vue

@ -113,26 +113,28 @@
<el-upload
class=""
action="#"
ref="upload"
style="margin-bottom: 16px"
:http-request="handleUploadProject1"
:before-upload="beforeUploadProject1"
:show-file-list="false"
accept=".png,.jpg,.tif,.gif"
>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
size="small"
type="primary"
v-hasPermi="['df:run:patrol:maintenance:detail:attachment']"
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
</div>
</el-upload>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
@click="handleUpload('upload')"
size="small"
type="primary"
v-hasPermi="['df:run:patrol:maintenance:detail:attachment']"
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
</div>
<el-image
v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px"
@ -158,6 +160,7 @@
<el-upload
class=""
action="#"
:ref="`upload${scope.$index}`"
:http-request="
(e) => {
handleUploadProject(e, scope.row);
@ -171,15 +174,16 @@
:show-file-list="false"
accept=".png,.jpg,.jpeg"
>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
type="text"
v-hasPermi="['df:run:patrol:maintenance:detail:item:upload']"
>上传</el-button
>
</el-upload>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text"
v-hasPermi="['df:run:patrol:maintenance:detail:item:upload']"
>上传</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
@ -436,6 +440,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment;
}
},
handleUpload(res) {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs[res].$refs['upload-inner'].handleClick()
})
},
getDictLabelName(type, dictListName) {
if (!this[dictListName]) return "";
return (

31
src/views/dike/runManage/pestAnimalControl2/componentsDetails/inspectionRecordDetails.vue

@ -218,6 +218,7 @@
<el-upload
class=""
action="#"
:ref="`upload${scope.$index}`"
:http-request="
(e) => {
handleUploadProject(e, scope.row);
@ -231,15 +232,16 @@
:show-file-list="false"
accept=".png,.jpg,.jpeg"
>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
type="text"
v-hasPermi="['df:run:pestanimal2:inspection:detail:item:upload']"
>上传图片</el-button
>
</el-upload>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text"
v-hasPermi="['df:run:pestanimal2:inspection:detail:item:upload']"
>上传图片</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
@ -409,6 +411,19 @@ export default {
// });
},
handleUpload(ref, scope) {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs[ref].$refs['upload-inner'].handleClick()
})
},
handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
},

41
src/views/dike/runManage/pestAnimalControl2/componentsDetails/maintenanceDetails.vue

@ -112,6 +112,7 @@
<el-form-item label="附件:" prop="images">
<el-upload
class=""
ref="upload"
action="#"
style="margin-bottom: 16px"
:http-request="handleUploadProject1"
@ -119,22 +120,23 @@
:show-file-list="false"
accept=".png,.jpg,.tif,.gif"
>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
size="small"
type="primary"
v-hasPermi="[
</el-upload>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
size="small"
@click="handleUpload"
type="primary"
v-hasPermi="[
'df:run:pestanimal2:maintenance:detail:attachment',
]"
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
</el-upload>
</div>
<el-image
v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px"
@ -362,6 +364,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment;
}
},
handleUpload() {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs.upload.$refs['upload-inner'].handleClick()
})
},
getDictLabelName(type, dictListName) {
if (!this[dictListName]) return "";
return (

31
src/views/sluice/runManage/patrolMaintenance/componentsDetails/inspectionRecordDetails.vue

@ -218,6 +218,7 @@
<el-upload
class=""
action="#"
:ref="`upload${scope.$index}`"
:http-request="
(e) => {
handleUploadProject(e, scope.row);
@ -231,15 +232,16 @@
:show-file-list="false"
accept=".png,.jpg,.jpeg"
>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
type="text"
v-hasPermi="['sz:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button
>
</el-upload>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text"
v-hasPermi="['sz:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
@ -411,6 +413,19 @@ export default {
// });
},
handleUpload(ref, scope) {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs[ref].$refs['upload-inner'].handleClick()
})
},
handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
},

59
src/views/sluice/runManage/patrolMaintenance/componentsDetails/maintenanceDetails.vue

@ -113,26 +113,28 @@
<el-upload
class=""
action="#"
ref="upload"
style="margin-bottom: 16px"
:http-request="handleUploadProject1"
:before-upload="beforeUploadProject1"
:show-file-list="false"
accept=".png,.jpg,.tif,.gif"
>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
size="small"
type="primary"
v-hasPermi="['sz:run:patrol:maintenance:detail:attachment']"
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
</div>
</el-upload>
<div style="display: flex">
<el-button
:disabled="$route.query.mode === 'check'"
style="margin-right: 16px"
size="small"
@click="handleUpload('upload')"
type="primary"
v-hasPermi="['sz:run:patrol:maintenance:detail:attachment']"
>上传</el-button
>
<div slot="tip" style="margin-top: 0" class="el-upload__tip">
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div>
</div>
<el-image
v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px"
@ -158,6 +160,7 @@
<el-upload
class=""
action="#"
:ref="`upload${scope.$index}`"
:http-request="
(e) => {
handleUploadProject(e, scope.row);
@ -171,15 +174,16 @@
:show-file-list="false"
accept=".png,.jpg,.jpeg"
>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
type="text"
v-hasPermi="['sz:run:patrol:maintenance:detail:item:upload']"
>上传</el-button
>
</el-upload>
<el-button
:disabled="$route.query.mode === 'check'"
size="small"
style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text"
v-hasPermi="['sz:run:patrol:maintenance:detail:item:upload']"
>上传</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
@ -436,6 +440,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment;
}
},
handleUpload(res) {
this.$confirm(
`本系统为非涉密信息系统,严禁处理、传输国家秘密、工作秘密。`,
`提示`,
{
confirmButtonText: "我已知晓",
cancelButtonText: "取消上传",
type: "warning",
}
).then(() => {
this.$refs[res].$refs['upload-inner'].handleClick()
})
},
getDictLabelName(type, dictListName) {
if (!this[dictListName]) return "";
return (

Loading…
Cancel
Save