| | |
| | | action="https://jsonplaceholder.typicode.com/posts/"
|
| | | :http-request="uploadSound"
|
| | | v-show="showUpload"
|
| | | :show-file-list="false"
|
| | | >
|
| | | <i class="el-icon-upload"></i>
|
| | | <div class="el-upload__text">
|
| | |
| | |
|
| | | <script>
|
| | | import { saveAlarmConfig, getDevInfo } from "@/api/system";
|
| | | import { uploadSound, getSoundList } from "@/api/event";
|
| | | import { uploadSound, getSoundList ,deleteSound} from "@/api/event";
|
| | | import config from "../../../../package.json";
|
| | |
|
| | | import { isIPv4 } from "@/scripts/validate";
|
| | |
| | | selectIcons(typ){
|
| | |
|
| | | },
|
| | | removeSound(){
|
| | | removeSound(item){
|
| | | debugger
|
| | | this.$confirm('您是否确认删除事件声音', '删除事件声音', {
|
| | | confirmButtonText: '确定',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning'
|
| | | }).then(() => {
|
| | | this.$message({
|
| | | type: 'success',
|
| | | message: '删除成功!'
|
| | | });
|
| | | deleteSound({
|
| | | id:item.id
|
| | | }).then((res) => {
|
| | | if (res.success) {
|
| | | this.getSounds()
|
| | | this.$message({
|
| | | type: 'success',
|
| | | message: '删除成功!'
|
| | | });
|
| | | this.showUpload=false
|
| | | }
|
| | | },err=>{
|
| | | this.$message.error(err.msg)
|
| | | })
|
| | | })
|
| | | },
|
| | | clickSound(item, i) {
|
| | |
| | | background-color: rgba(233, 233, 233, 1);
|
| | | }
|
| | | .add-group {
|
| | | margin-top: 170px;
|
| | | height: 235px;
|
| | | margin-top: 50px;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | justify-content: space-between;
|