|
@@ -21,6 +21,7 @@
|
|
<div v-if="item.operationTypeStr !== '创建'" class="isHove el-button--text" type="text" @click="showHistory(item)">内容查看</div>
|
|
<div v-if="item.operationTypeStr !== '创建'" class="isHove el-button--text" type="text" @click="showHistory(item)">内容查看</div>
|
|
</div>
|
|
</div>
|
|
<div class="operationTime">{{ item.operationTime }}</div>
|
|
<div class="operationTime">{{ item.operationTime }}</div>
|
|
|
|
+ <span v-show="false" @click="rollback($route.query.subReportId, item.historyId)">回滚</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -33,7 +34,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getHistory } from '@/api/qualityMonthlyReport/edit'
|
|
|
|
|
|
+import { getHistory, rollback } from '@/api/qualityMonthlyReport/edit'
|
|
import commentsAndChanges from '@/components/commentsAndChanges/index.vue'
|
|
import commentsAndChanges from '@/components/commentsAndChanges/index.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -97,6 +98,18 @@ export default {
|
|
showHistory(item) {
|
|
showHistory(item) {
|
|
const url = `${location.origin}/#/monthlyReport/edit?pageType=read&reportId=334&subReportId=${this.$route.query.subReportId}&isHistory=new&historyId=${item.historyId}`
|
|
const url = `${location.origin}/#/monthlyReport/edit?pageType=read&reportId=334&subReportId=${this.$route.query.subReportId}&isHistory=new&historyId=${item.historyId}`
|
|
window.open(url, '_blank')
|
|
window.open(url, '_blank')
|
|
|
|
+ },
|
|
|
|
+ rollback( subReportId, historyId ) {
|
|
|
|
+ rollback({
|
|
|
|
+ subReportId,
|
|
|
|
+ historyId
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if(res.code === 200) {
|
|
|
|
+ this.$message.success('回滚成功!')
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|