123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699 |
- 'use strict';
- app.controller('meansapplyListCtrl', ["$scope", "$sce", "$http", "i18nService", "$rootScope", "$state", "$timeout", "moment", "$interval", "$modal", "$stateParams", "SweetAlert", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_domain", "api_text", "api_bpm_data", "api_user_data", "api_cmdb","api_wechatfile", function($scope, $sce, $http, i18nService, $rootScope, $state, $timeout, moment, $interval, $modal, $stateParams, SweetAlert, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_domain, api_text, api_bpm_data, api_user_data, api_cmdb,api_wechatfile) {
- $scope.langs = i18nService.getAllLangs();
- $scope.lang = 'zh-cn';
- i18nService.setCurrentLang($scope.lang);
- $scope.myData = [];
- var loginUser = $rootScope.user;
- // var voiceurl=$rootScope.audioiIp;
- // delete $rootScope.user.authority;
- var pdKey = $state.current.pdKey;
- $scope.gridOptions = {};
- $scope.gridOptions.data = 'myData';
- $scope.gridOptions.enableColumnResizing = true;
- $scope.gridOptions.enableFiltering = false;
- $scope.gridOptions.enableGridMenu = true;
- $scope.gridOptions.enableSelectAll = true;
- $scope.gridOptions.enableRowSelection = true;
- $scope.gridOptions.showGridFooter = true;
- $scope.gridOptions.showColumnFooter = false;
- $scope.gridOptions.fastWatch = true;
- $scope.gridOptions.enableSorting = true;
- $scope.gridOptions.useExternalSorting = true;
- $scope.gridOptions.useExternalFiltering = false;
- $scope.gridOptions.useExternalPagination = true;
- $scope.gridOptions.paginationPageSizes = [10, 20, 50, 100];
- $scope.gridOptions.paginationPageSize = 10;
- $scope.gridOptions.multiSelect = true;
- var mun = $scope.gridOptions.paginationPageSize;
- $scope.gridOptions.rowTemplate = "<div ng-click=\"onDblClick(row)\" ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>";
- $scope.gridOptions.rowIdentity = function(row) {
- return row.id;
- };
- $scope.gridOptions.getRowIdentity = function(row) {
- return row.id;
- };
- $scope.typedata = function(row) {
- if (row.type == 0) {
- return "资产入库";
- } else if (row.type == 2) {
- return "资产归还";
- } else if (row.type == 1) {
- return "资产领用";
- } else if (row.type == 4) {
- return "资产更换";
- }
- };
- $scope.statedata = function(row) {
- if (row.status == 0) {
- return "待批准";
- } else if (row.status == 1) {
- return "已驳回";
- } else if (row.status == 2) {
- return "待出库";
- } else if (row.status == 3) {
- return "信息更新";
- } else if (row.status == 4) {
- return "信息确认";
- } else if (row.status == 5) {
- return "已关闭";
- }
- };
- $scope.getStateSelect=function(){
- var data={
- "key":"applicationForm_status",
- "type":"list"
- }
- api_wechatfile.getDictionary(data).then(function(res){
- $scope.states=res
- })
- }
- $scope.getStateSelect();
- // $scope.states = [
- // { id: 0, name: '待批准' },
- // { id: 1, name: '已驳回' },
- // { id: 2, name: '待出库' },
- // { id: 3, name: '信息更新' },
- // { id: 4, name: '信息确认' },
- // { id: 5, name: '已关闭' }
- // ];
- // $scope.getTypeSelect=function(){
- // var data={
- // "key":"applicationForm_type",
- // "type":"list"
- // }
- // api_wechatfile.getDictionary(data).then(function(res){
- // $scope.type=res
- // })
- // }
- // $scope.getTypeSelect();
- $scope.getTypeSelect=function(){
- $scope.type=[];
- var data1={
- "key":"applicationForm_type_entrance",
- "type":"list"
- }
- var data2={
- "key":"applicationForm_type_exit",
- "type":"list"
- }
- api_wechatfile.getDictionary(data1).then(function(res1){
- api_wechatfile.getDictionary(data2).then(function(res2){
- for(var i=0;i<res1.length;i++){
- $scope.type.push(res1[i])
- }
- for(var i=0;i<res2.length;i++){
- $scope.type.push(res2[i])
- }
- })
- })
- }
- $scope.getTypeSelect();
- // $scope.type = [
- // { id: 0, name: '资产入库' },
- // { id: 2, name: '资产归还' },
- // { id: 1, name: '资产领用' },
- // { id: 4, name: '资产更换' }
- // ];
- $scope.application = [
- { value: "serialNumbe", name: '申请单编号' },
- // { value: "proposer", name: '申请人' },
- { value: "purpose", name: '领用用途' },
- // { value: "cmdbsign", name: '设备编号' }
- ];
- $scope.gridOptions.columnDefs = [{
- name: 'item',
- displayName: '序号',
- width: 50
- },
- {
- name: 'serialNumbe',
- displayName: '申请单编号',
- width: '15%',
- enableSorting: false
- },
- {
- name: 'proposer.name',
- displayName: '申请人',
- width: '18%',
- enableSorting: false
- },
- {
- name: 'type.name',
- displayName: '类型',
- width: '8%',
- enableFiltering: false,
- cellTemplate: '<div><div class="ui-grid-cell-contents">{{row.entity.type.name}}</div></div>'
- },
- {
- name: 'status.name',
- displayName: '状态',
- width: '10%',
- enableFiltering: false,
- cellTemplate: '<div><div class="ui-grid-cell-contents">{{row.entity.status.name}}</div></div>'
- },
- {
- name: 'linkProposer.name',
- displayName: '环节处理人',
- width: '15%'
- },
- {
- name: 'purpose',
- displayName: '领用用途',
- width: '12%',
- enableFiltering: false
- },
- { name: '操作', enableSorting: false, cellTemplate: '<meanoperator item="row.entity" colobject="col">', enableFiltering: false },
- ];
- $scope.value = 10;
- $scope.decrement = function() {
- $scope.value = $scope.value - 1;
- };
- $scope.data = {}
- $scope.data.url = $sce.trustAsResourceUrl("http://192.168.3.176:28083/aaa.wav");
- // $sce.trustAsResourceUrl("http://192.168.3.176:28083/aaa.wav");
- $scope.record = function() {
- api_text.record($rootScope.takes).then(function(data) {
- if (data.errno == 0) {
- $scope.busy = false;
- }
- })
- };
- $scope.parameters = null;
- $scope.open = function($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.opened = !$scope.opened;
- };
- $scope.endOpen = function($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.startOpened = false;
- $scope.endOpened = !$scope.endOpened;
- };
- $scope.startOpen = function($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.endOpened = false;
- $scope.startOpened = !$scope.startOpened;
- };
- $scope.othcode = {};
- $scope.clear = function() {
- $scope.searchkeys = {};
- // $scope.searchstate = JSON.parse(sessionStorage.getItem("searchincident")).searchType;
- // $scope.othcode = {};
- $scope.parameters = {};
- var fildata = {
- "applicationForm": {},
- "assignee": $rootScope.user.id,
- "candidateGroups": $rootScope.user.group[0].id,
- "searchType": "todo",
- idx: 0,
- sum: mun
- }
- // sessionStorage.removeItem("searchincident");
- $scope.memoryfilterData = fildata;
- $scope.refreshData('expand-right', fildata);
- }
- $scope.chiceIncident = function(parameters, item, stateid) {
- var fildata = defaultFilterData;
- fildata.applicationForm = {};
- if (item.alltitle && item.alldata) {
- fildata.applicationForm[item.alltitle.value] = item.alldata
- }
- if (item.linkProposer) {
- fildata.applicationForm.linkProposer = item.linkProposer
- }
- if (item.proposer) {
- fildata.applicationForm.proposer = item.proposer
- }
- if (item.status) {
- fildata.applicationForm['status'] = item.status.id;
- }
- if (item.type) {
- fildata.applicationForm['type'] = item.type.id;
- }
- $scope.gridOptions.paginationCurrentPage = 1;
- if (parameters && parameters.paramDateFrom && parameters.paramDateTo) {
- angular.extend(fildata, { 'idx': 0, 'sum': $scope.gridOptions.paginationPageSize })
- angular.extend(fildata.applicationForm, { 'startDate': moment(parameters.paramDateFrom).format('YYYY-MM-DD HH:mm:ss'), 'endDate': moment(parameters.paramDateTo).format('YYYY-MM-DD 23:59:59') })
- }
- var transitiondata = angular.copy(item);
- // angular.extend(fildata.applicationForm, transitiondata)
- $scope.refreshData('expand-right', fildata);
- }
- //区域地点过滤
- $scope.key = {};
- api_user_data.fetchDataList('area', { "idx": 0, "sum": 1000 }).then(function(response) {
- if (response) {
- if (response.status = 200) {
- $scope.outarea = response.list;
- }
- }
- })
- //受理人,处理人
- $scope.searchkeys = {};
- var fieldata = { "idx": 0, "sum": 1000, "flag": -1 };
- getUser(fieldata, 3);
- function getUser(fieldatas, it) {
- api_user_data.fetchDataList('user', fieldatas).then(function(data) {
- if (it == 1) {
- $scope.acceptUser = data.list;
- } else if (it == 2) {
- $scope.handlingPersonnelUser = data.list;
- } else if (it == 3) {
- $scope.acceptUser = data.list;
- $scope.handlingPersonnelUser = data.list;
- }
- });
- }
- //受理人过滤
- $scope.onChangeacceptUser = function(key) {
- getUser({
- "idx": 0,
- "sum": 1000,
- "flag": -1,
- "user": { "flag": -1, "name": key }
- }, 1);
- }
- //处理人过滤
- $scope.onChangehandling = function(key) {
- getuser({
- "idx": 0,
- "sum": 1000,
- "flag": -1,
- "user": { "flag": -1, "name": key }
- }, 2);
- }
- //状态
- api_bpm_data.fetchDataList('incidentstatus', { "idx": 0, "sum": 100 }).then(function(response) {
- if (response) {
- if (response.status = 200) {
- $scope.state = response.list;
- }
- }
- })
- //地点区域过滤
- $scope.onChangearea = function(data) {
- delete $scope.searchkeys.place;
- if ($scope.memoryfilterData.incident) {
- delete $scope.memoryfilterData.incident.place;
- }
- var fildata = { "idx": 0, "sum": 1000, "place": { areaId: data.area.id } };
- api_user_data.fetchDataList('place', fildata).then(function(response) {
- if (response) {
- if (response.status = 200) {
- $scope.outplace = response.list;
- }
- }
- })
- };
- $scope.starttime = function(data) {
- return moment(new Date(data)).format('YYYY-MM-DD')
- }
- $scope.overtime = function(data) {
- return moment(new Date(data)).format('YYYY-MM-DD HH:mm')
- }
- //列表排序
- $scope.gridOptions.onRegisterApi = function(gridApi) {
- $scope.gridApi = gridApi;
- gridApi.pagination.on.paginationChanged($scope, function(newPage, pageSize) {
- var filtersData = $scope.memoryfilterData;
- filtersData.idx = newPage - 1;
- filtersData.sum = pageSize;
- // sessionStorage.idx = JSON.stringify(newPage-1)
- $scope.refreshData('expand-right', filtersData);
- // $scope.refreshData('expand-right', {"assignee":$rootScope.user.id, "candidateGroups":$rootScope.user.group[0].id, "idx":newPage-1,"sum":pageSize});
- });
- // gridApi.selection.on.rowSelectionChanged($scope, function(data) {
- // data.grid.appScope.selected.items = data.entity
- // });
- $scope.selected = {
- items: []
- }
- // gridApi.selection.on.rowSelectionChanged($scope, function(scope, ect) {
- // if (scope.isSelected) {
- // scope.grid.appScope.selected.items.push(scope.entity)
- // } else {
- // for (var i = 0; i <= scope.grid.appScope.selected.items.length; i++) {
- // if (scope.grid.appScope.selected.items[i].id == scope.entity.id) {
- // scope.grid.appScope.selected.items.splice(i, 1);
- // break;
- // }
- // }
- // }
- // $scope.selected.items = $scope.gridApi.selection.getSelectedRows();
- // });
- // gridApi.selection.on.rowSelectionChangedBatch($scope, function(rows) {
- // var selectitem = [];
- // selectitem = angular.copy($scope.selected.items);
- // for (var j = 0; j < rows.length; j++) {
- // if (rows[j].isSelected == true) {
- // selectitem.push(rows[j].entity);
- // } else {
- // delete selectitem[j];
- // // rows.splice(j, 1);
- // }
- // }
- // $scope.selected.items = [];
- // for (var i = 0; i < selectitem.length; i++) {
- // if (selectitem[i]) {
- // $scope.selected.items.push(selectitem[i]);
- // }
- // }
- // });
- };
- $scope.selectRowFunction = function(data) {
- $state.go('app.means.applyediter', { taskId: data.taskId, processInstanceId: data.processInstanceId,id:data.id });
- };
- $scope.selectRowFunctionout = function(data) {
- $state.go('app.means.outediter', { taskId: data.taskId, processInstanceId: data.processInstanceId,id:data.id });
- };
- //查看
- $scope.onDblClick = function(data) {
- $state.go('app.means.detail', { formKey: 'applicationForm_editor', pdKey: 'applicationForm', dataId: data.entity.id, taskId: data.taskId, processInstanceId: data.entity.processInstanceId,id:data.id });
- };
- // //查看
- // $scope.followFunction = function(data) {
- // //console.log('data='+JSON.stringify(data));
- // $state.go('app.detail', { formKey: 'statusform', pdKey: 'incident', dataId: data.id, processInstanceId: data.processInstanceId });
- // };
- //删除
- $scope.eventDeleted = function(event) {
- SweetAlert.swal({
- title: "确认删除?",
- text: "删除的数据不可恢复,请确认继续操作!",
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "继续删除",
- cancelButtonText: "取消操作",
- closeOnConfirm: false,
- closeOnCancel: false
- }, function(isConfirm) {
- if (isConfirm) {
- api_bpm_schedule.remove([event.id]).then(function(response) {
- if (response.status == 200) {
- $scope.events.splice(event.id, 1); //有修改的一行
- SweetAlert.swal("操作成功!", "数据已经被删除.", "success");
- } else {
- SweetAlert.swal("操作失败!", "数据暂时无法被删除,请稍候重试", "error");
- }
- });
- } else {
- SweetAlert.swal("操作取消", "数据安全", "error");
- }
- });
- };
- //导出
- $scope.export = function() {
- var modalInstance = $modal.open({
- templateUrl: 'assets/views/delete.html',
- controller: function($scope, scope, $modalInstance, api_bpm_data) {
- $scope.title = '资产单导出';
- $scope.connect = '共导出' + scope.gridOptions['totalItems'] + '条申请单';
- $scope.ok = function() {
- $modalInstance.close(scope.selected.items);
- };
- $scope.cancel = function() {
- $modalInstance.dismiss('cancel');
- };
- },
- size: 'sm',
- resolve: {
- scope: function() {
- return $scope;
- }
- }
- });
- modalInstance.result.then(function(selectedItem) {
- // $rootScope.isMask = true;
- if (selectedItem) {
- var type = 1;
- var fildata = angular.copy($scope.memoryfilterData);
- // fildata.applicationForm = { "collate": 1 };
- $http({
- url: api_bpm_data.downDataModel("applicationForm", type).getRequestedUrl(),
- method: 'POST',
- data: JSON.stringify(fildata),
- headers: {
- // 'Content-type' : 'application/xls',
- 'Accept': '*/*'
- },
- responseType: 'arraybuffer'
- }).success(function(data, status, headers, config) {
- // $rootScope.isMask = false;
- var file = new Blob([data], {
- type: 'application/octet-stream'
- // type : 'application/vnd.ms-excel'
- });
- //trick to download store a file having its URL
- var fileURL = URL.createObjectURL(file);
- var a = document.createElement('a');
- a.href = fileURL;
- a.target = '_blank';
- a.download = '申请单列表.xlsx';
- document.body.appendChild(a);
- a.click();
- }).error(function(data, status, headers, config) {
- // $rootScope.isMask = false;
- console.log(data);
- });
- } else {
- SweetAlert.swal({
- title: "未选择资产分类!",
- text: "请选择资产分类",
- type: "error"
- }, function() {
- // $rootScope.isMask = false;
- });
- }
- // }
- });
- }
- if ($stateParams.model) {
- if (JSON.parse($stateParams.model).searchType && JSON.parse($stateParams.model).searchType != null) {
- $scope.searchTypes = JSON.parse($stateParams.model).searchType;
- } else {
- $scope.searchTypes = "todo";
- }
- } else {
- $scope.searchTypes = "todo";
- }
- $scope.memoryfilterData = {
- "applicationForm": {},
- "assignee": $rootScope.user.id,
- "candidateGroups": $rootScope.user.group[0].id,
- "searchType": "todo",
- "idx": 0,
- "sum": mun
- };
- if ($rootScope.user.group) {
- var defaultFilterData = {
- "applicationForm": {},
- "assignee": $rootScope.user.id,
- "candidateGroups": $rootScope.user.group[0].id,
- "searchType": "todo",
- "idx": 0,
- "sum": mun
- };
- } else {
- var defaultFilterData = {
- "applicationForm": {},
- "assignee": $rootScope.user.id,
- "searchType": "todo",
- "idx": 0,
- "sum": mun
- };
- }
- // var defaultFilterData = {
- // "assignee":$rootScope.user.id,
- // "candidateGroups":$rootScope.user.group[0].id,
- // "idx":0,
- // "sum":mun
- // };
- $scope.ldloading = {};
- // $scope.Change= function(upTypes){
- // if(angular.isDefined(upTypes)&&upTypes=='upincident'){
- // $state.go('app.problem.incident',{});
- // }
- // else if(angular.isDefined(upTypes)&&upTypes=='upchange'){
- // $state.go('app.change.incident',{});
- // }
- // }
- //事件类型筛选
- $scope.searchstate = 'todo';
- $scope.onChange = function(searchType) {
- $scope.searchstate = searchType;
- defaultFilterData = $scope.memoryfilterData;
- defaultFilterData['searchType'] = searchType;
- $scope.refreshData('expand-right', defaultFilterData);
- }
- //刷新
- $scope.resh = function() {
- $scope.refreshData('expand-right', $scope.memoryfilterData);
- }
- //获取列表数据
- $scope.refreshData = function(style, filterData) {
- $scope.ldloading[style.replace('-', '_')] = true;
- if (angular.isUndefined(filterData)) {
- filterData = defaultFilterData;
- }
- // if (angular.isDefined($scope.searchTypes)) {
- // $rootScope['search'] = {};
- // filterData['searchType'] = $scope.searchTypes;
- // $rootScope['search']['incident'] = $scope.searchTypes;
- // }
- // if(sessionStorage.idx){
- // filterData.idx = Number(sessionStorage.idx);
- // $scope.gridOptions.idx = Number(sessionStorage.idx)+1;
- // }
- $scope.myData = [];
- //var start = new Date();
- //var sec = $interval(function () {
- //$scope.callsPending++;
- $scope.gridOptions['sum'] = filterData.sum;
- $scope.memoryfilterData = filterData;
- api_bpm_data.fetchDataList(pdKey, filterData).then(function(data) {
- if (data.status) {
- var myData = Restangular.stripRestangular(data);
- var list = [];
- $scope.gridOptions['totalItems'] = myData.totalNum;
- $scope.myData = myData.list;
- for (var i = 0; i < $scope.myData.length; i++) {
- $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
- }
- } else {
- SweetAlert.swal({
- title: "系统错误",
- text: "请稍后再试!",
- type: "error"
- });
- }
- $scope.ldloading[style.replace('-', '_')] = false;
- }, function() {
- $scope.ldloading[style.replace('-', '_')] = false;
- });
- };
- $scope.refreshData('expand-right', defaultFilterData);
- }]);
- //操作按钮权限控制
- app.controller('MeanOperCtrl', ['$rootScope', '$http', '$scope', '$modal', function($rootScope, $http, $scope, $modal) {
- // console.log('$rootScope.user3='+JSON.stringify($scope.item));
- // if ($scope.item.state.id != null && $scope.item.handlerUser != null) {
- // if ($rootScope.user.id == $scope.item.handlerUser.id) {
- // $scope.item.chaozuoPower = true;
- // if ($scope.item.state.id == 4) {
- // $scope.item.coordination = true;
- // }
- // }
- // }
- // $rootScope.callid = $scope.item.callID;
- // if ($scope.item.callID) {
- // $scope.item.listen = true;
- // } else { $scope.item.listen = false; }
- // if ($scope.item.state.id != 6 && $scope.item.handlerUser == null) {
- // angular.forEach($rootScope.user.group, function(item) {
- // if (item.id == $scope.item.candidateGroups) {
- // $scope.item.tiquPower = true;
- // }
- // })
- // }
- if ($rootScope.user.id == $scope.item.linkProposer.id && $scope.item.status.value != "5") {
- $scope.item.chaozuo = true;
- } else {
- $scope.item.chaozuo = false;
- }
- $scope.coordination = function() {
- $scope.colobject.grid.appScope.coordination($scope.item);
- }
- $scope.look = function() {
- //$state.go('app.detail', { formKey:'incident_back', pdKey:'incident', dataId: $scope.item.id});
- $scope.colobject.grid.appScope.lookFunction($scope.item);
- // console.log('$scope.item='+JSON.stringify($scope.item));
- //$scope.doEdit($scope.item.id);
- }
- $scope.edit = function() {
- if (angular.isDefined($scope.item.type) && ($scope.item.type == 0 || $scope.item.type == 2)) {
- $scope.colobject.grid.appScope.selectRowFunction($scope.item);
- } else {
- $scope.colobject.grid.appScope.selectRowFunctionout($scope.item);
- }
- // console.log('$scope.item='+JSON.stringify($scope.item));
- // $scope.doEdit($scope.item.id);
- }
- $scope.print = function() { //print
- $scope.colobject.grid.appScope.open($scope.item);
- // $scope.doEdit($scope.item.id);
- }
- $scope.record = function() { //record
- $scope.colobject.grid.appScope.play($scope.item);
- // $scope.doEdit($scope.item.id);
- }
- $scope.handler = function() {
- $scope.colobject.grid.appScope.acceptTaskAction($scope.item);
- $scope.doComment($scope.item.id);
- }
- $scope.follow = function() {
- $scope.colobject.grid.appScope.followFunction($scope.item);
- }
- // $scope.play = function() {
- // // console.log($scope.item.callID)
- // var modalInstance = $modal.open({
- // templateUrl: 'assets/views/incident/tpl/audio.html',
- // controller: function($scope, $modalInstance,$sce){
- // $scope.data={
- // "name":"视频",
- // "url":"http://192.168.3.69:8088/recording/recording?callID="+$rootScope.callid
- // };
- // $scope.data.url = $sce.trustAsResourceUrl($scope.data.url);
- // // $scope.audiourl={url:$sce.trustAsResourceUrl("http://192.168.3.69:8088/recording/recording?callID=218147232")};
- // $scope.cancel = function() {
- // $modalInstance.dismiss('cancel');
- // };
- // $modalInstance.close();
- // }
- // });
- // };
- }]);
- //操作按钮
- app.directive('meanoperator', function() {
- return {
- restrict: 'E',
- scope: {
- item: '=',
- colobject: '='
- },
- controller: 'MeanOperCtrl',
- template: '<div><div class="cl-effect-1 ui-grid-cell-contents " >' +
- // '<a ng-click="look()" tooltip-placement="left">查看</a>' +
- // '<a ng-click="handler()" ng-show="{{item.tiquPower}}" class="handlefont" >抢单</a>' +
- '<a ng-click="edit()" ng-show="{{item.chaozuo}}" class="bianjifont">编辑</a>' +
- // '<a ng-click="print()" class="printfont" ng-show="{{item.chaozuo}}" >打印</a>' +
- // '<a ng-click="record()" ng-show="{{item.listen}}" class="luyinfont" >录音</a>' +
- '</div></div>'
- };
- });
|