|
|
@@ -5,6 +5,7 @@
|
|
|
<el-card v-if="camDetail !== null" class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>{{ camDetail.camName }}</span>
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text" @click="onShareCam">分享</el-button>
|
|
|
</div>
|
|
|
<div class="text item">
|
|
|
<span v-if="camDetail.onLive">
|
|
|
@@ -112,11 +113,38 @@
|
|
|
</el-calendar>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="showCreateShareDialog"
|
|
|
+ width="100%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-form ref="createAlbumForm" :model="createShareForm">
|
|
|
+ <el-form-item label="选择用户" label-width="120px" prop="title">
|
|
|
+ <el-checkbox-group v-model="createShareForm.shareToList">
|
|
|
+ <el-checkbox v-for="user in userContactList" :key="user.userIdStr" :label="user.username" />
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ @click="createShare"
|
|
|
+ >
|
|
|
+ 分享相册
|
|
|
+ </el-button>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getCamDetail, getCamKeyValue, getRecordByMonth, getRecordUrl, submitActivity } from '@/api/disk'
|
|
|
+import { createShare, getCamDetail, getCamKeyValue, getRecordByMonth, getRecordUrl, submitActivity } from '@/api/disk'
|
|
|
+import { getUserContact } from '@/api/user'
|
|
|
|
|
|
export default {
|
|
|
name: 'DiskCam',
|
|
|
@@ -134,7 +162,15 @@ export default {
|
|
|
dataList: [],
|
|
|
showCalenderDialog: false,
|
|
|
camDetail: null,
|
|
|
- camRecordDetail: null
|
|
|
+ camRecordDetail: null,
|
|
|
+ // ****************************************************************************************************************
|
|
|
+ showCreateShareDialog: false,
|
|
|
+ userContactList: [],
|
|
|
+ createShareForm: {
|
|
|
+ albumType: 1,
|
|
|
+ albumId: null,
|
|
|
+ shareToList: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -261,6 +297,29 @@ export default {
|
|
|
message: '已取消'
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ onShareCam() {
|
|
|
+ this.createShareForm.albumId = this.camDetail.camId
|
|
|
+ getUserContact(1).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ this.userContactList = resp.data
|
|
|
+ this.showCreateShareDialog = true
|
|
|
+ } else {
|
|
|
+ this.$message.error(resp.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createShare() {
|
|
|
+ createShare(this.createShareForm).then(resp => {
|
|
|
+ this.$message.info(resp.msg)
|
|
|
+ }).finally(() => {
|
|
|
+ this.showCreateShareDialog = false
|
|
|
+ this.createShareForm = {
|
|
|
+ albumType: 1,
|
|
|
+ albumId: null,
|
|
|
+ shareToList: []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|