Browse Source

fix: 上传按钮添加提示

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

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

@ -218,6 +218,7 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
:ref="`upload${scope.$index}`"
:http-request=" :http-request="
(e) => { (e) => {
handleUploadProject(e, scope.row); handleUploadProject(e, scope.row);
@ -231,15 +232,17 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.jpeg" accept=".png,.jpg,.jpeg"
> >
</el-upload>
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text" type="text"
v-hasPermi="['df:run:patrol:inspection:detail:item:upload']" v-hasPermi="['df:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button >上传图片</el-button
> >
</el-upload>
<el-popconfirm <el-popconfirm
confirm-button-text="确定" confirm-button-text="确定"
cancel-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) { handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts; row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
}, },

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

@ -113,16 +113,19 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
ref="upload"
style="margin-bottom: 16px" style="margin-bottom: 16px"
:http-request="handleUploadProject1" :http-request="handleUploadProject1"
:before-upload="beforeUploadProject1" :before-upload="beforeUploadProject1"
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.tif,.gif" accept=".png,.jpg,.tif,.gif"
> >
</el-upload>
<div style="display: flex"> <div style="display: flex">
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
style="margin-right: 16px" style="margin-right: 16px"
@click="handleUpload('upload')"
size="small" size="small"
type="primary" type="primary"
v-hasPermi="['df:run:patrol:maintenance:detail:attachment']" v-hasPermi="['df:run:patrol:maintenance:detail:attachment']"
@ -132,7 +135,6 @@
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张 文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div> </div>
</div> </div>
</el-upload>
<el-image <el-image
v-for="item in form.images" v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px" style="width: 240px; height: 135px; margin-right: 16px"
@ -158,6 +160,7 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
:ref="`upload${scope.$index}`"
:http-request=" :http-request="
(e) => { (e) => {
handleUploadProject(e, scope.row); handleUploadProject(e, scope.row);
@ -171,15 +174,16 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.jpeg" accept=".png,.jpg,.jpeg"
> >
</el-upload>
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text" type="text"
v-hasPermi="['df:run:patrol:maintenance:detail:item:upload']" v-hasPermi="['df:run:patrol:maintenance:detail:item:upload']"
>上传</el-button >上传</el-button
> >
</el-upload>
<el-popconfirm <el-popconfirm
confirm-button-text="确定" confirm-button-text="确定"
cancel-button-text="取消" cancel-button-text="取消"
@ -436,6 +440,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment; 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) { getDictLabelName(type, dictListName) {
if (!this[dictListName]) return ""; if (!this[dictListName]) return "";
return ( return (

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

@ -218,6 +218,7 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
:ref="`upload${scope.$index}`"
:http-request=" :http-request="
(e) => { (e) => {
handleUploadProject(e, scope.row); handleUploadProject(e, scope.row);
@ -231,15 +232,16 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.jpeg" accept=".png,.jpg,.jpeg"
> >
</el-upload>
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text" type="text"
v-hasPermi="['df:run:pestanimal2:inspection:detail:item:upload']" v-hasPermi="['df:run:pestanimal2:inspection:detail:item:upload']"
>上传图片</el-button >上传图片</el-button
> >
</el-upload>
<el-popconfirm <el-popconfirm
confirm-button-text="确定" confirm-button-text="确定"
cancel-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) { handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts; row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
}, },

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

@ -112,6 +112,7 @@
<el-form-item label="附件:" prop="images"> <el-form-item label="附件:" prop="images">
<el-upload <el-upload
class="" class=""
ref="upload"
action="#" action="#"
style="margin-bottom: 16px" style="margin-bottom: 16px"
:http-request="handleUploadProject1" :http-request="handleUploadProject1"
@ -119,11 +120,13 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.tif,.gif" accept=".png,.jpg,.tif,.gif"
> >
</el-upload>
<div style="display: flex"> <div style="display: flex">
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
style="margin-right: 16px" style="margin-right: 16px"
size="small" size="small"
@click="handleUpload"
type="primary" type="primary"
v-hasPermi="[ v-hasPermi="[
'df:run:pestanimal2:maintenance:detail:attachment', 'df:run:pestanimal2:maintenance:detail:attachment',
@ -134,7 +137,6 @@
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张 文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div> </div>
</div> </div>
</el-upload>
<el-image <el-image
v-for="item in form.images" v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px" style="width: 240px; height: 135px; margin-right: 16px"
@ -362,6 +364,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment; 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) { getDictLabelName(type, dictListName) {
if (!this[dictListName]) return ""; if (!this[dictListName]) return "";
return ( return (

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

@ -218,6 +218,7 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
:ref="`upload${scope.$index}`"
:http-request=" :http-request="
(e) => { (e) => {
handleUploadProject(e, scope.row); handleUploadProject(e, scope.row);
@ -231,15 +232,16 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.jpeg" accept=".png,.jpg,.jpeg"
> >
</el-upload>
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text" type="text"
v-hasPermi="['sz:run:patrol:inspection:detail:item:upload']" v-hasPermi="['sz:run:patrol:inspection:detail:item:upload']"
>上传图片</el-button >上传图片</el-button
> >
</el-upload>
<el-popconfirm <el-popconfirm
confirm-button-text="确定" confirm-button-text="确定"
cancel-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) { handleChangeSelectParts(row) {
row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts; row.parts = this.tableData.find((v) => v.id === row.itemId)?.parts;
}, },

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

@ -113,17 +113,20 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
ref="upload"
style="margin-bottom: 16px" style="margin-bottom: 16px"
:http-request="handleUploadProject1" :http-request="handleUploadProject1"
:before-upload="beforeUploadProject1" :before-upload="beforeUploadProject1"
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.tif,.gif" accept=".png,.jpg,.tif,.gif"
> >
</el-upload>
<div style="display: flex"> <div style="display: flex">
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
style="margin-right: 16px" style="margin-right: 16px"
size="small" size="small"
@click="handleUpload('upload')"
type="primary" type="primary"
v-hasPermi="['sz:run:patrol:maintenance:detail:attachment']" v-hasPermi="['sz:run:patrol:maintenance:detail:attachment']"
>上传</el-button >上传</el-button
@ -132,7 +135,6 @@
文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张 文件上传支持.jpg.png.tif.gif 单张图片5M以内最多上传3张
</div> </div>
</div> </div>
</el-upload>
<el-image <el-image
v-for="item in form.images" v-for="item in form.images"
style="width: 240px; height: 135px; margin-right: 16px" style="width: 240px; height: 135px; margin-right: 16px"
@ -158,6 +160,7 @@
<el-upload <el-upload
class="" class=""
action="#" action="#"
:ref="`upload${scope.$index}`"
:http-request=" :http-request="
(e) => { (e) => {
handleUploadProject(e, scope.row); handleUploadProject(e, scope.row);
@ -171,15 +174,16 @@
:show-file-list="false" :show-file-list="false"
accept=".png,.jpg,.jpeg" accept=".png,.jpg,.jpeg"
> >
</el-upload>
<el-button <el-button
:disabled="$route.query.mode === 'check'" :disabled="$route.query.mode === 'check'"
size="small" size="small"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleUpload(`upload${scope.$index}`)"
type="text" type="text"
v-hasPermi="['sz:run:patrol:maintenance:detail:item:upload']" v-hasPermi="['sz:run:patrol:maintenance:detail:item:upload']"
>上传</el-button >上传</el-button
> >
</el-upload>
<el-popconfirm <el-popconfirm
confirm-button-text="确定" confirm-button-text="确定"
cancel-button-text="取消" cancel-button-text="取消"
@ -436,6 +440,19 @@ export default {
this.acceptanceForm.comment = ApprovalComment.data[0].comment; 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) { getDictLabelName(type, dictListName) {
if (!this[dictListName]) return ""; if (!this[dictListName]) return "";
return ( return (

Loading…
Cancel
Save