| | |
| | | class="upload-demo"
|
| | | drag
|
| | | action="https://jsonplaceholder.typicode.com/posts/"
|
| | | multiple
|
| | | :http-request="uploadSound"
|
| | | v-show="showUpload"
|
| | | >
|
| | | <i class="el-icon-upload"></i>
|
| | |
| | |
|
| | | <script>
|
| | | import { saveAlarmConfig } from "@/api/system";
|
| | |
|
| | | import { uploadSound,getSoundList } from "@/api/event";
|
| | | import cloudNode from "../components/CloudNode";
|
| | | import ipInput from "@/components/subComponents/IPInput";
|
| | | import { isIPv4 } from "@/scripts/validate";
|
| | |
| | | { name: "英文", desc: "fesF" },
|
| | | { name: "繁体中文(香港)", desc: "fesF" },
|
| | | ],
|
| | | soundList: [{ name: "2.mp3" }, { name: "3.mp3" }],
|
| | |
|
| | | soundList: [],
|
| | | wireFormRules: {},
|
| | | activePage: "basic",
|
| | | rules: {
|
| | |
| | | { required: true, message: "请输入设备名称", trigger: "change" },
|
| | | ],
|
| | | },
|
| | | ipv4Form: {},
|
| | | ipv6Form: {},
|
| | | ipv4FormRules: {},
|
| | | ipv6FormRules: {},
|
| | | options: [
|
| | | {
|
| | | value: "选项1",
|
| | | label: "手动",
|
| | | },
|
| | | {
|
| | | value: "选项2",
|
| | | label: "自动",
|
| | | },
|
| | | ],
|
| | | value: "",
|
| | | };
|
| | | },
|
| | |
| | | ipInput,
|
| | | switchBar,
|
| | | },
|
| | | mounted() {},
|
| | | mounted() {
|
| | | debugger |
| | | // this.getSounds()
|
| | | },
|
| | | beforeDestroy() {},
|
| | | props: ["barName"],
|
| | | methods: {
|
| | | getSounds() {
|
| | | getSoundList().then(res => {
|
| | | if (res.success) {
|
| | | this.soundList = res.data.list
|
| | | debugger
|
| | | }
|
| | | }).catch(
|
| | | e => console.log(e)
|
| | | )
|
| | | },
|
| | | uploadSound(params){
|
| | | let param = new FormData();
|
| | | debugger
|
| | | param.append("file", params.file);
|
| | | uploadSound(param).then((res) => {
|
| | | debugger
|
| | | console.log(res.data); |
| | | });
|
| | | },
|
| | | openRight(typ) {
|
| | | this.activePage = typ;
|
| | | debugger
|
| | | if (typ=="sound") {
|
| | | this.getSounds()
|
| | | }
|
| | | },
|
| | | wifiControl(val) {},
|
| | | checkWifi() {
|