|
@@ -91,6 +91,15 @@
|
|
|
: '执行测试'
|
|
|
}}</el-button
|
|
|
>
|
|
|
+ <span v-if="runningStatusArr[scope.$index] === 1"> | </span>
|
|
|
+ <el-button
|
|
|
+ v-if="runningStatusArr[scope.$index] === 1"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleUpdateStatus(scope.row, scope.$index)"
|
|
|
+ >
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -174,6 +183,30 @@ export default {
|
|
|
return null;
|
|
|
}
|
|
|
},
|
|
|
+ // 重置状态
|
|
|
+ handleUpdateStatus(row, index) {
|
|
|
+ const { caseId } = row;
|
|
|
+ api
|
|
|
+ .updateRunningStatus({
|
|
|
+ hospitalId: this.hospitalId,
|
|
|
+ caseId,
|
|
|
+ status: 0,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === '0' && res.data.data) {
|
|
|
+ this.$message({
|
|
|
+ message: '重置成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.getDataList(this.hospitalId); // 重新获取列表
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.msg || '重置失败');
|
|
|
+ this.getDataList(this.hospitalId); // 重新获取列表
|
|
|
+ }
|
|
|
+ this.runningStatusArr = [0, 0, 0, 0, 0];
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// 执行测试
|
|
|
handleTest(row, index) {
|
|
|
let inp = document.getElementById('upFile');
|