|
@@ -6,11 +6,12 @@ import { Button } from "ant-design-vue";
|
|
|
import { queenApi } from "queenjs";
|
|
|
import Modal from "queenjs/adapter/vue/components/modal";
|
|
|
import { defineComponent, reactive, ref } from "vue";
|
|
|
-import { object } from "vue-types";
|
|
|
+import { bool, object } from "vue-types";
|
|
|
|
|
|
export default defineComponent({
|
|
|
props: {
|
|
|
record: object().isRequired,
|
|
|
+ isSystem: bool().isRequired,
|
|
|
},
|
|
|
setup(props) {
|
|
|
const resource = useResource();
|
|
@@ -35,7 +36,7 @@ export default defineComponent({
|
|
|
end: state.endTime,
|
|
|
id: props.record._id,
|
|
|
};
|
|
|
- const res = await resource.https.cutVideo(data);
|
|
|
+ const res = await resource.https.cutVideo(data, props.isSystem);
|
|
|
const { url, jobId } = res.result;
|
|
|
|
|
|
const videoStatusCtrl = new TimeController({
|
|
@@ -70,6 +71,7 @@ export default defineComponent({
|
|
|
await resource.controls.custVideoListCtrl.loadPage(1);
|
|
|
Modal.clear();
|
|
|
queenApi.hideLoading();
|
|
|
+ queenApi.messageSuccess("已保存,请到我的-视频中查看!");
|
|
|
}, 800);
|
|
|
};
|
|
|
|
|
@@ -118,7 +120,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
return () => {
|
|
|
- const { record } = props;
|
|
|
+ const { record, isSystem } = props;
|
|
|
const { duration, startTime, endTime, previewObj } = state;
|
|
|
const submitDisabled = previewObj.file ? false : true;
|
|
|
|
|
@@ -189,16 +191,18 @@ export default defineComponent({
|
|
|
</Button>
|
|
|
</div>
|
|
|
<div class="mt-60px text-center space-x-30px">
|
|
|
- <Button
|
|
|
- ghost
|
|
|
- type="primary"
|
|
|
- size="large"
|
|
|
- class="w-300px"
|
|
|
- disabled={submitDisabled}
|
|
|
- onClick={replaceVideo}
|
|
|
- >
|
|
|
- 替换原视频
|
|
|
- </Button>
|
|
|
+ {!isSystem && (
|
|
|
+ <Button
|
|
|
+ ghost
|
|
|
+ type="primary"
|
|
|
+ size="large"
|
|
|
+ class="w-300px"
|
|
|
+ disabled={submitDisabled}
|
|
|
+ onClick={replaceVideo}
|
|
|
+ >
|
|
|
+ 替换原视频
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
<Button
|
|
|
type="primary"
|
|
|
size="large"
|